Completed
Push — master ( 0fb364...394917 )
by ARCANEDEV
03:03
created

CommandServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4286
cc 1
eloc 4
nc 1
nop 0
crap 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 18
    public function register()
21
    {
22 18
        $this->registerPublishCommand();
23 18
        $this->registerSetupCommand();
24
25 18
        $this->commands($this->commands);
26 18
    }
27
28
    /**
29
     * Get the provided commands.
30
     *
31
     * @return array
32
     */
33 3
    public function provides()
34
    {
35
        return [
36 3
            'arcanesoft.auth.commands.publish',
37 3
            'arcanesoft.auth.commands.setup',
38 3
        ];
39
    }
40
41
    /* ------------------------------------------------------------------------------------------------
42
     |  Command Functions
43
     | ------------------------------------------------------------------------------------------------
44
     */
45
    /**
46
     * Register the publish command.
47
     */
48 18
    private function registerPublishCommand()
49
    {
50 18
        $this->app->singleton(
51 18
            'arcanesoft.auth.commands.publish',
52
            \Arcanesoft\Auth\Console\PublishCommand::class
53 18
        );
54
55 18
        $this->commands[] = \Arcanesoft\Auth\Console\PublishCommand::class;
56 18
    }
57
58
    /**
59
     * Register the setup command.
60
     */
61 18
    private function registerSetupCommand()
62
    {
63 18
        $this->app->singleton(
64 18
            'arcanesoft.auth.commands.setup',
65
            \Arcanesoft\Auth\Console\SetupCommand::class
66 18
        );
67
68 18
        $this->commands[] = \Arcanesoft\Auth\Console\SetupCommand::class;
69 18
    }
70
}
71