LangUninstall   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 8
Bugs 1 Features 0
Metric Value
wmc 1
eloc 14
c 8
b 1
f 0
dl 0
loc 23
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 11 1
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