Passed
Push — 9.x ( d63f62...9358ea )
by Andrey
20:32 queued 05:32
created

Remove::delete()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 8
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
    protected function ran(): void
19
    {
20
        $this->log('Starting processing of the locales list...');
21
22
        foreach ($this->locales() as $locale) {
23
            $this->log('Localization handling: ' . $locale);
24
25
            $this->validateLocale($locale);
26
27
            $this->processing($locale, $locale);
28
29
            $status = $this->process(null, $locale, null);
30
31
            $this->processed($locale, $locale, $status);
32
        }
33
    }
34
35
    protected function processor(): ProcessorContract
36
    {
37
        return Processor::make();
38
    }
39
}
40