private function finishFlow(ReactFlow $flow)
    {
        if ($flow->isSuccess()) {
            if (!$flow->isSilent()) {
                $this->emit($flow->getCode(), [$flow->getResult(), $this]);
            }

            $flow->getDeferred()->resolve($flow->getResult());
        } else {
            $result = new \RuntimeException($flow->getErrorMessage());
            $this->emitWarning($result);

            $flow->getDeferred()->reject($result);
        }
    }
private function finishFlow(ReactFlow $flow)
    {
        if ($flow->isSuccess()) {
            if (!$flow->isSilent()) {
                $this->emit($flow->getCode(), [$flow->getResult(), $this]);
            }

            $flow->getDeferred()->resolve($flow->getResult());
        } else {
            $result = new \RuntimeException($flow->getErrorMessage());
            $this->emitWarning($result);

            $flow->getDeferred()->reject($result);
        }
    }
private function finishFlow ( ReactFlow $ flow ) { if ( $ flow -> isSuccess ( ) ) { if ( ! $ flow -> isSilent ( ) ) { $ this -> emit ( $ flow -> getCode ( ) , [ $ flow -> getResult ( ) , $ this ] ) ; } $ flow -> getDeferred ( ) -> resolve ( $ flow -> getResult ( ) ) ; } else { $ result = new \ RuntimeException ( $ flow -> getErrorMessage ( ) ) ; $ this -> emitWarning ( $ result ) ; $ flow -> getDeferred ( ) -> reject ( $ result ) ; } }
Finishes the given flow.

@param ReactFlow $flow
Finishes the given flow .