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