Completed
Pull Request — master (#10)
by Tyler
02:17
created

LERNServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1.0046

Importance

Changes 4
Bugs 1 Features 1
Metric Value
c 4
b 1
f 1
dl 0
loc 7
ccs 5
cts 6
cp 0.8333
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1.0046
1
<?php
2
3
namespace Tylercd100\LERN;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LERNServiceProvider extends ServiceProvider
8
{
9 54
    public function register() {
10 54
        $this->mergeConfigFrom(__DIR__ . '/../config/lern.php', 'lern');
11
12 54
        $this->app->singleton('lern', function() {
13
            return new LERN;
14 54
        });
15 54
    }
16
17 54
    public function boot()
18
    {
19 54
        $this->publishes([
20 54
            __DIR__ . '/../migrations/2016_03_17_000000_create_lern_tables.php' => base_path('database/migrations/2016_03_17_000000_create_lern_tables.php'),
21 54
            __DIR__ . '/../migrations/2016_03_27_000000_add_user_data_and_url_to_lern_tables.php' => base_path('database/migrations/2016_03_27_000000_add_user_data_and_url_to_lern_tables.php'),
22 54
            __DIR__ . '/../config/lern.php' => base_path('config/lern.php'),
23 54
        ]);   
24
    }
25
}