PhpIPAMServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 7
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
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