| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 4 | public function normalize($object, $format = null, array $context = []): array |
|
| 29 | { |
||
| 30 | 4 | $data = []; |
|
| 31 | |||
| 32 | 4 | if (isset($context['status_code'])) { |
|
| 33 | 4 | $data['code'] = $statusCode = $context['status_code']; |
|
| 34 | } |
||
| 35 | |||
| 36 | 4 | $data['message'] = $this->getMessageFromThrowable($object, isset($statusCode) ? $statusCode : null); |
|
| 37 | |||
| 38 | 4 | return $data; |
|
| 39 | } |
||
| 40 | |||
| 49 |