Code Duplication    Length = 12-12 lines in 2 locations

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

Command/GenerateCommand.php 1 location

@@ 291-302 (lines=12) @@
288
    }
289
290
    /// @todo move somewhere else. Maybe to the MigrationService itself ?
291
    protected function getGeneratingExecutors()
292
    {
293
        $migrationService = $this->getMigrationService();
294
        $executors = $migrationService->listExecutors();
295
        foreach($executors as $key => $name) {
296
            $executor = $migrationService->getExecutor($name);
297
            if (!$executor instanceof MigrationGeneratorInterface) {
298
                unset($executors[$key]);
299
            }
300
        }
301
        return $executors;
302
    }
303
304
    /**
305
     * @see MigrationService::migrationContextFromParameters