Skip to content

Commit 7cc012c

Browse files
committed
Psalm > Fix Expected Argument
1 parent ca02a83 commit 7cc012c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Structural/Flyweight/Character.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public function __construct(private string $name)
1818
{
1919
}
2020

21-
public function render(string $font): string
21+
public function render(string $extrinsicState): string
2222
{
2323
// Clients supply the context-dependent information that the flyweight needs to draw itself
2424
// For flyweights representing characters, extrinsic state usually contains e.g. the font.
2525

26-
return sprintf('Character %s with font %s', $this->name, $font);
26+
return sprintf('Character %s with font %s', $this->name, $extrinsicState);
2727
}
2828
}

Structural/Flyweight/Word.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ public function __construct(private string $name)
88
{
99
}
1010

11-
public function render(string $font): string
11+
public function render(string $extrinsicState): string
1212
{
13-
return sprintf('Word %s with font %s', $this->name, $font);
13+
return sprintf('Word %s with font %s', $this->name, $extrinsicState);
1414
}
1515
}

0 commit comments

Comments
 (0)