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 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