Upload::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
ccs 6
cts 6
cp 1
cc 1
eloc 4
nc 1
nop 0
crap 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