original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Finishes the given flow.
  
  @param ReactFlow $flow
docstring_tokens: Finishes the given flow .