Code Duplication    Length = 9-11 lines in 8 locations

src/Providers/ApplicationServiceProvider.php 8 locations

@@ 227-235 (lines=9) @@
224
	 *
225
	 * @return  AppCommands\Database\StatusCommand
226
	 */
227
	public function getDatabaseStatusCommandService(Container $container) : AppCommands\Database\StatusCommand
228
	{
229
		$command = new AppCommands\Database\StatusCommand($container->get(Migrations::class));
230
231
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
232
		$command->setInput($container->get(Input::class));
233
234
		return $command;
235
	}
236
237
	/**
238
	 * Get the DisplayControllerCreate class service
@@ 261-271 (lines=11) @@
258
	 *
259
	 * @return  DisplayControllerGet
260
	 */
261
	public function getDisplayControllerGetService(Container $container) : DisplayControllerGet
262
	{
263
		$controller = new DisplayControllerGet(
264
			$container->get(StatsJsonView::class)
265
		);
266
267
		$controller->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
268
		$controller->setInput($container->get(Input::class));
269
270
		return $controller;
271
	}
272
273
	/**
274
	 * Get the HelpCommand class service
@@ 321-329 (lines=9) @@
318
	 *
319
	 * @return  AppCommands\InstallCommand
320
	 */
321
	public function getInstallCommandService(Container $container) : AppCommands\InstallCommand
322
	{
323
		$command = new AppCommands\InstallCommand($container->get(DatabaseDriver::class));
324
325
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
326
		$command->setInput($container->get(Input::class));
327
328
		return $command;
329
	}
330
331
	/**
332
	 * Get the router service
@@ 358-366 (lines=9) @@
355
	 *
356
	 * @return  AppCommands\SnapshotCommand
357
	 */
358
	public function getSnapshotCommandService(Container $container) : AppCommands\SnapshotCommand
359
	{
360
		$command = new AppCommands\SnapshotCommand($container->get(StatsJsonView::class));
361
362
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
363
		$command->setInput($container->get(Input::class));
364
365
		return $command;
366
	}
367
368
	/**
369
	 * Get the RecentCommand class service
@@ 375-383 (lines=9) @@
372
	 *
373
	 * @return  AppCommands\Snapshot\RecentCommand
374
	 */
375
	public function getSnapshotRecentCommandService(Container $container) : AppCommands\Snapshot\RecentCommand
376
	{
377
		$command = new AppCommands\Snapshot\RecentCommand($container->get(StatsJsonView::class));
378
379
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
380
		$command->setInput($container->get(Input::class));
381
382
		return $command;
383
	}
384
385
	/**
386
	 * Get the StatsJsonView class service
@@ 420-430 (lines=11) @@
417
	 *
418
	 * @return  SubmitControllerCreate
419
	 */
420
	public function getSubmitControllerCreateService(Container $container) : SubmitControllerCreate
421
	{
422
		$controller = new SubmitControllerCreate(
423
			$container->get(StatsModel::class)
424
		);
425
426
		$controller->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
427
		$controller->setInput($container->get(Input::class));
428
429
		return $controller;
430
	}
431
432
	/**
433
	 * Get the SubmitControllerGet class service
@@ 456-464 (lines=9) @@
453
	 *
454
	 * @return  AppCommands\Tags\JoomlaCommand
455
	 */
456
	public function getTagsJoomlaCommandService(Container $container) : AppCommands\Tags\JoomlaCommand
457
	{
458
		$command = new AppCommands\Tags\JoomlaCommand($container->get(GitHub::class));
459
460
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
461
		$command->setInput($container->get(Input::class));
462
463
		return $command;
464
	}
465
466
	/**
467
	 * Get the Tags\PhpCommand class service
@@ 473-481 (lines=9) @@
470
	 *
471
	 * @return  AppCommands\Tags\PhpCommand
472
	 */
473
	public function getTagsPhpCommandService(Container $container) : AppCommands\Tags\PhpCommand
474
	{
475
		$command = new AppCommands\Tags\PhpCommand($container->get(GitHub::class));
476
477
		$command->setApplication($container->get(JoomlaApplication\AbstractApplication::class));
478
		$command->setInput($container->get(Input::class));
479
480
		return $command;
481
	}
482
483
	/**
484
	 * Get the UpdateCommand class service