LaravelCodeAnalyseServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 3
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Laravel Code Analyse.
7
 *
8
 * (c) Nuno Maduro <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace NunoMaduro\LaravelCodeAnalyse;
15
16
use Illuminate\Support\ServiceProvider;
17
use NunoMaduro\LaravelCodeAnalyse\Console\CodeAnalyseCommand;
18
19
/**
20
 * @internal
21
 */
22
final class LaravelCodeAnalyseServiceProvider extends ServiceProvider
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 3
    public function register(): void
28
    {
29 3
        if ($this->app->runningInConsole() && ! $this->app->runningUnitTests()) {
30 1
            $this->commands(CodeAnalyseCommand::class);
31
        }
32 3
    }
33
}
34