| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 43 | 3 | public function parseVersion(stdClass $jsonData) |
|
| 44 | { |
||
| 45 | 3 | if (!isset($jsonData->{$this->fieldName})) { |
|
| 46 | 1 | throw new CannotParseVersionException(sprintf( |
|
| 47 | 1 | 'Cannot find "%s" property in JSON object.', |
|
| 48 | 1 | $this->fieldName |
|
| 49 | )); |
||
| 50 | } |
||
| 51 | |||
| 52 | 2 | return $jsonData->{$this->fieldName}; |
|
| 53 | } |
||
| 54 | |||
| 63 |