Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 90 | public function getAnnotationParserFor(RequestAnnotation $annotation) |
|
26 | { |
||
27 | 90 | foreach ($this->map as $key => $val) { |
|
28 | 90 | if ($annotation instanceof $key) { |
|
29 | 89 | return new $val; |
|
30 | } |
||
31 | 16 | } |
|
32 | 1 | throw new \Exception('Unsupported annotation: ' . get_class($annotation)); |
|
33 | } |
||
34 | } |
||
35 |