Passed
Push — main ( f4d82a...ca2db5 )
by Andrey
03:23 queued 12s
created

Reset::resource()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 1
nc 2
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 2
rs 10
c 1
b 0
f 0
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
namespace Helldar\LaravelLangPublisher\Comparators;
21
22
use Helldar\Support\Facades\Helpers\Arr;
23
24
class Reset extends Base
25
{
26 6
    protected function merge(array $local, array $translated, array $excluded, array $extra_local, array $extra_translated): array
27
    {
28 6
        $main  = $this->sortAndMerge($local, $excluded, $translated);
29 6
        $extra = $this->sortAndMerge($extra_local, $translated);
30
31 6
        return Arr::merge($main, $extra);
32
    }
33
34 6
    protected function resource(string $filename, string $locale): array
35
    {
36 6
        return $this->full ? [] : parent::resource($filename, $locale);
37
    }
38
}
39