LangReset::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 11
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Console;
4
5
use Helldar\LaravelLangPublisher\Facades\Locale;
6
use Helldar\LaravelLangPublisher\Services\Processors\ResetJson;
7
use Helldar\LaravelLangPublisher\Services\Processors\ResetPhp;
8
9
final class LangReset extends BaseCommand
10
{
11
    protected $signature = 'lang:reset'
12
    . ' {locales?* : Space-separated list of, eg: de tk it}'
13
    . ' {--j|json : Reset JSON files}'
14
    . ' {--jet : Reset Jetstream JSON files. This is an alias for "--json" key. }'
15
    . ' {--fortify : Reset Fortify JSON files. This is an alias for "--json" key. }'
16
    . ' {--f|full : Reset files without excluded keys}';
17
18
    protected $description = 'Resets installed locations.';
19
20
    protected $action = 'reset';
21
22
    protected $action_default = true;
23
24
    public function handle()
25
    {
26
        $this->setProcessor(ResetPhp::class, ResetJson::class);
27
28
        $this->exec(
29
            Locale::installed($this->wantsJson())
30
        );
31
32
        $this->result
33
            ->setMessage('Files have not been reset.')
34
            ->show();
35
    }
36
}
37