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