LangUpdate::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 4
Bugs 0 Features 1
Metric Value
eloc 6
c 4
b 0
f 1
dl 0
loc 8
ccs 0
cts 4
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
7
final class LangUpdate extends BaseCommand
8
{
9
    protected $signature = 'lang:update'
10
    . ' {--j|json : Update JSON files}'
11
    . ' {--jet : Update Jetstream JSON files. This is an alias for "--json" key. }'
12
    . ' {--fortify : Update Fortify JSON files. This is an alias for "--json" key. }';
13
14
    protected $description = 'Updating installed localizations.';
15
16
    public function handle()
17
    {
18
        $this->call('lang:install', [
19
            'locales'   => Locale::installed($this->wantsJson()),
20
            '--force'   => true,
21
            '--json'    => $this->wantsJson(),
22
            '--jet'     => $this->wantsJson(),
23
            '--fortify' => $this->wantsJson(),
24
        ]);
25
    }
26
}
27