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

LodashServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 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