Skip to content

Commit b705113

Browse files
committed
refactor: by rector
1 parent 9c05a63 commit b705113

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

system/Entity/Entity.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,8 @@ public function toDatabase(bool $onlyChanged = false, bool $recursive = false):
260260
}
261261

262262
// Cast values
263-
if ($this->_cast) {
264-
if (isset($this->casts[$key])) {
265-
$value = $this->castAs($value, $key, 'toDatabase');
266-
}
263+
if ($this->_cast && isset($this->casts[$key])) {
264+
$value = $this->castAs($value, $key, 'toDatabase');
267265
}
268266

269267
if ($recursive) {

0 commit comments

Comments
 (0)