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'];
    }
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'];
    }
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' ] ; }
Extracts the class names from a composer.json file
A composer.json file could defines several classes in spress_class
property from extra section.

@param SplFileInfo $file A composer.json file

@return array List of class names
Extracts the class names from a composer . json file A composer . json file could defines several classes in spress_class property from extra section .