Passed
Pull Request — main (#84)
by Andrey
196:26 queued 181:26
created

Update::processor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
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\Services\Processors\Install as Processor;
7
use Helldar\LaravelLangPublisher\Support\Actions\Update as Action;
8
9
final class Update extends BaseCommand
10
{
11
    protected $signature = 'lang:update';
12
13
    protected $description = 'Updating installed localizations.';
14
15
    protected $action = Action::class;
16
17
    protected function processor(): ProcessorContract
18
    {
19
        $this->log('Getting the processor: ' . Processor::class);
20
21
        return Processor::make()->force($this->hasForce());
22
    }
23
24
    protected function locales(): array
25
    {
26
        return $this->targetLocales();
27
    }
28
29
    protected function hasForce(): bool
30
    {
31
        return true;
32
    }
33
}
34