Conditions | 7 |
Paths | 6 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public static function resultFix(&$array) |
||
31 | { |
||
32 | foreach ($array as &$element) { |
||
33 | if ($element instanceof \stdClass) { |
||
34 | self::resultFix($element); |
||
35 | } else { |
||
36 | if (\is_object($element) && $element instanceof ObjectID) { |
||
37 | $element = (string) $element; |
||
38 | } |
||
39 | if (\is_object($element) && $element instanceof UTCDateTime) { |
||
40 | $element = (new UTCDateTime((string) $element))->toDateTime()->format('Y-m-d H:i:s'); |
||
|
|||
41 | } |
||
46 |