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

PromocodesServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
A register() 0 10 1
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