Code Duplication    Length = 8-9 lines in 2 locations

src/DI/MigrationsExtension.php 2 locations

@@ 129-137 (lines=9) @@
126
	}
127
128
129
	private function setConfigurationToCommands()
130
	{
131
		$containerBuilder = $this->getContainerBuilder();
132
		$configurationDefinition = $containerBuilder->getDefinition($containerBuilder->getByType(Configuration::class));
133
134
		foreach ($containerBuilder->findByType(AbstractCommand::class) as $commandDefinition) {
135
			$commandDefinition->addSetup('setMigrationConfiguration', ['@' . $configurationDefinition->getClass()]);
136
		}
137
	}
138
139
140
	private function loadCommandsToApplication()
@@ 140-147 (lines=8) @@
137
	}
138
139
140
	private function loadCommandsToApplication()
141
	{
142
		$containerBuilder = $this->getContainerBuilder();
143
		$applicationDefinition = $containerBuilder->getDefinition($containerBuilder->getByType(Application::class));
144
		foreach ($containerBuilder->findByType(AbstractCommand::class) as $name => $commandDefinition) {
145
			$applicationDefinition->addSetup('add', ['@' . $name]);
146
		}
147
	}
148
149
150
	/**