original_string: public function registerObject( $serviceName, $instance ) {
  
  		if ( !is_string( $serviceName ) ) {
  			throw new InvalidParameterTypeException( "Expected a string" );
  		}
  
  		if ( isset( $this->aliases[$serviceName] ) ) {
  			throw new ServiceAliasMismatchException( $serviceName );
  		}
  
  		unset( $this->singletons[$serviceName] );
  
  		$this->registry[$serviceName] = $instance;
  		$this->singletons[$serviceName]['#'] = $instance;
  	}
code: public function registerObject( $serviceName, $instance ) {
  
  		if ( !is_string( $serviceName ) ) {
  			throw new InvalidParameterTypeException( "Expected a string" );
  		}
  
  		if ( isset( $this->aliases[$serviceName] ) ) {
  			throw new ServiceAliasMismatchException( $serviceName );
  		}
  
  		unset( $this->singletons[$serviceName] );
  
  		$this->registry[$serviceName] = $instance;
  		$this->singletons[$serviceName]['#'] = $instance;
  	}
code_tokens: public function registerObject ( $ serviceName , $ instance ) { if ( ! is_string ( $ serviceName ) ) { throw new InvalidParameterTypeException ( "Expected a string" ) ; } if ( isset ( $ this -> aliases [ $ serviceName ] ) ) { throw new ServiceAliasMismatchException ( $ serviceName ) ; } unset ( $ this -> singletons [ $ serviceName ] ) ; $ this -> registry [ $ serviceName ] = $ instance ; $ this -> singletons [ $ serviceName ] [ '#' ] = $ instance ; }
docstring: If you are not running PHPUnit or for that matter any other testing
  environment then you are not suppose to use this function.
  
  @since 2.0
  
  {@inheritDoc}
docstring_tokens: If you are not running PHPUnit or for that matter any other testing environment then you are not suppose to use this function .