GlideServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 8 1
A provides() 0 4 1
1
<?php
2
3
namespace Spatie\Glide;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class GlideServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application events.
11
     */
12
    public function boot()
13
    {
14
        $this->publishes([
15
            __DIR__.'/../config/laravel-glide.php' => $this->app->configPath().'/'.'laravel-glide.php',
16
        ], 'config');
17
    }
18
19
    /**
20
     * Register the service provider.
21
     */
22
    public function register()
23
    {
24
        $this->mergeConfigFrom(__DIR__.'/../config/laravel-glide.php', 'laravel-glide');
25
26
        $this->app->bind('laravel-glide-image', function () {
27
            return new GlideImage();
28
        });
29
    }
30
31
    /**
32
     * Get the services provided by the provider.
33
     */
34
    public function provides() : array
35
    {
36
        return ['laravel-glide-image'];
37
    }
38
}
39