ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 18
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 13
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 18
ccs 13
cts 13
cp 1
rs 9.9332
cc 2
nc 2
nop 0
crap 2
1
<?php
2
3
namespace EmailDomain;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7 11
    public function boot()
8
    {
9 11
        if ($this->app->runningInConsole()) {
10 11
            $this->publishes([
11 11
                __DIR__ . '/../config/email-domain.php' => config_path('email-domain.php'),
12 11
            ], 'config');
13
14 11
            $this->publishes([
15 11
                __DIR__ . '/../storage/email-domain' => config('email-domain.storage_path'),
16 11
            ], 'storage');
17
18 11
            $this->commands([
19 11
                //
20 11
            ]);
21
        }
22
23 11
        $this->app->bind('email-domain-checker', function () {
24 9
            return new EmailDomainChecker();
25 11
        });
26
    }
27
28 11
    public function register()
29
    {
30 11
        $this->mergeConfigFrom(__DIR__ . '/../config/email-domain.php', 'email-domain');
31
    }
32
}
33