MockServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 11
dl 0
loc 23
rs 10
c 1
b 0
f 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A register() 0 12 1
1
<?php
2
3
namespace Blok\Mock;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class MockServiceProvider extends ServiceProvider
8
{
9
    const CONFIG_PATH = __DIR__ . '/../config/mock.php';
10
11
    public function boot()
12
    {
13
        $this->publishes([
14
            self::CONFIG_PATH => config_path('mock.php'),
15
        ], 'config');
16
    }
17
18
    public function register()
19
    {
20
        $this->mergeConfigFrom(
21
            self::CONFIG_PATH,
22
            'mock'
23
        );
24
25
        $this->app->bind('mock', function() {
26
            return new Mock();
27
        });
28
29
        $this->loadRoutesFrom(__DIR__ . "/../routes/web.php");
30
    }
31
}
32