Skip to content

Commit 9ac4fb2

Browse files
Update AbstractColumn.php
Made conditional inline
1 parent f47cdbf commit 9ac4fb2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Schema/AbstractColumn.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,12 @@ public function compare(self $initial): bool
598598
? $initial->getDefaultValue()->__toString()
599599
: $initial->getDefaultValue();
600600

601-
if ($this->userType === 'boolean') {
602-
$defaultValue = (bool) $defaultValue;
603-
$initialDefaultValue = (bool) $initialDefaultValue;
604-
}
601+
$defaultValue = $this->userType === 'boolean'
602+
? (bool) $defaultValue
603+
: $defaultValue;
604+
$initialDefaultValue = $this->userType === 'boolean'
605+
? (bool) $initialDefaultValue
606+
: $initialDefaultValue;
605607

606608
//Default values has to compared using type-casted value
607609
if ($defaultValue != $initialDefaultValue) {

0 commit comments

Comments
 (0)