mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-21 22:06:04 +02:00
update deps & install rector
This commit is contained in:
@@ -4,23 +4,14 @@ namespace DesignPatterns\Behavioral\Memento;
|
||||
|
||||
class Memento
|
||||
{
|
||||
/**
|
||||
* @var State
|
||||
*/
|
||||
private $state;
|
||||
private State $state;
|
||||
|
||||
/**
|
||||
* @param State $stateToSave
|
||||
*/
|
||||
public function __construct(State $stateToSave)
|
||||
{
|
||||
$this->state = $stateToSave;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return State
|
||||
*/
|
||||
public function getState()
|
||||
public function getState(): State
|
||||
{
|
||||
return $this->state;
|
||||
}
|
||||
|
Reference in New Issue
Block a user