Passed
Push — master ( a7279d...feb425 )
by Andrey
11:45
created

BaseCommand::locales()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Console;
4
5
use Helldar\LaravelLangPublisher\Contracts\Localization;
6
use Helldar\LaravelLangPublisher\Contracts\Result;
7
use Illuminate\Console\Command;
8
9
abstract class BaseCommand extends Command
10
{
11
    /** @var \Helldar\LaravelLangPublisher\Contracts\Localization */
12
    protected $localization;
13
14
    /** @var \Helldar\LaravelLangPublisher\Contracts\Result */
15
    protected $result;
16
17
    public function __construct(Localization $localization, Result $result)
18
    {
19
        parent::__construct();
20
21
        $this->localization = $localization;
22
23
        $this->result = $result->setOutput($this);
24
    }
25
26
    protected function locales(): array
27
    {
28
        return (array) $this->argument('locales');
29
    }
30
31
    protected function force(): bool
32
    {
33
        return (bool) $this->option('force');
34
    }
35
}
36