Skip to content

Commit af113a1

Browse files
committed
refactor: if conditions
1 parent e83dad1 commit af113a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

system/Database/BaseBuilder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2698,7 +2698,11 @@ protected function objectToArray($object)
26982698
$array = [];
26992699

27002700
foreach (get_object_vars($object) as $key => $val) {
2701-
if ((! is_object($val) || $val instanceof RawSql || $val instanceof Time) && ! is_array($val)) {
2701+
if ($val instanceof RawSql) {
2702+
$array[$key] = $val;
2703+
} elseif ($val instanceof Time) {
2704+
$array[$key] = $val;
2705+
} elseif (! is_object($val) && ! is_array($val)) {
27022706
$array[$key] = $val;
27032707
}
27042708
}

0 commit comments

Comments
 (0)