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

LangInstall::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1.0787

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 6
c 4
b 0
f 0
dl 0
loc 11
ccs 4
cts 7
cp 0.5714
rs 10
cc 1
nc 1
nop 0
crap 1.0787
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