Passed
Push — 10.x ( 7ef113...ba9d3e )
by Andrey
13:56
created

Remove::removeDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
rs 10
ccs 0
cts 0
cp 0
cc 1
nc 1
nop 1
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 4
declare(strict_types=1);
19
20 4
namespace Helldar\LaravelLangPublisher\Console;
21
22 4
use Helldar\LaravelLangPublisher\Facades\Helpers\Locales;
23 4
use Helldar\LaravelLangPublisher\Processors\Remove as Processor;
24
use Helldar\Support\Facades\Helpers\Arr;
25 4
26
class Remove extends Base
27 4
{
28
    protected $signature = 'lang:rm'
29 4
    . ' {locales?* : Space-separated list of, eg: de tk it}';
30
31 4
    protected $description = 'Remove localizations.';
32
33 4
    protected $processor = Processor::class;
34
35 4
    protected function targetLocales(): array
36
    {
37 4
        $locales = $this->getLocales();
38
39
        return Arr::only($locales, parent::targetLocales());
40
    }
41
42
    protected function getAllLocales(): array
43
    {
44
        return Locales::installed();
45
    }
46
}
47