LaravelSchematicsServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 40
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 22 2
1
<?php
2
3
namespace Mtolhuys\LaravelSchematics;
4
5
use Illuminate\Support\ServiceProvider;
6
use Mtolhuys\LaravelSchematics\Console\Commands\Install;
7
8
class LaravelSchematicsServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Perform post-registration booting of services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        if ($this->app->runningInConsole()) {
18
            $this->commands([
19
                Install::class,
20
            ]);
21
        }
22
23
        $this->loadRoutesFrom(__DIR__.'/routes.php');
24
25
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'schematics');
26
27
        $this->publishes([
28
            __DIR__.'/../config/schematics.php' => config_path('schematics.php'),
29
        ]);
30
31
        $this->publishes([
32
            __DIR__.'/../dist' => public_path('vendor/schematics'),
33
            __DIR__.'/../resources/images/plumb-arrows' => public_path('vendor/schematics/images'),
34
            __DIR__.'/../resources/images/icons' => public_path('vendor/schematics/images'),
35
        ], 'public');
36
    }
37
38
    /**
39
     * Register any package services.
40
     *
41
     * @return void
42
     */
43
    public function register()
44
    {
45
        $this->mergeConfigFrom(__DIR__.'/../config/schematics.php', 'schematics');
46
    }
47
}
48