Completed
Push — master ( 248e12...0fb364 )
by ARCANEDEV
03:19
created

CommandServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 76.92%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 45
ccs 10
cts 13
cp 0.7692
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A provides() 0 6 1
A registerPublishCommand() 0 9 1
1
<?php namespace Arcanesoft\Auth\Providers;
2
3
use Arcanedev\Support\Providers\CommandServiceProvider as ServiceProvider;
4
5
/**
6
 * Class     CommandServiceProvider
7
 *
8
 * @package  Arcanesoft\Auth\Providers
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class CommandServiceProvider extends ServiceProvider
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Main Functions
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Register the service provider.
19
     */
20 9
    public function register()
21
    {
22 9
        $this->registerPublishCommand();
23
24 9
        $this->commands($this->commands);
25 9
    }
26
27
    /**
28
     * Get the provided commands.
29
     *
30
     * @return array
31
     */
32
    public function provides()
33
    {
34
        return [
35
            'arcanesoft.auth.commands.publish',
36
        ];
37
    }
38
39
    /* ------------------------------------------------------------------------------------------------
40
     |  Command Functions
41
     | ------------------------------------------------------------------------------------------------
42
     */
43
    /**
44
     * Register the publish command.
45
     */
46 9
    private function registerPublishCommand()
47
    {
48 9
        $this->app->singleton(
49 9
            'arcanesoft.auth.commands.publish',
50
            \Arcanesoft\Auth\Console\PublishCommand::class
51 9
        );
52
53 9
        $this->commands[] = \Arcanesoft\Auth\Console\PublishCommand::class;
54 9
    }
55
}
56