original_string: public function overridesFrom($namespace)
      {
          if (! isset($this->hints[$namespace])) {
              return;
          }
  
          $paths = $this->hints[$namespace];
  
          // The folder of Views Override should be located in the same directory with the Views one.
          // For example: <BASEPATH>/themes/Bootstrap/Views -> <BASEPATH>/themes/Bootstrap/Override
  
          $path = dirname(head($paths)) .DS .'Overrides';
  
          if (! in_array($path, $this->paths) && $this->files->isDirectory($path)) {
              // If there was previously added another Views overriding path, we will remove it.
  
              if (Str::endsWith(head($this->paths), DS .'Overrides')) {
                  array_shift($this->paths);
              }
  
              array_unshift($this->paths, $path);
          }
      }
code: public function overridesFrom($namespace)
      {
          if (! isset($this->hints[$namespace])) {
              return;
          }
  
          $paths = $this->hints[$namespace];
  
          // The folder of Views Override should be located in the same directory with the Views one.
          // For example: <BASEPATH>/themes/Bootstrap/Views -> <BASEPATH>/themes/Bootstrap/Override
  
          $path = dirname(head($paths)) .DS .'Overrides';
  
          if (! in_array($path, $this->paths) && $this->files->isDirectory($path)) {
              // If there was previously added another Views overriding path, we will remove it.
  
              if (Str::endsWith(head($this->paths), DS .'Overrides')) {
                  array_shift($this->paths);
              }
  
              array_unshift($this->paths, $path);
          }
      }
code_tokens: public function overridesFrom ( $ namespace ) { if ( ! isset ( $ this -> hints [ $ namespace ] ) ) { return ; } $ paths = $ this -> hints [ $ namespace ] ; // The folder of Views Override should be located in the same directory with the Views one. // For example: <BASEPATH>/themes/Bootstrap/Views -> <BASEPATH>/themes/Bootstrap/Override $ path = dirname ( head ( $ paths ) ) . DS . 'Overrides' ; if ( ! in_array ( $ path , $ this -> paths ) && $ this -> files -> isDirectory ( $ path ) ) { // If there was previously added another Views overriding path, we will remove it. if ( Str :: endsWith ( head ( $ this -> paths ) , DS . 'Overrides' ) ) { array_shift ( $ this -> paths ) ; } array_unshift ( $ this -> paths , $ path ) ; } }
docstring: Prepend a path specified by its namespace.
  
  @param  string  $namespace
  @return void
docstring_tokens: Prepend a path specified by its namespace .