Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 3.1406 |
Changes | 0 |
1 | <?php |
||
21 | 14 | public function getAnnotation(string $annotationName, $throwException = false) |
|
22 | { |
||
23 | 14 | if (!isset($this->annotations[$annotationName]) && $throwException) { |
|
24 | throw new \InvalidArgumentException("no annotation with name $annotationName"); |
||
25 | } |
||
26 | |||
27 | 14 | return $this->annotations[$annotationName] ?? null; |
|
28 | } |
||
35 |