ArtisanGuiServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 10
cts 10
cp 1
rs 9.7998
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2
1
<?php
2
3
namespace Bmatovu\ArtisanGui;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ArtisanGuiServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14 6
    public function boot()
15
    {
16 6
        if ($this->app->runningInConsole()) {
17 6
            $this->publishes([
18 6
                __DIR__.'/../config/artisan-gui.php' => config_path('artisan-gui.php'),
19 6
            ], 'artisan-gui-config');
20
21 6
            $this->publishes([
22 6
                __DIR__.'/../resources/js/components' => base_path('resources/js/components/artisan-gui'),
23 6
            ], 'artisan-gui-components');
24
        }
25
26 6
        $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
27 6
    }
28
29
    /**
30
     * Register the application services.
31
     *
32
     * @return void
33
     */
34 6
    public function register()
35
    {
36 6
        $this->mergeConfigFrom(__DIR__.'/../config/artisan-gui.php', 'artisan-gui');
37 6
    }
38
}
39