ToggleSwitchFieldsServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
eloc 7
c 2
b 1
f 0
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A register() 0 7 1
1
<?php
2
3
namespace SoareCostin\LaravelToggleSwitchFields;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ToggleSwitchFieldsServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        $this->publishes([
12
            __DIR__.'/../config/config.php' => config_path('toggle_switch_fields.php'),
13
        ], 'config');
14
    }
15
16
    public function register()
17
    {
18
        $this->app->bind('laravel-toggle-switch-fields', function () {
19
            return new ToggleSwitchFields();
20
        });
21
22
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'toggle_switch_fields');
23
    }
24
}
25