UssdServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 3
eloc 14
dl 0
loc 32
ccs 16
cts 16
cp 1
rs 10
c 5
b 0
f 0

2 Methods

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