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

CommandServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

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 1
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\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