Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 5 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
52 | private function loadData(string $fileType, ?string $id = null): array |
||
53 | { |
||
54 | $data = $this->storage->read($fileType); |
||
55 | if (!empty($id)) { |
||
56 | if (!isset($data[$id])) { |
||
57 | throw new NotFoundException(sprintf('Unable to find debug data ID with "%s"', $id)); |
||
58 | } |
||
59 | |||
60 | return $data[$id]; |
||
61 | } |
||
62 | |||
63 | return $data; |
||
64 | } |
||
66 |