Completed
Push — master ( b56a59...34b930 )
by Avtandil
04:51
created

LodashServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 90%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 24
ccs 9
cts 10
cp 0.9
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 14 1
1
<?php
2
/*
3
 * This file is part of the Laravel Lodash package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
declare(strict_types=1);
11
12
namespace Longman\LaravelLodash;
13
14
use Illuminate\Support\ServiceProvider;
15
use Longman\LaravelLodash\Commands\ClearAllCommand;
16
17
class LodashServiceProvider extends ServiceProvider
18
{
19 3
    public function boot()
20
    {
21 3
        $this->publishes([
22 3
            __DIR__ . '/../config/config.php' => config_path('lodash.php'),
23
        ]);
24 3
    }
25
26 3
    public function register()
27
    {
28
29 3
        $this->app->singleton(
30 3
            'command.lodash.clear-all',
31 3
            function () {
32
                return new ClearAllCommand();
33 3
            }
34
        );
35
36
        $this->commands([
37
            'command.lodash.clear-all',
38
        ]);
39
    }
40
}
41