Code Duplication    Length = 12-12 lines in 2 locations

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

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