original_string: protected static function classFromFile(SplFileInfo $file, $basePath)
      {
          $class = trim(str_replace($basePath, '', $file->getRealPath()), DIRECTORY_SEPARATOR);
  
          return str_replace(
              [DIRECTORY_SEPARATOR, 'App\\'],
              ['\\', app()->getNamespace()],
              ucfirst(Str::replaceLast('.php', '', $class))
          );
      }
code: protected static function classFromFile(SplFileInfo $file, $basePath)
      {
          $class = trim(str_replace($basePath, '', $file->getRealPath()), DIRECTORY_SEPARATOR);
  
          return str_replace(
              [DIRECTORY_SEPARATOR, 'App\\'],
              ['\\', app()->getNamespace()],
              ucfirst(Str::replaceLast('.php', '', $class))
          );
      }
code_tokens: protected static function classFromFile ( SplFileInfo $ file , $ basePath ) { $ class = trim ( str_replace ( $ basePath , '' , $ file -> getRealPath ( ) ) , DIRECTORY_SEPARATOR ) ; return str_replace ( [ DIRECTORY_SEPARATOR , 'App\\' ] , [ '\\' , app ( ) -> getNamespace ( ) ] , ucfirst ( Str :: replaceLast ( '.php' , '' , $ class ) ) ) ; }
docstring: Extract the class name from the given file path.
  
  @param  \SplFileInfo  $file
  @param  string  $basePath
  @return string
docstring_tokens: Extract the class name from the given file path .