src/Inspector.php
/**
     * Gathers the changes from migrations recursively.
     * @param array<string, array<StructureChangeInterface>>|null $changes
     * @return bool true if more data can be analysed or false if this must be last one
     * @throws InvalidConfigException
     */
Gathers the changes from migrations recursively.
@param array>|null $changes
@return bool true if more data can be analysed or false if this must be last one
@throws InvalidConfigException
Gathers the changes from migrations recursively . @param array > |null $changes @return bool true if more data can be analysed or false if this must be last one @throws InvalidConfigException
private function gatherChanges(?array $changes): bool
    {
        if ($changes === null || array_key_exists($this->currentTable, $changes) === false) {
            return true;
        }
        $data = array_reverse($changes[$this->currentTable]);
        foreach ($data as $change) {
            $method = $change->getMethod();
            if ($method === 'dropTable') {
                return false;
            }
            if ($method === 'renameTable') {
                $this->currentTable = $change->getValue();
                return $this->gatherChanges($changes);
            }
            $this->appliedChanges[] = $change;
            if ($method === 'createTable') {
                return false;
            }
        }
        return true;
    }
private function gatherChanges ( ? array $ changes ) : bool { if ( $ changes === null || array_key_exists ( $ this -> currentTable , $ changes ) === false ) { return true ; } $ data = array_reverse ( $ changes [ $ this -> currentTable ] ) ; foreach ( $ data as $ change ) { $ method = $ change -> getMethod ( ) ; if ( $ method === 'dropTable' ) { return false ; } if ( $ method === 'renameTable' ) { $ this -> currentTable = $ change -> getValue ( ) ; return $ this -> gatherChanges ( $ changes ) ; } $ this -> appliedChanges [ ] = $ change ; if ( $ method === 'createTable' ) { return false ; } } return true ; }
Gathers the changes from migrations recursively.
Gathers the changes from migrations recursively .
/** @var StructureChangeInterface $change */