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