Code Duplication    Length = 9-12 lines in 8 locations

src/Providers/ApplicationServiceProvider.php 8 locations

@@ 130-138 (lines=9) @@
127
	 *
128
	 * @since   1.0
129
	 */
130
	public function getCacheClearCommandService(Container $container) : AppCommands\Cache\ClearCommand
131
	{
132
		$command = new AppCommands\Cache\ClearCommand($container->get(CacheItemPoolInterface::class));
133
134
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
135
		$command->setInput($container->get(Input::class));
136
137
		return $command;
138
	}
139
140
	/**
141
	 * Get the CLI application service
@@ 266-274 (lines=9) @@
263
	 *
264
	 * @since   1.0
265
	 */
266
	public function getDatabaseStatusCommandService(Container $container) : AppCommands\Database\StatusCommand
267
	{
268
		$command = new AppCommands\Database\StatusCommand($container->get(Migrations::class));
269
270
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
271
		$command->setInput($container->get(Input::class));
272
273
		return $command;
274
	}
275
276
	/**
277
	 * Get the DisplayControllerGet class service
@@ 285-296 (lines=12) @@
282
	 *
283
	 * @since   1.0
284
	 */
285
	public function getDisplayControllerGetService(Container $container) : DisplayControllerGet
286
	{
287
		$controller = new DisplayControllerGet(
288
			$container->get(StatsJsonView::class),
289
			$container->get(CacheItemPoolInterface::class)
290
		);
291
292
		$controller->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
293
		$controller->setInput($container->get(Input::class));
294
295
		return $controller;
296
	}
297
298
	/**
299
	 * Get the HelpCommand class service
@@ 354-362 (lines=9) @@
351
	 *
352
	 * @since   1.0
353
	 */
354
	public function getInstallCommandService(Container $container) : AppCommands\InstallCommand
355
	{
356
		$command = new AppCommands\InstallCommand($container->get(DatabaseDriver::class));
357
358
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
359
		$command->setInput($container->get(Input::class));
360
361
		return $command;
362
	}
363
364
	/**
365
	 * Get the router service
@@ 395-403 (lines=9) @@
392
	 *
393
	 * @since   1.0
394
	 */
395
	public function getSnapshotCommandService(Container $container) : AppCommands\SnapshotCommand
396
	{
397
		$command = new AppCommands\SnapshotCommand($container->get(StatsJsonView::class));
398
399
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
400
		$command->setInput($container->get(Input::class));
401
402
		return $command;
403
	}
404
405
	/**
406
	 * Get the StatsJsonView class service
@@ 446-456 (lines=11) @@
443
	 *
444
	 * @since   1.0
445
	 */
446
	public function getSubmitControllerCreateService(Container $container) : SubmitControllerCreate
447
	{
448
		$controller = new SubmitControllerCreate(
449
			$container->get(StatsModel::class)
450
		);
451
452
		$controller->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
453
		$controller->setInput($container->get(Input::class));
454
455
		return $controller;
456
	}
457
458
	/**
459
	 * Get the SubmitControllerGet class service
@@ 486-494 (lines=9) @@
483
	 *
484
	 * @since   1.0
485
	 */
486
	public function getTagsJoomlaCommandService(Container $container) : AppCommands\Tags\JoomlaCommand
487
	{
488
		$command = new AppCommands\Tags\JoomlaCommand($container->get(GitHub::class));
489
490
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
491
		$command->setInput($container->get(Input::class));
492
493
		return $command;
494
	}
495
496
	/**
497
	 * Get the Tags\PhpCommand class service
@@ 505-513 (lines=9) @@
502
	 *
503
	 * @since   1.0
504
	 */
505
	public function getTagsPhpCommandService(Container $container) : AppCommands\Tags\PhpCommand
506
	{
507
		$command = new AppCommands\Tags\PhpCommand($container->get(GitHub::class));
508
509
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
510
		$command->setInput($container->get(Input::class));
511
512
		return $command;
513
	}
514
515
	/**
516
	 * Get the UpdateCommand class service