LeafletServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 3
1
<?php
2
3
namespace Bavix\Leaflet;
4
5
use Encore\Admin\Form;
6
use Illuminate\Support\ServiceProvider;
7
8
class LeafletServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function boot(Leaflet $extension)
14
    {
15
        if (!Leaflet::boot()) {
16
            return;
17
        }
18
19
        if ($views = $extension->views()) {
20
            $this->loadViewsFrom($views, 'laravel-admin-leaflet');
21
        }
22
23
        $this->app->booted(function() {
24
            Form::extend('leaflet', LeafletMap::class);
25
        });
26
    }
27
}
28