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

LangInstall   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 57.14%

Importance

Changes 16
Bugs 1 Features 0
Metric Value
wmc 1
eloc 12
c 16
b 1
f 0
dl 0
loc 20
ccs 4
cts 7
cp 0.5714
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
16
    protected $description = 'Install new localizations.';
17
18 12
    public function handle()
19
    {
20 12
        $this->setProcessor(PublishPhp::class, PublishJson::class);
21
22 12
        $this->exec(
23 12
            Locale::available()
24
        );
25
26
        $this->result
27
            ->setMessage('Files were not copied.')
28
            ->show();
29
    }
30
}
31