src/Events/EventDispatcher.php
public function removeListener(EventListener $listener)
    {
        if (($i = array_search($listener, $this->listeners)) !== false) {
            unset($this->listeners[$i]);
        }
        return $this;
    }
public function removeListener(EventListener $listener)
    {
        if (($i = array_search($listener, $this->listeners)) !== false) {
            unset($this->listeners[$i]);
        }
        return $this;
    }
public function removeListener ( EventListener $ listener ) { if ( ( $ i = array_search ( $ listener , $ this -> listeners ) ) !== false ) { unset ( $ this -> listeners [ $ i ] ) ; } return $ this ; }
Removes a listener

@param EventListener $listener
@return EventDispatcher
Removes a listener