PHP7 Memento

This commit is contained in:
Dominik Liebler
2016-09-22 10:39:03 +02:00
parent 64e21e8581
commit 01007ec5a8
11 changed files with 1096 additions and 574 deletions

View File

@@ -4,19 +4,21 @@ namespace DesignPatterns\Behavioral\Memento;
class Memento
{
/* @var mixed */
/**
* @var State
*/
private $state;
/**
* @param mixed $stateToSave
* @param State $stateToSave
*/
public function __construct($stateToSave)
public function __construct(State $stateToSave)
{
$this->state = $stateToSave;
}
/**
* @return mixed
* @return State
*/
public function getState()
{