original_string: public function off(string $event)
      {
          if (false === ($key = array_search($event, $this->getSupportedEvents(), true))) {
              return null;
          }
  
          if (!isset($this->eventHandlers[$key]) || !($cb = $this->eventHandlers[$key])) {
              return null;
          }
  
          $this->eventHandlers[$key] = null;
  
          return $cb;
      }
code: public function off(string $event)
      {
          if (false === ($key = array_search($event, $this->getSupportedEvents(), true))) {
              return null;
          }
  
          if (!isset($this->eventHandlers[$key]) || !($cb = $this->eventHandlers[$key])) {
              return null;
          }
  
          $this->eventHandlers[$key] = null;
  
          return $cb;
      }
code_tokens: public function off ( string $ event ) { if ( false === ( $ key = array_search ( $ event , $ this -> getSupportedEvents ( ) , true ) ) ) { return null ; } if ( ! isset ( $ this -> eventHandlers [ $ key ] ) || ! ( $ cb = $ this -> eventHandlers [ $ key ] ) ) { return null ; } $ this -> eventHandlers [ $ key ] = null ; return $ cb ; }
docstring: remove event handler
  @param string $event
  @return bool
docstring_tokens: remove event handler