GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 7270bd...00b768 )
by Shea
08:40 queued 04:07
created

CommandServiceProvider   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 96
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 7

Importance

Changes 3
Bugs 0 Features 3
Metric Value
wmc 7
c 3
b 0
f 3
lcom 1
cbo 7
dl 0
loc 96
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 8 1
A registerDisableCommand() 0 8 1
A registerEnableCommand() 0 8 1
A registerListCommand() 0 8 1
A registerMigrateCommand() 0 8 1
A registerMigrateRefreshCommand() 0 8 1
1
<?php
2
namespace Caffeinated\Modules\Providers;
3
4
use Illuminate\Support\ServiceProvider;
5
6
class CommandServiceProvider extends ServiceProvider
7
{
8
	/**
9
     * Bootstrap the application services.
10
     *
11
     * @return void
12
     */
13
	public function boot()
14
	{
15
		//
16
	}
17
18
	/**
19
     * Register the application services.
20
     *
21
     * @return void
22
     */
23
	public function register()
24
	{
25
		$this->registerDisableCommand();
26
		$this->registerEnableCommand();
27
		$this->registerListCommand();
28
		$this->registerMigrateCommand();
29
		$this->registerMigrateRefreshCommand();
30
	}
31
32
	/**
33
	 * Register the module:disable command.
34
	 *
35
	 * @return void
36
	 */
37
	protected function registerDisableCommand()
38
	{
39
		$this->app->singleton('command.module.disable', function() {
40
			return new \Caffeinated\Modules\Console\Commands\ModuleDisableCommand;
41
		});
42
43
		$this->commands('command.module.disable');
44
	}
45
46
	/**
47
	 * Register the module:enable command.
48
	 *
49
	 * @return void
50
	 */
51
	protected function registerEnableCommand()
52
	{
53
		$this->app->singleton('command.module.enable', function() {
54
			return new \Caffeinated\Modules\Console\Commands\ModuleEnableCommand;
55
		});
56
57
		$this->commands('command.module.enable');
58
	}
59
60
	/**
61
	 * Register the module:list command.
62
	 *
63
	 * @return void
64
	 */
65
	protected function registerListCommand()
66
	{
67
		$this->app->singleton('command.module.list', function($app) {
68
			return new \Caffeinated\Modules\Console\Commands\ModuleListCommand($app['modules']);
69
		});
70
71
		$this->commands('command.module.list');
72
	}
73
74
	/**
75
	 * Register the module:migrate command.
76
	 *
77
	 * @return void
78
	 */
79
	protected function registerMigrateCommand()
80
	{
81
		$this->app->singleton('command.module.migrate', function($app) {
82
			return new \Caffeinated\Modules\Console\Commands\ModuleMigrateCommand($app['migrator'], $app['modules']);
83
		});
84
85
		$this->commands('command.module.migrate');
86
	}
87
88
	/**
89
	 * Register the module:migrate:refresh command.
90
	 *
91
	 * @return void
92
	 */
93
	protected function registerMigrateRefreshCommand()
94
	{
95
		$this->app->singleton('command.module.migrate.refresh', function() {
96
			return new \Caffeinated\Modules\Console\Commands\ModuleMigrateRefreshCommand;
97
		});
98
99
		$this->commands('command.module.migrate.refresh');
100
	}
101
}
102