Code Duplication    Length = 12-12 lines in 2 locations

Command/GenerateCommand.php 1 location

@@ 303-314 (lines=12) @@
300
    }
301
302
    /// @todo move somewhere else. Maybe to the MigrationService itself ?
303
    protected function getGeneratingExecutors()
304
    {
305
        $migrationService = $this->getMigrationService();
306
        $executors = $migrationService->listExecutors();
307
        foreach($executors as $key => $name) {
308
            $executor = $migrationService->getExecutor($name);
309
            if (!$executor instanceof MigrationGeneratorInterface) {
310
                unset($executors[$key]);
311
            }
312
        }
313
        return $executors;
314
    }
315
316
    /**
317
     * @see MigrationService::migrationContextFromParameters

Core/Executor/MigrationDefinitionExecutor.php 1 location

@@ 147-158 (lines=12) @@
144
     * @todo cache this for faster access
145
     * @return array
146
     */
147
    protected function getGeneratingExecutors()
148
    {
149
        $migrationService = $this->migrationService;
150
        $executors = $migrationService->listExecutors();
151
        foreach($executors as $key => $name) {
152
            $executor = $migrationService->getExecutor($name);
153
            if (!$executor instanceof MigrationGeneratorInterface) {
154
                unset($executors[$key]);
155
            }
156
        }
157
        return $executors;
158
    }
159
}
160