LangInstall   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 16
Bugs 1 Features 0
Metric Value
wmc 1
eloc 14
c 16
b 1
f 0
dl 0
loc 22
ccs 4
cts 8
cp 0.5
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\PublishJson;
7
use Helldar\LaravelLangPublisher\Services\Processors\PublishPhp;
8
9
final class LangInstall extends BaseCommand
10
{
11
    protected $signature = 'lang:install'
12
    . ' {locales?* : Space-separated list of, eg: de tk it}'
13
    . ' {--f|force : Override exiting files}'
14
    . ' {--j|json : Install JSON files}'
15
    . ' {--jet : Install Jetstream JSON files. This is an alias for "--json" key. }'
16
    . ' {--fortify : Install Fortify JSON files. This is an alias for "--json" key. }';
17
18 12
    protected $description = 'Install new localizations.';
19
20 12
    public function handle()
21
    {
22 12
        $this->setProcessor(PublishPhp::class, PublishJson::class);
23 12
24
        $this->exec(
25
            Locale::available()
26
        );
27
28
        $this->result
29
            ->setMessage('Files were not copied.')
30
            ->show();
31
    }
32
}
33