Passed
Push — main ( 3f2cb1...ed2a6d )
by Andrey
86:25 queued 84:06
created

Remove::processor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Console;
4
5
use Helldar\LaravelLangPublisher\Contracts\Processor as ProcessorContract;
6
use Helldar\LaravelLangPublisher\Services\Processors\Remove as Processor;
7
use Helldar\LaravelLangPublisher\Support\Actions\Remove as Action;
8
9
final class Remove extends BaseCommand
10
{
11
    protected $signature = 'lang:rm'
12
    . ' {locales?* : Space-separated list of, eg: de tk it}';
13
14
    protected $description = 'Remove localizations.';
15
16
    protected $action = Action::class;
17
18 4
    protected function ran(): void
19
    {
20 4
        $this->log('Starting processing of the locales list...');
21
22 4
        foreach ($this->locales() as $locale) {
23 4
            $this->log('Localization handling: ' . $locale);
24
25 4
            $this->validateLocale($locale);
26
27 4
            $this->processing($locale, $locale);
28
29 4
            $status = $this->process(null, $locale, null);
30
31 4
            $this->processed($locale, $locale, $status);
32
        }
33 4
    }
34
35 4
    protected function processor(): ProcessorContract
36
    {
37 4
        return Processor::make();
38
    }
39
}
40