ApiToolkitServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 2
A register() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace JustSteveKing\Laravel\ApiToolkit;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ApiToolkitServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the API Toolkit
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        if ($this->app->runningInConsole()) {
17
            $this->publishes([
18
                __DIR__ . '/../config/api-toolkit.php' => config_path('api-toolkit.php'),
19
            ], 'config');
20
21
            // publish any resources
22
23
            $this->commands([
24
                \JustSteveKing\Laravel\ApiToolkit\Console\Commands\TestCommand::class,
25
                \JustSteveKing\Laravel\ApiToolkit\Console\Commands\ResourceMakeCommand::class,
26
            ]);
27
        }
28
    }
29
30
    public function register()
31
    {
32
        $this->mergeConfigFrom(
33
            __DIR__ . '/../config/api-toolkit.php',
34
            'api-toolkit'
35
        );
36
    }
37
}
38