EnvValidatorCommand::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Melihovv\LaravelEnvValidator;
4
5
use Illuminate\Console\Command;
6
7
class EnvValidatorCommand extends Command
8
{
9
    protected $signature = 'config:env-validator';
10
11
    protected $description = 'Validate variables in the .env file';
12
13
    public function handle()
14
    {
15
        $validator = EnvValidatorFactory::buildFromLaravelConfig();
16
        $validator->validate();
17
18
        $this->info('All env variables validated successfully');
19
    }
20
}
21