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

LangReset   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 14
c 1
b 0
f 0
dl 0
loc 24
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 : 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