| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class Missing |
||
| 12 | { |
||
| 13 | public function missing(): array |
||
| 14 | { |
||
| 15 | return array_diff($this->available(), $this->main()); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function unnecessary(): array |
||
| 19 | { |
||
| 20 | return array_diff($this->main(), $this->available()); |
||
| 21 | } |
||
| 22 | |||
| 23 | protected function main(): array |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function available(): array |
||
| 29 | { |
||
| 30 | $locales = ArrFacade::unique(array_merge(['en'], $this->locales())); |
||
| 31 | |||
| 32 | $sorted = Arr::sort($locales); |
||
| 33 | |||
| 34 | return array_values($sorted); |
||
| 35 | } |
||
| 36 | |||
| 37 | protected function locales(): array |
||
| 38 | { |
||
| 39 | return Directory::names($this->path()); |
||
| 40 | } |
||
| 41 | |||
| 42 | protected function path(): string |
||
| 45 | } |
||
| 46 | } |
||
| 47 |