public function updateState($state, $preserveState = true)
    {
        $newState = $state;
        if ($preserveState) {
            $newState = $state->deepClone();
        }

        /** @var $operation Operation */
        foreach ($this->operations as $operation) {
            $operation->setAppLabel($this->getAppLabel());
            $operation->updateState($newState);
        }

        return $newState;
    }
public function updateState($state, $preserveState = true)
    {
        $newState = $state;
        if ($preserveState) {
            $newState = $state->deepClone();
        }

        /** @var $operation Operation */
        foreach ($this->operations as $operation) {
            $operation->setAppLabel($this->getAppLabel());
            $operation->updateState($newState);
        }

        return $newState;
    }
public function updateState ( $ state , $ preserveState = true ) { $ newState = $ state ; if ( $ preserveState ) { $ newState = $ state -> deepClone ( ) ; } /** @var $operation Operation */ foreach ( $ this -> operations as $ operation ) { $ operation -> setAppLabel ( $ this -> getAppLabel ( ) ) ; $ operation -> updateState ( $ newState ) ; } return $ newState ; }
Takes a ProjectState and returns a new one with the migration's
operations applied to it.

Preserves the original object state by default and will return a
mutated state from a copy.

@param ProjectState $state
@param bool|true    $preserveState

@return mixed

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>

@throws \Eddmash\PowerOrm\Exception\NotImplemented
Takes a ProjectState and returns a new one with the migration s operations applied to it .