| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 3 | public function fetch($request): UpdateType |
|
| 39 | { |
||
| 40 | 3 | $input = \json_decode($this->getContents($request)); |
|
| 41 | 3 | if (!($input instanceof \stdClass)) { |
|
| 42 | 1 | throw new BadRequestException('Request content must be valid JSON object.'); |
|
| 43 | } |
||
| 44 | |||
| 45 | 2 | return $this->normalizer->denormalize($input, UpdateType::class); |
|
| 46 | } |
||
| 66 |