XdebugToggleServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 9 2
A register() 0 3 1
1
<?php
2
3
namespace Tpaksu\XdebugToggle;
4
5
use Illuminate\Support\ServiceProvider;
6
use Tpaksu\XdebugToggle\Commands\XdebugToggle;
7
8
class XdebugToggleServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->publishes([
18
            __DIR__ . "/config/xdebug-toggle.php" => config_path('xdebug-toggle.php'),
19
        ], "config");
20
21
        if ($this->app->runningInConsole()) {
22
            $this->commands([
23
                XdebugToggle::class,
24
            ]);
25
        }
26
    }
27
28
    public function register()
29
    {
30
        $this->mergeConfigFrom(__DIR__ . "/config/xdebug-toggle.php", "xdebugtoggle");
31
    }
32
}
33