UssdServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Bmatovu\Ussd;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class UssdServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12 49
    public function boot()
13
    {
14 49
        if ($this->app->runningInConsole()) {
15 49
            $this->publishes([
16 49
                __DIR__.'/../config/ussd.php' => config_path('ussd.php'),
17 49
            ], 'ussd-config');
18
19 49
            $this->publishes([
20 49
                __DIR__.'/../menus/menu.xsd' => menu_path('menu.xsd'),
21 49
            ], 'ussd-schema');
22
23 49
            $this->publishes([
24 49
                __DIR__.'/../bin/simulator.json' => base_path('simulator.json'),
25 49
            ], 'ussd-simulator');
26
27 49
            $this->commands([
28 49
                Commands\Validate::class,
29 49
            ]);
30
        }
31
    }
32
33
    /**
34
     * Register the application services.
35
     */
36 49
    public function register()
37
    {
38 49
        $this->mergeConfigFrom(__DIR__.'/../config/ussd.php', 'ussd');
39
    }
40
}
41