mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-27 00:16:31 +02:00
PHP8
This commit is contained in:
@@ -4,11 +4,8 @@ namespace DesignPatterns\Behavioral\Memento;
|
||||
|
||||
class Memento
|
||||
{
|
||||
private State $state;
|
||||
|
||||
public function __construct(State $stateToSave)
|
||||
public function __construct(private State $state)
|
||||
{
|
||||
$this->state = $stateToSave;
|
||||
}
|
||||
|
||||
public function getState(): State
|
||||
|
Reference in New Issue
Block a user