Passed
Push — master ( 68f9e3...36b0af )
by Andrey
02:57 queued 39s
created

LangUninstall::delete()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 3
c 4
b 0
f 0
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 10
cc 2
nc 2
nop 2
crap 6
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Console;
4
5
use Helldar\LaravelLangPublisher\Facades\Locale;
6
use Helldar\LaravelLangPublisher\Services\Processors\DeleteJson;
7
use Helldar\LaravelLangPublisher\Services\Processors\DeletePhp;
8
9
final class LangUninstall extends BaseCommand
10
{
11
    protected $signature = 'lang:uninstall'
12
    . ' {locales* : Space-separated list of, eg: de tk it}'
13
    . ' {--j|json : Install JSON files}';
14
15
    protected $description = 'Uninstall localizations.';
16
17
    public function handle()
18
    {
19
        $this->setProcessor(DeletePhp::class, DeleteJson::class);
20
21
        $this->exec(
22
            Locale::installed()
23
        );
24
25
        $this->result
26
            ->setMessage('No uninstalled localizations.')
27
            ->show();
28
    }
29
}
30