original_string: public function removeHandler($handler)
      {
          if(!is_callable($handler))
              throw new \InvalidArgumentException("Argument 1 of Event->addHandler needs to be a valid callback");
  
          $i = array_search($handler, $this->_handlers, true);
  
          if ($i !== false)
              unset($this->_handlers[$i]);
  
          return $this;
      }
code: public function removeHandler($handler)
      {
          if(!is_callable($handler))
              throw new \InvalidArgumentException("Argument 1 of Event->addHandler needs to be a valid callback");
  
          $i = array_search($handler, $this->_handlers, true);
  
          if ($i !== false)
              unset($this->_handlers[$i]);
  
          return $this;
      }
code_tokens: public function removeHandler ( $ handler ) { if ( ! is_callable ( $ handler ) ) throw new \ InvalidArgumentException ( "Argument 1 of Event->addHandler needs to be a valid callback" ) ; $ i = array_search ( $ handler , $ this -> _handlers , true ) ; if ( $ i !== false ) unset ( $ this -> _handlers [ $ i ] ) ; return $ this ; }
docstring: Removes an assigned handler
  
  This uses array_search to find the handler
  
  @param callable $handler The handler to remove
  
  @return $this
docstring_tokens: Removes an assigned handler