original_string: public function fireOnSendingRequest(HttpRequest $request)
      {
          $event = EnumEvent::REQUEST;
          if (isset($this->listeners[$event]) && is_array($this->listeners[$event]))
          {
              foreach($this->listeners[$event] as $l)
              {
                  $ret = $l($request);
                  if ($ret instanceof HttpRequest){
                      $request = $ret;
                  }
              }
          }
          return $request;
      }
code: public function fireOnSendingRequest(HttpRequest $request)
      {
          $event = EnumEvent::REQUEST;
          if (isset($this->listeners[$event]) && is_array($this->listeners[$event]))
          {
              foreach($this->listeners[$event] as $l)
              {
                  $ret = $l($request);
                  if ($ret instanceof HttpRequest){
                      $request = $ret;
                  }
              }
          }
          return $request;
      }
code_tokens: public function fireOnSendingRequest ( HttpRequest $ request ) { $ event = EnumEvent :: REQUEST ; if ( isset ( $ this -> listeners [ $ event ] ) && is_array ( $ this -> listeners [ $ event ] ) ) { foreach ( $ this -> listeners [ $ event ] as $ l ) { $ ret = $ l ( $ request ) ; if ( $ ret instanceof HttpRequest ) { $ request = $ ret ; } } } return $ request ; }
docstring: Fire event before sending HTTP request
  
  @param HttpRequest $request
  
  @return HttpRequest
docstring_tokens: Fire event before sending HTTP request