Total Complexity | 4 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
17 | class Volume implements IEntriesSource |
||
18 | { |
||
19 | use TFilterHtml; |
||
20 | |||
21 | /** @var string path to menu dir */ |
||
22 | protected string $rootPath = ''; |
||
23 | |||
24 | 5 | public function __construct(string $rootPath) |
|
27 | 5 | } |
|
28 | |||
29 | 3 | public function getFiles(array $path): Traversable |
|
30 | { |
||
31 | 3 | $dir = Stuff::arrayToPath($path); |
|
32 | 3 | $list = scandir($this->rootPath . $dir); |
|
33 | 3 | if (false !== $list) { |
|
34 | 3 | yield from array_filter(array_filter($list, [Stuff::class, 'notDots']), [$this, 'filterHtml']); |
|
35 | } |
||
36 | 3 | } |
|
37 | |||
38 | 3 | public function filterHtml(string $fileName): bool |
|
41 | } |
||
42 | } |
||
43 |