Passed
Push — 9.x ( 571ce0...ec3d6f )
by Andrey
11:20
created

Packages::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Support;
4
5
use Helldar\LaravelLangPublisher\Facades\ArrayProcessor as ArrProcessor;
6
use Helldar\LaravelLangPublisher\Facades\Config as ConfigFacade;
7
8
final class Packages
9
{
10
    /**
11
     * Returns a sorted list of packages identified for processing.
12
     *
13
     * @return array
14
     */
15
    public function get(): array
16
    {
17
        $packages = ConfigFacade::packages();
18
19
        return ArrProcessor::of($packages)
20
            ->unique()
21
            ->sort()
22
            ->values()
23
            ->toArray();
24
    }
25
}
26