ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 6
nc 2
nop 0
dl 0
loc 9
ccs 7
cts 7
cp 1
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace LaravelDownloadUtil;
4
5
use LaravelDownloadUtil\Console\Commands\PruneOutdatedFiles;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9 8
    public function boot()
10
    {
11 8
        if ($this->app->runningInConsole()) {
12 8
            $this->publishes([
13 8
                __DIR__.'/../config/download-util.php' => config_path('download-util.php'),
14 8
            ], 'config');
15
16 8
            $this->commands([
17 8
                PruneOutdatedFiles::class,
18 8
            ]);
19
        }
20
    }
21
22
    /**
23
     * @inheritDoc
24
     */
25 8
    public function register()
26
    {
27 8
        $this->mergeConfigFrom(__DIR__.'/../config/download-util.php', 'download-util');
28
    }
29
}
30