Conditions | 7 |
Paths | 6 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public static function resultFix(&$array) |
||
19 | { |
||
20 | foreach ($array as &$element) { |
||
21 | if ($element instanceof \stdClass) { |
||
22 | self::resultFix($element); |
||
23 | } else { |
||
24 | if (\is_object($element) && $element instanceof ObjectID) { |
||
25 | $element = (string) $element; |
||
26 | } |
||
27 | if (\is_object($element) && $element instanceof UTCDateTime) { |
||
28 | $element = (new UTCDateTime((string) $element))->toDateTime()->format('Y-m-d H:i:s'); |
||
|
|||
29 | } |
||
34 |