mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-13 10:24:00 +02:00
PHP8
This commit is contained in:
@@ -4,11 +4,8 @@ namespace DesignPatterns\Behavioral\Strategy;
|
||||
|
||||
class Context
|
||||
{
|
||||
private Comparator $comparator;
|
||||
|
||||
public function __construct(Comparator $comparator)
|
||||
public function __construct(private Comparator $comparator)
|
||||
{
|
||||
$this->comparator = $comparator;
|
||||
}
|
||||
|
||||
public function executeStrategy(array $elements): array
|
||||
|
Reference in New Issue
Block a user