Passed
Push — master ( d8cc68...c5f99b )
by Andrey
21:06 queued 05:59
created

LangReset::handle()   A

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 : Install JSON files}'
14
    . ' {--f|full : Reset files without excluded keys}';
15
16
    protected $description = 'Resets installed locations.';
17
18
    protected $action = 'reset';
19
20
    protected $action_default = true;
21
22
    public function handle()
23
    {
24
        $this->setProcessor(ResetPhp::class, ResetJson::class);
25
26
        $this->exec(
27
            Locale::installed($this->wantsJson())
28
        );
29
30
        $this->result
31
            ->setMessage('Files have not been reset.')
32
            ->show();
33
    }
34
}
35