| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 49 | 4 | private function createInstanceOfTypeFromValue($value) |
|
| 50 | { |
||
| 51 | 4 | if (!isset($value)) { |
|
| 52 | 1 | return null; |
|
| 53 | } |
||
| 54 | 3 | if (class_exists($this->type)) { |
|
| 55 | 2 | return $this->requestBuilder->parseRequest($value, $this->type); |
|
| 56 | } |
||
| 57 | 1 | throw new InvalidAnnotationException( |
|
| 58 | 1 | "Class {$this->type} does not exist. Annotated in property {$this->name}." |
|
| 59 | 1 | ); |
|
| 60 | } |
||
| 61 | } |
||
| 62 |