RuleSetsServiceProvider::register()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 4
c 1
b 0
f 1
nc 2
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace Telkins\Validation\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Telkins\Validation\Console\Commands\MakeFieldRuleSet;
7
use Telkins\Validation\Console\Commands\MakeResourceRuleSet;
8
9
class RuleSetsServiceProvider extends ServiceProvider
10
{
11
    public function register()
12
    {
13
        if ($this->app->runningInConsole()) {
14
            $this->commands([
15
                MakeFieldRuleSet::class,
16
                MakeResourceRuleSet::class,
17
            ]);
18
        }
19
    }
20
}
21