Completed
Push — master ( be2084...2de7fc )
by Zura
23s
created

PromocodesServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 10
rs 9.9332
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gabievi\Promocodes;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class PromocodesServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__ . '/../config/promocodes.php' => config_path('promocodes.php'),
18
        ]);
19
20
        $this->publishes([
21
            __DIR__ . '/../migrations' => database_path('migrations'),
22
        ], 'migrations');
23
    }
24
25
    /**
26
     * Register the application services.
27
     *
28
     * @return void
29
     */
30
    public function register()
31
    {
32
        $this->mergeConfigFrom(
33
            __DIR__ . '/../config/promocodes.php', 'promocodes'
34
        );
35
36
        $this->app->singleton('promocodes', 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...
37
            return new Promocodes();
38
        });
39
    }
40
}
41