src/Core/CommandCollector.php
private function getPhpFilesMatchingPatternForCommandFromGivenPath($path)
    {
        $folders = ['Commands','commands','Command'];
        foreach ($folders as $f) {
            $cPath = $path . DIRECTORY_SEPARATOR . $f . DIRECTORY_SEPARATOR;

            if (!is_dir($cPath)) {
                continue;
            }
            $files = glob("$cPath*[cC]ommand\.php");

            return $files;
        }
        return [];
    }
private function getPhpFilesMatchingPatternForCommandFromGivenPath($path)
    {
        $folders = ['Commands','commands','Command'];
        foreach ($folders as $f) {
            $cPath = $path . DIRECTORY_SEPARATOR . $f . DIRECTORY_SEPARATOR;

            if (!is_dir($cPath)) {
                continue;
            }
            $files = glob("$cPath*[cC]ommand\.php");

            return $files;
        }
        return [];
    }
private function getPhpFilesMatchingPatternForCommandFromGivenPath ( $ path ) { $ folders = [ 'Commands' , 'commands' , 'Command' ] ; foreach ( $ folders as $ f ) { $ cPath = $ path . DIRECTORY_SEPARATOR . $ f . DIRECTORY_SEPARATOR ; if ( ! is_dir ( $ cPath ) ) { continue ; } $ files = glob ( "$cPath*[cC]ommand\.php" ) ; return $ files ; } return [ ] ; }
Return list of PHP files matching `Command` specific pattern.

@param string $path Path to collect files from

@return string[]
Return list of PHP files matching Command specific pattern .