original_string: public function add(string $class, string $filename): self
      {
          if (substr($class, -2) === '\*') { // Is class in a namespace. Example: Namespace\*
              $this->patterns[] = [substr($class, 0, -1), $filename];
          } else {
              $this->classes[$class] = $filename;
          }
          return $this;
      }
code: public function add(string $class, string $filename): self
      {
          if (substr($class, -2) === '\*') { // Is class in a namespace. Example: Namespace\*
              $this->patterns[] = [substr($class, 0, -1), $filename];
          } else {
              $this->classes[$class] = $filename;
          }
          return $this;
      }
code_tokens: public function add ( string $ class , string $ filename ) : self { if ( substr ( $ class , - 2 ) === '\*' ) { // Is class in a namespace. Example: Namespace\* $ this -> patterns [ ] = [ substr ( $ class , 0 , - 1 ) , $ filename ] ; } else { $ this -> classes [ $ class ] = $ filename ; } return $ this ; }
docstring: Registers a class for autoloading.
  
  @param string $class The class name or class name pattern (format: Namespace\*).
  @param string $filename The filename that contains the class or path pattern (format: path/to/file/*.php).
  @return self Returns a reference to itself.
docstring_tokens: Registers a class for autoloading .