original_string: public function addNamespace($prefix, $baseDir)
      {
          $prefix = trim($prefix, '\\').'\\';
          $baseDir = rtrim($baseDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
          if (!isset($this->namespaceMap[$prefix])) {
              $this->namespaceMap[$prefix] = [];
          }
          array_push($this->namespaceMap[$prefix], str_replace('$path', $this->basePath, $baseDir));
      }
code: public function addNamespace($prefix, $baseDir)
      {
          $prefix = trim($prefix, '\\').'\\';
          $baseDir = rtrim($baseDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
          if (!isset($this->namespaceMap[$prefix])) {
              $this->namespaceMap[$prefix] = [];
          }
          array_push($this->namespaceMap[$prefix], str_replace('$path', $this->basePath, $baseDir));
      }
code_tokens: public function addNamespace ( $ prefix , $ baseDir ) { $ prefix = trim ( $ prefix , '\\' ) . '\\' ; $ baseDir = rtrim ( $ baseDir , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; if ( ! isset ( $ this -> namespaceMap [ $ prefix ] ) ) { $ this -> namespaceMap [ $ prefix ] = [ ] ; } array_push ( $ this -> namespaceMap [ $ prefix ] , str_replace ( '$path' , $ this -> basePath , $ baseDir ) ) ; }
docstring: Registers a PSR-4 namespace.
  
  @param string $prefix
  @param string $baseDir
docstring_tokens: Registers a PSR - 4 namespace .