GeoLocationServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Psonrie\GeoLocation;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class GeoLocationServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Boot operations.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $config = __DIR__ . '/Config/config.php';
17
18
        $this->publishes(
19
            [
20
                $config => config_path('geo-location.php'),
21
            ]
22
        );
23
24
        $this->mergeConfigFrom($config, 'geo-location');
25
    }
26
27
    /**
28
     * Register the geo-location binding.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        $this->app->bind('geo-location', GeoLocation::class);
35
    }
36
37
    /**
38
     * Get the services provided by the provider.
39
     *
40
     * @return array
41
     */
42
    public function provides()
43
    {
44
        return ['geo-location'];
45
    }
46
}
47