src/Workflow.php
public function ask(string $query, Who $who = null, Context $context = null)
    {
        if ($this->subject instanceof CanBeAsked) {
            return $this->subject->getQueryFactory()->create($query, $who, $context)->handle();
        }

        throw new LogicException(sprintf('"%s" does not support responding queries', get_class($this->subject)));
    }
public function ask(string $query, Who $who = null, Context $context = null)
    {
        if ($this->subject instanceof CanBeAsked) {
            return $this->subject->getQueryFactory()->create($query, $who, $context)->handle();
        }

        throw new LogicException(sprintf('"%s" does not support responding queries', get_class($this->subject)));
    }
public function ask ( string $ query , Who $ who = null , Context $ context = null ) { if ( $ this -> subject instanceof CanBeAsked ) { return $ this -> subject -> getQueryFactory ( ) -> create ( $ query , $ who , $ context ) -> handle ( ) ; } throw new LogicException ( sprintf ( '"%s" does not support responding queries' , get_class ( $ this -> subject ) ) ) ; }
@param string       $query
@param Who|null     $who
@param Context|null $context

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