Passed
Push — 10.x ( 592eb6...b6c4ed )
by Andrey
18:51 queued 03:57
created

Add::getAllLocales()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the "andrey-helldar/laravel-lang-publisher" project.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @author Andrey Helldar <[email protected]>
10
 *
11
 * @copyright 2021 Andrey Helldar
12
 *
13
 * @license MIT
14
 *
15
 * @see https://github.com/andrey-helldar/laravel-lang-publisher
16
 */
17
18
declare(strict_types=1);
19
20 11
namespace Helldar\LaravelLangPublisher\Console;
21
22 11
use Helldar\LaravelLangPublisher\Facades\Helpers\Locales;
23
use Helldar\LaravelLangPublisher\Processors\Add as Processor;
24 11
25
class Add extends Base
26
{
27 12
    protected $signature = 'lang:add'
28
    . ' {locales?* : Space-separated list of, eg: de tk it}';
29 12
30
    protected $description = 'Install new localizations.';
31 12
32
    protected $processor = Processor::class;
33
34
    protected function targetLocales(): array
35
    {
36
        return $this->getLocales();
37
    }
38
39
    protected function getAllLocales(): array
40
    {
41
        return Locales::available();
42
    }
43
}
44