Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 33 | public function normalize($result, NormalizationContext $normalizationContext) |
|
19 | { |
||
20 | return [ |
||
21 | 33 | 'error' => $result->getCode(), |
|
22 | 33 | 'error_description' => $result->getMessage(), |
|
23 | 33 | 'error_uri' => $result->getUri(), |
|
24 | 33 | 'error_properties' => $result->getProperties(), |
|
25 | 33 | 'error_data' => $result->getData(), |
|
26 | 33 | 'errors' => $result->getViolations() !== [] ? $result->getViolations() : null, |
|
27 | ]; |
||
28 | } |
||
29 | |||
35 |