Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
28 | 3 | private function createErrorCollectionFromJsonResponseObject(\stdClass $jsonResponseObject): ErrorCollection |
|
29 | { |
||
30 | 3 | $collection = new ErrorCollection(); |
|
31 | |||
32 | 3 | foreach ($jsonResponseObject->errors as $error) { |
|
33 | 3 | $collection->add( |
|
34 | 3 | new ValidationError( |
|
35 | 3 | $error->code, |
|
36 | 3 | $error->error, |
|
37 | 3 | $error->help, |
|
38 | 3 | $error->line, |
|
39 | 3 | $error->col |
|
40 | ) |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | 3 | return $collection; |
|
45 | } |
||
46 | } |
||
47 |