ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 33
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 3 1
A publishedConfig() 0 5 1
A register() 0 6 1
1
<?php
2
3
namespace Fomvasss\LaravelEUS;
4
5
use Fomvasss\LaravelEUS\EUSGenerator;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9
    protected $defer = false;
10
    
11
    /**
12
     * Bootstrap the application services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        $this->publishedConfig();
19
    }
20
21
    /**
22
     * Register the application services.
23
     *
24
     * @return void
25
     */
26
    public function register()
27
    {
28
        $this->mergeConfigFrom(__DIR__.'/../config/eus.php', 'eus');
29
30
        $this->app->bind(\Fomvasss\LaravelEUS\Contracts\EUSGenerator::class, function () {
31
            return new EUSGenerator($this->app);
32
        });
33
    }
34
35
    protected function publishedConfig()
36
    {
37
        $this->publishes([
38
            __DIR__.'/../config/eus.php' => config_path('eus.php')
0 ignored issues
show
Bug introduced by
The function config_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

38
            __DIR__.'/../config/eus.php' => /** @scrutinizer ignore-call */ config_path('eus.php')
Loading history...
39
        ], 'eus');
40
    }
41
}
42