original_string: public final function off( $eventName, $eventCallback = null ) {
  
  			if ( is_string( $eventName ) ) {
  
  				if ( strlen( $eventName ) > 0 ) {
  
  					if ( isset( $this->events[ $eventName ] ) ) {
  
  						if ( $eventCallback === null ) {
  
  							unset( $this->events[ $eventName ] );
  						
  						} else {
  
  							for ( $i = count( $this->events[ $eventName ] ) - 1; $i>=0; $i-- ) {
  
  								if ( self::callbackEquals( $eventCallback, $this->events[ $eventName ][ $i ]['callback'] ) ) {
  
  									// remove event
  									array_splice( $this->events[ $eventName ], $i, 1 );
  
  									if ( count( $this->events[ $eventName ] ) == 0 ) {
  										unset( $this->events[ $eventName ] );
  									}
  
  									break;
  
  								}
  
  							}
  
  						}
  
  					}
  
  				} else {
  
  					throw new \browserfs\Exception('Invalid argument $eventName: non-empty string expected!');
  
  				}
  
  			} else {
  
  				throw new \browserfs\Exception('Invalid argument $eventName: string expected!' );
  
  			}
  
  		}
code: public final function off( $eventName, $eventCallback = null ) {
  
  			if ( is_string( $eventName ) ) {
  
  				if ( strlen( $eventName ) > 0 ) {
  
  					if ( isset( $this->events[ $eventName ] ) ) {
  
  						if ( $eventCallback === null ) {
  
  							unset( $this->events[ $eventName ] );
  						
  						} else {
  
  							for ( $i = count( $this->events[ $eventName ] ) - 1; $i>=0; $i-- ) {
  
  								if ( self::callbackEquals( $eventCallback, $this->events[ $eventName ][ $i ]['callback'] ) ) {
  
  									// remove event
  									array_splice( $this->events[ $eventName ], $i, 1 );
  
  									if ( count( $this->events[ $eventName ] ) == 0 ) {
  										unset( $this->events[ $eventName ] );
  									}
  
  									break;
  
  								}
  
  							}
  
  						}
  
  					}
  
  				} else {
  
  					throw new \browserfs\Exception('Invalid argument $eventName: non-empty string expected!');
  
  				}
  
  			} else {
  
  				throw new \browserfs\Exception('Invalid argument $eventName: string expected!' );
  
  			}
  
  		}
code_tokens: public final function off ( $ eventName , $ eventCallback = null ) { if ( is_string ( $ eventName ) ) { if ( strlen ( $ eventName ) > 0 ) { if ( isset ( $ this -> events [ $ eventName ] ) ) { if ( $ eventCallback === null ) { unset ( $ this -> events [ $ eventName ] ) ; } else { for ( $ i = count ( $ this -> events [ $ eventName ] ) - 1 ; $ i >= 0 ; $ i -- ) { if ( self :: callbackEquals ( $ eventCallback , $ this -> events [ $ eventName ] [ $ i ] [ 'callback' ] ) ) { // remove event array_splice ( $ this -> events [ $ eventName ] , $ i , 1 ) ; if ( count ( $ this -> events [ $ eventName ] ) == 0 ) { unset ( $ this -> events [ $ eventName ] ) ; } break ; } } } } } else { throw new \ browserfs \ Exception ( 'Invalid argument $eventName: non-empty string expected!' ) ; } } else { throw new \ browserfs \ Exception ( 'Invalid argument $eventName: string expected!' ) ; } }
docstring: Removes a event listener callback binded to eventName
  @param eventName - string - > the name of the event
  @param eventCallback -> [ callable( $e: \browserfs\Event ): void ] -> a callable function that
  was previously added with the "on" or "once" methods. If unspecified, all listeners
  that were added to eventName will be cleared.
docstring_tokens: Removes a event listener callback binded to eventName