SafeurlServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 45
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 1
A register() 0 6 1
A provides() 0 4 1
1
<?php
2
3
namespace Jaybizzle\Safeurl;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class SafeurlServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Indicates if loading of the provider is deferred.
11
     *
12
     * @var bool
13
     */
14
    protected $defer = false;
15
16
    /**
17
     * Bootstrap the application events.
18
     *
19
     * @return void
20
     */
21
    public function boot()
22
    {
23
        $this->publishes([
24
            __DIR__.'/../../config/config.php' => base_path('config/safeurl.php'),
25
        ]);
26
27
        $this->mergeConfigFrom(__DIR__.'/../../config/config.php', 'safeurl');
28
    }
29
30
    /**
31
     * Register the service provider.
32
     *
33
     * @return void
34
     */
35
    public function register()
36
    {
37
        $this->app->singleton('safeurl', function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
38
            return new Safeurl();
39
        });
40
    }
41
42
    /**
43
     * Get the services provided by the provider.
44
     *
45
     * @return array
46
     */
47
    public function provides()
48
    {
49
        return [];
50
    }
51
}
52