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

LERNServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 92.31%

Importance

Changes 5
Bugs 1 Features 1
Metric Value
wmc 2
c 5
b 1
f 1
lcom 1
cbo 3
dl 0
loc 19
rs 10
ccs 12
cts 13
cp 0.9231

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
A boot() 0 8 1
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
}