Code Duplication    Length = 9-12 lines in 8 locations

src/Providers/ApplicationServiceProvider.php 8 locations

@@ 122-130 (lines=9) @@
119
	 *
120
	 * @return  AppCommands\Cache\ClearCommand
121
	 */
122
	public function getCacheClearCommandService(Container $container) : AppCommands\Cache\ClearCommand
123
	{
124
		$command = new AppCommands\Cache\ClearCommand($container->get(CacheItemPoolInterface::class));
125
126
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
127
		$command->setInput($container->get(Input::class));
128
129
		return $command;
130
	}
131
132
	/**
133
	 * Get the CLI application service
@@ 244-252 (lines=9) @@
241
	 *
242
	 * @return  AppCommands\Database\StatusCommand
243
	 */
244
	public function getDatabaseStatusCommandService(Container $container) : AppCommands\Database\StatusCommand
245
	{
246
		$command = new AppCommands\Database\StatusCommand($container->get(Migrations::class));
247
248
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
249
		$command->setInput($container->get(Input::class));
250
251
		return $command;
252
	}
253
254
	/**
255
	 * Get the DisplayControllerGet class service
@@ 261-272 (lines=12) @@
258
	 *
259
	 * @return  DisplayControllerGet
260
	 */
261
	public function getDisplayControllerGetService(Container $container) : DisplayControllerGet
262
	{
263
		$controller = new DisplayControllerGet(
264
			$container->get(StatsJsonView::class),
265
			$container->get(CacheItemPoolInterface::class)
266
		);
267
268
		$controller->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
269
		$controller->setInput($container->get(Input::class));
270
271
		return $controller;
272
	}
273
274
	/**
275
	 * Get the HelpCommand class service
@@ 322-330 (lines=9) @@
319
	 *
320
	 * @return  AppCommands\InstallCommand
321
	 */
322
	public function getInstallCommandService(Container $container) : AppCommands\InstallCommand
323
	{
324
		$command = new AppCommands\InstallCommand($container->get(DatabaseDriver::class));
325
326
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
327
		$command->setInput($container->get(Input::class));
328
329
		return $command;
330
	}
331
332
	/**
333
	 * Get the router service
@@ 359-367 (lines=9) @@
356
	 *
357
	 * @return  AppCommands\SnapshotCommand
358
	 */
359
	public function getSnapshotCommandService(Container $container) : AppCommands\SnapshotCommand
360
	{
361
		$command = new AppCommands\SnapshotCommand($container->get(StatsJsonView::class));
362
363
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
364
		$command->setInput($container->get(Input::class));
365
366
		return $command;
367
	}
368
369
	/**
370
	 * Get the StatsJsonView class service
@@ 404-414 (lines=11) @@
401
	 *
402
	 * @return  SubmitControllerCreate
403
	 */
404
	public function getSubmitControllerCreateService(Container $container) : SubmitControllerCreate
405
	{
406
		$controller = new SubmitControllerCreate(
407
			$container->get(StatsModel::class)
408
		);
409
410
		$controller->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
411
		$controller->setInput($container->get(Input::class));
412
413
		return $controller;
414
	}
415
416
	/**
417
	 * Get the SubmitControllerGet class service
@@ 440-448 (lines=9) @@
437
	 *
438
	 * @return  AppCommands\Tags\JoomlaCommand
439
	 */
440
	public function getTagsJoomlaCommandService(Container $container) : AppCommands\Tags\JoomlaCommand
441
	{
442
		$command = new AppCommands\Tags\JoomlaCommand($container->get(GitHub::class));
443
444
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
445
		$command->setInput($container->get(Input::class));
446
447
		return $command;
448
	}
449
450
	/**
451
	 * Get the Tags\PhpCommand class service
@@ 457-465 (lines=9) @@
454
	 *
455
	 * @return  AppCommands\Tags\PhpCommand
456
	 */
457
	public function getTagsPhpCommandService(Container $container) : AppCommands\Tags\PhpCommand
458
	{
459
		$command = new AppCommands\Tags\PhpCommand($container->get(GitHub::class));
460
461
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
462
		$command->setInput($container->get(Input::class));
463
464
		return $command;
465
	}
466
467
	/**
468
	 * Get the UpdateCommand class service