original_string: public function replaceNameWithoutExtension($nameWithoutExtension)
      {
          $atoms = $this->nameAtoms();
          if (count($atoms) < 2) {
              return $this->replaceName($nameWithoutExtension);
          }
  
          array_splice($atoms, 0, -1, array($nameWithoutExtension));
  
          return $this->replaceName(implode(self::EXTENSION_SEPARATOR, $atoms));
      }
code: public function replaceNameWithoutExtension($nameWithoutExtension)
      {
          $atoms = $this->nameAtoms();
          if (count($atoms) < 2) {
              return $this->replaceName($nameWithoutExtension);
          }
  
          array_splice($atoms, 0, -1, array($nameWithoutExtension));
  
          return $this->replaceName(implode(self::EXTENSION_SEPARATOR, $atoms));
      }
code_tokens: public function replaceNameWithoutExtension ( $ nameWithoutExtension ) { $ atoms = $ this -> nameAtoms ( ) ; if ( count ( $ atoms ) < 2 ) { return $ this -> replaceName ( $ nameWithoutExtension ) ; } array_splice ( $ atoms , 0 , - 1 , array ( $ nameWithoutExtension ) ) ; return $ this -> replaceName ( implode ( self :: EXTENSION_SEPARATOR , $ atoms ) ) ; }
docstring: Replace this path's name, but keep the last extension.
  
  @param string $nameWithoutExtension The replacement string.
  
  @return PathInterface A new path instance with the supplied name replacing the portion of the existing name preceding the last extension.
docstring_tokens: Replace this path s name but keep the last extension .