Completed
Push — master ( 4eb77d...f30482 )
by ARCANEDEV
09:06 queued 13s
created

CommandServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Foundation\Providers;
2
3
use Arcanedev\Support\Providers\CommandServiceProvider as ServiceProvider;
4
5
/**
6
 * Class     CommandServiceProvider
7
 *
8
 * @package  Arcanesoft\Foundation\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 12
    public function register()
21
    {
22 12
        $this->registerPublishCommand();
23
24 12
        $this->commands($this->commands);
25 12
    }
26
27
    /**
28
     * Get the provided commands.
29
     *
30
     * @return array
31
     */
32
    public function provides()
33
    {
34
        return [
35
            \Arcanesoft\Foundation\Console\PublishCommand::class,
36
        ];
37
    }
38
39
    /* ------------------------------------------------------------------------------------------------
40
     |  Commands Functions
41
     | ------------------------------------------------------------------------------------------------
42
     */
43
    /**
44
     * Register publish command.
45
     */
46 12
    private function registerPublishCommand()
47
    {
48 12
        $this->singleton(
49 12
            'arcanesoft.foundation.commands.publish',
50
            \Arcanesoft\Foundation\Console\PublishCommand::class
51 12
        );
52
53 12
        $this->commands[] = \Arcanesoft\Foundation\Console\PublishCommand::class;
54 12
    }
55
}
56