src/Command/MigrateCommand.php
protected function getMigrationFiles($migrationPath) {
        $files = array();
        $handle = opendir($migrationPath);
        while(false !== $file = readdir($handle)) {
            if($file === '.' || $file === '..') {
                continue;
            }
            $path = $migrationPath . DIRECTORY_SEPARATOR . $file;
            if(preg_match('/^(m(\d{6}_\d{6})_.*?)\.php$/', $file, $matches) && is_file($path)) {
                $files[$matches[1]] = $path;
            }
        }
        closedir($handle);
        return $files;
    }
protected function getMigrationFiles($migrationPath) {
        $files = array();
        $handle = opendir($migrationPath);
        while(false !== $file = readdir($handle)) {
            if($file === '.' || $file === '..') {
                continue;
            }
            $path = $migrationPath . DIRECTORY_SEPARATOR . $file;
            if(preg_match('/^(m(\d{6}_\d{6})_.*?)\.php$/', $file, $matches) && is_file($path)) {
                $files[$matches[1]] = $path;
            }
        }
        closedir($handle);
        return $files;
    }
Fetching migration class to file name under
requested path.
@param  string $migrationPath
@return array [migrationClass => filePath]