Passed
Pull Request — main (#84)
by Andrey
59:33 queued 44:34
created

Update::ran()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Console;
4
5
use Helldar\LaravelLangPublisher\Contracts\Processor as ProcessorContract;
6
use Helldar\LaravelLangPublisher\Facades\Locales;
7
use Helldar\LaravelLangPublisher\Services\Processors\Install as Processor;
8
use Helldar\LaravelLangPublisher\Support\Actions\Update as Action;
9
10
final class Update extends BaseCommand
11
{
12
    protected $signature = 'lang:update';
13
14
    protected $description = 'Updating installed localizations.';
15
16
    protected $action = Action::class;
17
18
    protected function ran(): void
19
    {
20
        $this->locales = Locales::installed();
21
22
        parent::ran();
23
    }
24
25
    protected function processor(): ProcessorContract
26
    {
27
        $this->log('Getting the processor: ' . Processor::class);
28
29
        return Processor::make()->force(true);
30
    }
31
}
32