Upload   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 85.71%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 24
rs 10
c 0
b 0
f 0
ccs 12
cts 14
cp 0.8571

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 11 1
A boot() 0 9 1
1
<?php
2
3
namespace LeadThread\Upload\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use LeadThread\Upload\Upload as UploadMaster;
7
8
class Upload extends ServiceProvider
9
{
10 24
    public function register()
11
    {
12 24
        $this->mergeConfigFrom(__DIR__ . '/../../config/upload.php', 'upload');
13
14 24
        $this->app->singleton(
15 24
            'upload',
16
            function () {
17
                return new UploadMaster;
18
            }
19 24
        );
20 24
    }
21
22 24
    public function boot()
23
    {
24 24
        $this->publishes(
25
            [
26 24
            __DIR__ . '/../../config/upload.php' => base_path('config/upload.php'),
27 24
            __DIR__ . '/../../migrations/2016_01_01_000000_create_uploads_tables.php' => base_path('database/migrations/2016_01_01_000000_create_uploads_tables.php'),
28
            ]
29 24
        );
30 24
    }
31
}
32