private function classForFile(SplFileInfo $file): string
    {
        $subnamespace = str_replace('/', '\\', $file->getRelativePath());
        if (!empty($subnamespace)) {
            $subnamespace .= '\\';
        }
        $class = $this->namespace.'\\'.$subnamespace.$file->getBasename('.php');

        return $class;
    }
private function classForFile(SplFileInfo $file): string
    {
        $subnamespace = str_replace('/', '\\', $file->getRelativePath());
        if (!empty($subnamespace)) {
            $subnamespace .= '\\';
        }
        $class = $this->namespace.'\\'.$subnamespace.$file->getBasename('.php');

        return $class;
    }
private function classForFile ( SplFileInfo $ file ) : string { $ subnamespace = str_replace ( '/' , '\\' , $ file -> getRelativePath ( ) ) ; if ( ! empty ( $ subnamespace ) ) { $ subnamespace .= '\\' ; } $ class = $ this -> namespace . '\\' . $ subnamespace . $ file -> getBasename ( '.php' ) ; return $ class ; }
Given a file path, return the PSR-4 class it should contain.

@param SplFileInfo $file The file to generate the class name for.

@return string The fully-qualified class name.
Given a file path return the PSR - 4 class it should contain .