ServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Tylercd100\Placeholders;
4
5
use Illuminate\Support\ServiceProvider as IlluminateProvider;
6
use Tylercd100\Placeholders\Placeholders;
7
8
class ServiceProvider extends IlluminateProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = true;
16
17
    /**
18
     * Bootstrap the application events.
19
     *
20
     * @return void
21
     */
22 18
    public function boot()
23
    {
24 18
        $this->publishes([
25 18
            __DIR__ . '/../config/placeholders.php' => base_path('config/placeholders.php'),
26 18
        ]);
27 18
    }
28
29
    /**
30
     * Register the service provider.
31
     *
32
     * @return void
33
     */
34 18
    public function register()
35
    {
36 18
        $this->mergeConfigFrom(__DIR__ . '/../config/placeholders.php', 'placeholders');
37 18
        $this->app->singleton("placeholders", 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 18
            return new Placeholders(config('placeholders'));
39 18
        });
40 18
    }
41
42
    /**
43
     * Get the services provided by the provider.
44
     *
45
     * @return array
46
     */
47
    public function provides()
48
    {
49
        return ["placeholders"];
50
    }
51
}
52