| 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 | 1 | private function createErrorCollectionFromJsonResponseObject(\stdClass $jsonResponseObject): ErrorCollection |
|
| 29 | { |
||
| 30 | 1 | $collection = new ErrorCollection(); |
|
| 31 | |||
| 32 | 1 | foreach ($jsonResponseObject->errors as $error) { |
|
| 33 | 1 | $collection->add( |
|
| 34 | 1 | new ValidationError( |
|
| 35 | 1 | $error->code, |
|
| 36 | 1 | $error->error, |
|
| 37 | 1 | $error->help, |
|
| 38 | 1 | $error->line, |
|
| 39 | 1 | $error->col |
|
| 40 | ) |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 44 | 1 | return $collection; |
|
| 45 | } |
||
| 46 | } |
||
| 47 |