/** * {@inheritdoc} */ public function changeState(StateWorkflow $stateWorkflow, StateInterface $newState) { $stateWorkflow->guardExistingState($newState->getKey()); $this->setStateKey($newState->getKey()); return $this; }
/** * @param StateInterface $state * * @return IntrospectedState */ private function createIntrospectedState(StateInterface $state) { return new IntrospectedState($state->getKey(), $state->getName()); }