ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 12 1
A boot() 0 8 1
1
<?php
2
3
namespace Arrilot\Api;
4
5
use Arrilot\Api\Generator\ApiMakeCommand;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9
    /**
10
     * Register the service provider.
11
     *
12
     * @return void
13
     */
14
    public function register()
15
    {
16
        $this->mergeConfigFrom(
17
            __DIR__.'/config/config.php', 'laravel-api-generator'
18
        );
19
20
        $this->app->singleton('command.api.make', function ($app) {
21
            return new ApiMakeCommand($app['files']);
22
        });
23
24
        $this->commands('command.api.make');
25
    }
26
27
    /**
28
     * Bootstrap the application events.
29
     */
30
    public function boot()
31
    {
32
        $this->publishes([
33
            __DIR__.'/config/config.php' => config_path('laravel-api-generator.php'),
34
        ]);
35
36
        require app_path(config('laravel-api-generator.routes_file'));
37
    }
38
}
39