| Conditions | 4 |
| Paths | 8 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 2 | public function getFiles(array $path): Traversable |
|
| 32 | { |
||
| 33 | 2 | $dir = Stuff::arrayToPath($path); |
|
| 34 | try { |
||
| 35 | 2 | foreach ($this->storage->lookup($dir) as $item) { |
|
| 36 | 1 | if ($this->filterExt(Stuff::fileExt($item))) { |
|
| 37 | 1 | yield Stuff::sanitize($item); |
|
| 38 | } |
||
| 39 | } |
||
| 40 | 1 | } catch (StorageException $ex) { |
|
| 41 | 1 | throw new MenuException($ex->getMessage(), $ex->getCode(), $ex); |
|
| 42 | } |
||
| 45 |