ConvertImageServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 29
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 9 1
A boot() 0 5 1
1
<?php
2
3
namespace Daaner\ConvertImage;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ConvertImageServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__.'/../config/convert.php' => config_path('convert.php'),
18
        ], 'config');
19
20
    }
21
22
    /**
23
     * Register services.
24
     *
25
     * @return void
26
     */
27
    public function register()
28
    {
29
        $this->mergeConfigFrom(__DIR__.'/../config/convert.php', 'convert');
30
31
        $this->app->singleton('convert', function () {
32
            return $this->app->make(ConvertImage::class);
33
        });
34
35
        $this->app->alias('convert', 'ConvertImage');
36
    }
37
}
38