ApiTestSuiteServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 8
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 14
rs 10
1
<?php
2
3
namespace Digitonic\ApiTestSuite;
4
5
use Digitonic\ApiTestSuite\Commands\Installer;
6
use Illuminate\Support\ServiceProvider;
7
8
class ApiTestSuiteServiceProvider 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('digitonic.api-test-suite'),
18
            ], 'config');
19
20
            $this->publishes([
21
                __DIR__ . '/../templates/' => base_path('tests/templates/')
22
            ]);
23
24
            // Registering package commands.
25
             $this->commands([
26
                 Installer::class,
27
             ]);
28
        }
29
    }
30
31
    /**
32
     * Register the application services.
33
     */
34
    public function register()
35
    {
36
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'digitonic.api-test-suite');
37
    }
38
}
39