Skip to content

Commit 17fdaed

Browse files
author
Dominik Liebler
authored
Merge pull request DesignPatternsPHP#462 from rafaelstz/patch-2
Composer > Update lock based in the PHP version
2 parents 0c524be + 7cc012c commit 17fdaed

File tree

4 files changed

+825
-3905
lines changed

4 files changed

+825
-3905
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
}

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"phpunit/phpunit": "^9",
1919
"squizlabs/php_codesniffer": "^3",
2020
"vimeo/psalm": "^4",
21-
"psalm/plugin-phpunit": "*",
22-
"rector/rector": "*"
21+
"psalm/plugin-phpunit": "*"
2322
},
2423
"autoload": {
2524
"classmap": ["Behavioral", "Creational", "Structural", "More"]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy