| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.3755 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 5 | public function arrayToObject(array $array): ?stdClass |
|
| 30 | { |
||
| 31 | try { |
||
| 32 | 5 | return json_decode( |
|
| 33 | 5 | json_encode($array, JSON_THROW_ON_ERROR), |
|
| 34 | 5 | false, |
|
| 35 | 5 | 512, |
|
| 36 | 5 | JSON_THROW_ON_ERROR |
|
| 37 | ); |
||
| 38 | } catch (Exception $e) { |
||
| 39 | throw new ParseErrorException( |
||
| 40 | $e->getMessage(), |
||
| 41 | $e->getCode(), |
||
| 42 | $e->getPrevious() |
||
| 43 | ); |
||
| 47 |