ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

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