src/Migrations.php
private function getMigrationInstances(array $migration_class_file_path_map)
    {
        $result = [];

        foreach ($migration_class_file_path_map as $migration_class => $migration_file_path) {
            if (is_file($migration_file_path)) {
                require_once $migration_file_path;

                if (class_exists($migration_class, false)) {
                    $reflection = new ReflectionClass($migration_class);

                    if ($reflection->implementsInterface(MigrationInterface::class) && !$reflection->isAbstract()) {
                        $result[$migration_class] = new $migration_class($this->connection, $this->log);
                    }
                } else {
                    throw new RuntimeException("Migration class '$migration_class' not found");
                }
            } else {
                throw new RuntimeException("File '$migration_file_path' not found");
            }
        }

        return $result;
    }
private function getMigrationInstances(array $migration_class_file_path_map)
    {
        $result = [];

        foreach ($migration_class_file_path_map as $migration_class => $migration_file_path) {
            if (is_file($migration_file_path)) {
                require_once $migration_file_path;

                if (class_exists($migration_class, false)) {
                    $reflection = new ReflectionClass($migration_class);

                    if ($reflection->implementsInterface(MigrationInterface::class) && !$reflection->isAbstract()) {
                        $result[$migration_class] = new $migration_class($this->connection, $this->log);
                    }
                } else {
                    throw new RuntimeException("Migration class '$migration_class' not found");
                }
            } else {
                throw new RuntimeException("File '$migration_file_path' not found");
            }
        }

        return $result;
    }
private function getMigrationInstances ( array $ migration_class_file_path_map ) { $ result = [ ] ; foreach ( $ migration_class_file_path_map as $ migration_class => $ migration_file_path ) { if ( is_file ( $ migration_file_path ) ) { require_once $ migration_file_path ; if ( class_exists ( $ migration_class , false ) ) { $ reflection = new ReflectionClass ( $ migration_class ) ; if ( $ reflection -> implementsInterface ( MigrationInterface :: class ) && ! $ reflection -> isAbstract ( ) ) { $ result [ $ migration_class ] = new $ migration_class ( $ this -> connection , $ this -> log ) ; } } else { throw new RuntimeException ( "Migration class '$migration_class' not found" ) ; } } else { throw new RuntimeException ( "File '$migration_file_path' not found" ) ; } } return $ result ; }
Return an array of MigrationInterface instances indexed by class name.

@param  array                $migration_class_file_path_map
@return MigrationInterface[]
Return an array of MigrationInterface instances indexed by class name .