| Conditions | 4 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | 5 | public function getEntries(?string $level = null): array |
|
| 42 | { |
||
| 43 | 5 | if (null !== $level && isset($this->entries[$level])) { |
|
| 44 | 2 | return $this->entries[$level]; |
|
| 45 | 5 | } elseif (null == $level) { |
|
|
|
|||
| 46 | 3 | return $this->entries; |
|
| 47 | } |
||
| 48 | |||
| 49 | 2 | throw new Exception('Level '.$level.' not set.'); |
|
| 50 | } |
||
| 57 |