Passed
Pull Request — main (#104)
by Andrey
84:07 queued 69:01
created

Remove::deleteFile()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2.0932

Importance

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