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