LangReset   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 16
c 1
b 0
f 0
dl 0
loc 26
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 11 1
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