src/ConfigurationGeneratorCommand.php
/**
     * Recursively look through the given directory
     * to find all php files
     *
     * @param string $directory
     * @param array  $namespaces
     *
     * @return array
     */
Recursively look through the given directory
to find all php files

@param string $directory
@param array  $namespaces

@return array
Recursively look through the given directory to find all php files @param string $directory @param array $namespaces @return array
private function recursiveDirectoryIterator($directory, array $namespaces = [])
    {
        $iterator = new DirectoryIterator($directory);
        foreach ($iterator as $info) {
            if ($info->isDot() == true) {
                continue;
            }
            if ($info->isDir()) {
                $namespaces = $this->recursiveDirectoryIterator($info->getPathname(), $namespaces);
            }
            if (
                $info->isFile()
                && $info->getExtension() == 'php'
            ) {
                if ($this->buildFQCN($info->getPathname()) !== null) {
                    $namespaces[] = $this->buildFQCN($info->getPathname());
                }
            }
        }
        return $namespaces;
    }
private function recursiveDirectoryIterator ( $ directory , array $ namespaces = [ ] ) { $ iterator = new DirectoryIterator ( $ directory ) ; foreach ( $ iterator as $ info ) { if ( $ info -> isDot ( ) == true ) { continue ; } if ( $ info -> isDir ( ) ) { $ namespaces = $ this -> recursiveDirectoryIterator ( $ info -> getPathname ( ) , $ namespaces ) ; } if ( $ info -> isFile ( ) && $ info -> getExtension ( ) == 'php' ) { if ( $ this -> buildFQCN ( $ info -> getPathname ( ) ) !== null ) { $ namespaces [ ] = $ this -> buildFQCN ( $ info -> getPathname ( ) ) ; } } } return $ namespaces ; }
Recursively look through the given directory
 to find all php files
Recursively look through the given directory to find all php files
// Ignore `.` and `..` directories // Recursive iteration // Check for php only files