public function changeState()
    {
        $this->getStates();

        $actualState = $this->getState();
        $newState = self::$statesHandler[$actualState]['state'];
        $action = self::$statesHandler[$actualState]['action'];

        $this->setState($newState);
        $this->doAction($action);

        return $newState;
    }
public function changeState()
    {
        $this->getStates();

        $actualState = $this->getState();
        $newState = self::$statesHandler[$actualState]['state'];
        $action = self::$statesHandler[$actualState]['action'];

        $this->setState($newState);
        $this->doAction($action);

        return $newState;
    }
public function changeState ( ) { $ this -> getStates ( ) ; $ actualState = $ this -> getState ( ) ; $ newState = self :: $ statesHandler [ $ actualState ] [ 'state' ] ; $ action = self :: $ statesHandler [ $ actualState ] [ 'action' ] ; $ this -> setState ( $ newState ) ; $ this -> doAction ( $ action ) ; return $ newState ; }
Change complement state.

@uses \Eliasis\Complement\Traits\ComplementAction::doAction()

@return string → new state
Change complement state .