ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 13
c 2
b 0
f 0
dl 0
loc 27
ccs 16
cts 16
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 17 2
A register() 0 6 1
1
<?php
2
3
namespace SimpleImageManager;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7 20
    public function boot()
8
    {
9 20
        if ($this->app->runningInConsole()) {
10 20
            $this->publishes([
11 20
                __DIR__ . '/../config/simple-image-manager.php' => config_path('simple-image-manager.php'),
12 20
            ], 'config');
13
14 20
            $this->publishes([
15 20
                __DIR__ . '/../resources/views' => resource_path('views/vendor/simple-image-manager'),
16 20
            ], 'views');
17
18 20
            $this->commands([
19 20
                //
20 20
            ]);
21
        }
22
23 20
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'simple-image-manager');
24
    }
25
26 20
    public function register()
27
    {
28 20
        $this->mergeConfigFrom(__DIR__ . '/../config/simple-image-manager.php', 'simple-image-manager');
29
30 20
        $this->app->bind('simple-image-manager', function ($app) {
31 13
            return new SimpleImageManager($app);
32 20
        });
33
    }
34
}
35