protected function getMigrationFiles()
    {
        if ($this->_migrationFiles === null) {
            $this->_migrationFiles = [];
            $directories = $this->getDirectories();

            foreach ($directories as $namespace => $dir) {
                if ($dir && is_dir($dir)) {
                    $handle = opendir($dir);
                    while (($file = readdir($handle)) !== false) {
                        if ($file === '.' || $file === '..') {
                            continue;
                        }
                        $path = $dir . DIRECTORY_SEPARATOR . $file;
                        if (preg_match('/^(m(\d{6}_?\d{6})\D.*?)\.php$/is', $file, $matches) && is_file($path)) {
                            $class = (is_int($namespace) ? '' : $namespace . '\\') . $matches[1];
                            if ($this->baseMigrationClass) {
                                try {
                                    require_once $path;
                                    if (is_subclass_of($class, $this->baseMigrationClass)) {
                                        $this->_migrationFiles[$class] = $path;
                                    }
                                } catch (\Exception $exc) {
                                    echo $exc->getMessage();
                                }
                            } else {
                                $this->_migrationFiles[$class] = $path;
                            }
                        }
                    }
                    closedir($handle);
                }
            }
        }

        return $this->_migrationFiles;
    }