LangUninstall::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 11
ccs 0
cts 6
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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 : Uninstall JSON files}'
14
    . ' {--jet : Uninstall Jetstream JSON files. This is an alias for "--json" key. }'
15
    . ' {--fortify : Uninstall Fortify JSON files. This is an alias for "--json" key. }';
16
17
    protected $description = 'Uninstall localizations.';
18
19
    protected $action = 'uninstall';
20
21
    public function handle()
22
    {
23
        $this->setProcessor(DeletePhp::class, DeleteJson::class);
24
25
        $this->exec(
26
            Locale::installed($this->wantsJson())
27
        );
28
29
        $this->result
30
            ->setMessage('No uninstalled localizations.')
31
            ->show();
32
    }
33
}
34