/** * @return mixed */ public function execute() { $result = $this->currentState->execute(); if ($this->isValidState($result)) { return $this->changeState($result); } return $result; }