Code Duplication    Length = 12-12 lines in 2 locations

src/Phinx/Db/Plan/Plan.php 2 locations

@@ 137-148 (lines=12) @@
134
     * @param AdapterInterface $executor The executor object for the plan
135
     * @return void
136
     */
137
    public function execute(AdapterInterface $executor)
138
    {
139
        foreach ($this->tableCreates as $newTable) {
140
            $executor->createTable($newTable->getTable(), $newTable->getColumns(), $newTable->getIndexes());
141
        }
142
143
        collection($this->updatesSequence())
144
            ->unfold()
145
            ->each(function ($updates) use ($executor) {
146
                $executor->executeActions($updates->getTable(), $updates->getActions());
147
            });
148
    }
149
150
    /**
151
     * Executes the inverse plan (rollback the actions) with the given AdapterInterface:w
@@ 156-167 (lines=12) @@
153
     * @param AdapterInterface $executor The executor object for the plan
154
     * @return void
155
     */
156
    public function executeInverse(AdapterInterface $executor)
157
    {
158
        collection(array_reverse($this->updatesSequence()))
159
            ->unfold()
160
            ->each(function ($updates) use ($executor) {
161
                $executor->executeActions($updates->getTable(), $updates->getActions());
162
            });
163
164
        foreach ($this->tableCreates as $newTable) {
165
            $executor->createTable($newTable->getTable(), $newTable->getColumns(), $newTable->getIndexes());
166
        }
167
    }
168
169
    /**
170
     * Deletes certain actions from the plan if they are found to be conflicting or redundant.