protected function getClassnamesFromComposerFile(SplFileInfo $file)
    {
        $composerData = $this->readComposerFile($file);

        if (isset($composerData['extra']['spress_class']) === false) {
            return [];
        }

        if (
            is_string($composerData['extra']['spress_class']) === false
            && is_array($composerData['extra']['spress_class']) === false
        ) {
            return [];
        }

        return (array) $composerData['extra']['spress_class'];
    }