PackageServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 29
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 11 1
1
<?php
2
3
namespace AlexWells\ApiDocsGenerator;
4
5
use Illuminate\Support\ServiceProvider;
6
use AlexWells\ApiDocsGenerator\Commands\GenerateDocumentation;
7
8
class PackageServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application events.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->loadViewsFrom(__DIR__ . '/../../resources/views/', 'api-docs');
18
19
        $this->publishes([
20
            __DIR__ . '/../../resources/views' => resource_path('views/vendor/api-docs')
21
        ], 'views');
22
23
        $this->publishes([
24
            __DIR__ . './../resources/assets' => resource_path('assets/vendor/api-docs')
25
        ], 'assets');
26
    }
27
28
    /**
29
     * Register API documentation generator commands.
30
     *
31
     * @return void
32
     */
33
    public function register()
34
    {
35
        $this->commands([
36
            GenerateDocumentation::class
37
        ]);
38
    }
39
}
40