ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 11
rs 10
1
<?php
2
3
namespace Squadron\Base;
4
5
use Squadron\Base\Console\Commands\HashString;
6
use Squadron\Base\Console\Commands\SetVersion;
7
8
class ServiceProvider extends \Illuminate\Support\ServiceProvider
9
{
10
    /**
11
     * Bootstrap any application services.
12
     */
13
    public function boot(): void
14
    {
15
        if ($this->app->runningInConsole())
16
        {
17
            $this->commands([
18
                HashString::class,
19
                SetVersion::class,
20
            ]);
21
        }
22
23
        $this->loadRoutesFrom(__DIR__.'/../routes/api.php');
24
    }
25
}
26