Passed
Pull Request — master (#60)
by Andrey
11:17
created

PublishPhp::excluded()   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
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Services\Processors;
4
5
use Helldar\LaravelLangPublisher\Facades\Config;
6
use Helldar\LaravelLangPublisher\Facades\File;
7
use Helldar\LaravelLangPublisher\Traits\Processors\Publishable;
8
use Illuminate\Support\Arr;
9
10
final class PublishPhp extends BaseProcessor
11
{
12
    use Publishable;
13
14
    protected function publish(): void
15
    {
16
        foreach (File::files($this->sourcePath()) as $file) {
17
            $this->publishFile($file);
18
        }
19
    }
20
21
    protected function excluded(array $array, string $key): array
22
    {
23
        $keys = Config::getExclude($key, []);
24
25
        return Arr::only($array, $keys);
26
    }
27
}
28