diff --git a/Structural/Flyweight/Character.php b/Structural/Flyweight/Character.php index 3515661..4e97675 100644 --- a/Structural/Flyweight/Character.php +++ b/Structural/Flyweight/Character.php @@ -18,11 +18,11 @@ class Character implements Text { } - public function render(string $font): string + public function render(string $extrinsicState): string { // Clients supply the context-dependent information that the flyweight needs to draw itself // For flyweights representing characters, extrinsic state usually contains e.g. the font. - return sprintf('Character %s with font %s', $this->name, $font); + return sprintf('Character %s with font %s', $this->name, $extrinsicState); } } diff --git a/Structural/Flyweight/Word.php b/Structural/Flyweight/Word.php index 77548bd..a7a0c3e 100644 --- a/Structural/Flyweight/Word.php +++ b/Structural/Flyweight/Word.php @@ -8,8 +8,8 @@ class Word implements Text { } - public function render(string $font): string + public function render(string $extrinsicState): string { - return sprintf('Word %s with font %s', $this->name, $font); + return sprintf('Word %s with font %s', $this->name, $extrinsicState); } }