original_string: public function setResult($name = null, $result = null)
      {
          if (null === $result) {
              $result = $name;
              array_push($this->results, $result);
  
              return $this;
          }
  
          $this->results[(string) $name] = $result;
  
          return $this;
      }
code: public function setResult($name = null, $result = null)
      {
          if (null === $result) {
              $result = $name;
              array_push($this->results, $result);
  
              return $this;
          }
  
          $this->results[(string) $name] = $result;
  
          return $this;
      }
code_tokens: public function setResult ( $ name = null , $ result = null ) { if ( null === $ result ) { $ result = $ name ; array_push ( $ this -> results , $ result ) ; return $ this ; } $ this -> results [ ( string ) $ name ] = $ result ; return $ this ; }
docstring: Sets event result.
  
  Any listener can store in instance of event some result.
  If the result is not named, it is added to the results stack.
  
  @param string $name   Optional; the name of result
  @param mixed  $result The result value
  
  @return AbstractEvent
docstring_tokens: Sets event result .