src/Workflow.php
public function make(string $command, Who $who = null, Context $context = null)
    {
        if (!$this->can($command, $who)) {
            $this->throwTransitionError($command, $who);
        }

        $command = $this->subject->getCommandFactory()->create($command, $who, $context);

        return $this->run($command);
    }
public function make(string $command, Who $who = null, Context $context = null)
    {
        if (!$this->can($command, $who)) {
            $this->throwTransitionError($command, $who);
        }

        $command = $this->subject->getCommandFactory()->create($command, $who, $context);

        return $this->run($command);
    }
public function make ( string $ command , Who $ who = null , Context $ context = null ) { if ( ! $ this -> can ( $ command , $ who ) ) { $ this -> throwTransitionError ( $ command , $ who ) ; } $ command = $ this -> subject -> getCommandFactory ( ) -> create ( $ command , $ who , $ context ) ; return $ this -> run ( $ command ) ; }
@param string       $command
@param Who|null     $who
@param Context|null $context

@return mixed
@param string $command @param Who|null $who @param Context|null $context