original_string: private function getNamespaceFromResourceFilename(string $resourceFilename): string
    {
      $name = $this->getPathInResources($resourceFilename);
  
      // Remove resource dir from name.
      $len = strlen(trim($this->resourceDir, '/'));
      if ($len>0)
      {
        $name = substr($name, $len + 2);
      }
  
      // Remove extension.
      $parts = pathinfo($name);
      $name  = substr($name, 0, -(strlen($parts['extension']) + 1));
  
      return $name;
    }
code: private function getNamespaceFromResourceFilename(string $resourceFilename): string
    {
      $name = $this->getPathInResources($resourceFilename);
  
      // Remove resource dir from name.
      $len = strlen(trim($this->resourceDir, '/'));
      if ($len>0)
      {
        $name = substr($name, $len + 2);
      }
  
      // Remove extension.
      $parts = pathinfo($name);
      $name  = substr($name, 0, -(strlen($parts['extension']) + 1));
  
      return $name;
    }
code_tokens: private function getNamespaceFromResourceFilename ( string $ resourceFilename ) : string { $ name = $ this -> getPathInResources ( $ resourceFilename ) ; // Remove resource dir from name. $ len = strlen ( trim ( $ this -> resourceDir , '/' ) ) ; if ( $ len > 0 ) { $ name = substr ( $ name , $ len + 2 ) ; } // Remove extension. $ parts = pathinfo ( $ name ) ; $ name = substr ( $ name , 0 , - ( strlen ( $ parts [ 'extension' ] ) + 1 ) ) ; return $ name ; }
docstring: Returns the namespace based on the name of a JavaScript file.
  
  @param string $resourceFilename The name of the JavaScript file.
  
  @return string
docstring_tokens: Returns the namespace based on the name of a JavaScript file .