public static function classInfo($file)
    {
        if (is_file($file)) {
            $phpCode = file_get_contents($file);
        } else {
            $phpCode = $file;
        }
        
        $namespace = false;
        
        if (preg_match('/^namespace\s+(.+?);(\s+|\r\n)?$/sm', $phpCode, $results)) {
            $namespace = $results[1];
        }
        
        $classes = self::classNameByTokens($phpCode);
        
        return ['namespace' => $namespace, 'class' => end($classes)];
    }