TinkerServerServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 2

2 Methods

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