ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 0
f 0
dl 0
loc 22
ccs 10
cts 10
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 2
A register() 0 3 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