TinkerServerServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
1
<?php
2
3
namespace RedMoon\TinkerServer;
4
5
use Illuminate\Support\ServiceProvider;
6
use RedMoon\TinkerServer\Console\TinkerServerCommand;
7
8
class TinkerServerServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        if ($this->app->runningInConsole()) {
16
            $this->publishes([
17
                __DIR__.'/../config/config.php' => config_path('tinker-server.php'),
18
            ], 'config');
19
20
            // Registering package commands.
21
            $this->commands([
22
                TinkerServerCommand::class,
23
            ]);
24
        }
25
    }
26
27
    /**
28
     * Register the application services.
29
     */
30
    public function register()
31
    {
32
        // Automatically apply the package configuration
33
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'tinker-server');
34
    }
35
}
36