LocationServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 8
Bugs 0 Features 0
Metric Value
wmc 4
eloc 7
c 8
b 0
f 0
dl 0
loc 36
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 9 2
A register() 0 3 1
A provides() 0 3 1
1
<?php
2
3
namespace Stevebauman\Location;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LocationServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Run boot operations.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $config = __DIR__.'/../config/config.php';
17
18
        if ($this->app->runningInConsole()) {
19
            $this->publishes([$config => config_path('location.php')]);
20
        }
21
22
        $this->mergeConfigFrom($config, 'location');
23
    }
24
25
    /**
26
     * Register the location binding.
27
     *
28
     * @return void
29
     */
30
    public function register()
31
    {
32
        $this->app->bind('location', Location::class);
33
    }
34
35
    /**
36
     * Get the services provided by the provider.
37
     *
38
     * @return array
39
     */
40
    public function provides()
41
    {
42
        return ['location'];
43
    }
44
}
45