| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 5 | public function fromJson($value, $asObject = false) |
|
| 30 | { |
||
| 31 | // As data is stored as json in ArangoDB we don't have to decode it here. |
||
| 32 | 5 | if ($asObject) { |
|
| 33 | 1 | return (object) $value; |
|
| 34 | } |
||
| 35 | |||
| 36 | // Recursively cast objects within the value to arrays |
||
| 37 | 4 | return mapObjectToArray($value); |
|
| 38 | } |
||
| 40 |