| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class Packages |
||
| 10 | { |
||
| 11 | use Logger; |
||
|
|
|||
| 12 | |||
| 13 | /** |
||
| 14 | * Returns a sorted list of packages identified for processing. |
||
| 15 | * |
||
| 16 | * @return array |
||
| 17 | */ |
||
| 18 | public function get(): array |
||
| 19 | { |
||
| 20 | $this->log('Getting a sorted list of packages identified for processing...'); |
||
| 21 | |||
| 22 | $packages = ConfigFacade::packages(); |
||
| 23 | |||
| 24 | return ArrProcessor::of($packages) |
||
| 25 | ->unique() |
||
| 26 | ->values() |
||
| 27 | ->toArray(); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Returns the count of processable packages. |
||
| 32 | * |
||
| 33 | * @return int |
||
| 34 | */ |
||
| 35 | public function count(): int |
||
| 40 | } |
||
| 41 | } |
||
| 42 |