protected function getFilesNamespace($file)
    {
        $namespace = null;

        if (is_array($file)) {
            // We are using a custom namespace
            $namespace = $this->sanitizeNamespace($file[1]);
            $file = $file[0];
            return [$namespace, $file];

        } else {
            // We are namespacing using the file's name
            $filename = rtrim($file->getBasename(), '.' . $file->getExtension());
            $namespace = $this->sanitizeNamespace($filename);
            return [$namespace, $file];
        }
    }