PhpIPAMServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 9
dl 0
loc 20
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
A boot() 0 8 2
1
<?php
2
3
namespace Axsor\PhpIPAM;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class PhpIPAMServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        $this->publishes([
12
            __DIR__.'/../config/phpipam.php' => base_path('config/phpipam.php'),
13
        ], 'config');
14
15
        if (file_exists($file = __DIR__.'/helpers.php')) {
16
            require_once $file;
17
        }
18
    }
19
20
    public function register()
21
    {
22
        $this->app->bind('phpipam', function () {
23
            return new PhpIPAM();
24
        });
25
26
        $this->mergeConfigFrom(__DIR__.'/../config/phpipam.php', 'phpipam');
27
    }
28
}
29