ServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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