Skip to content

Commit ed1a455

Browse files
Remove ability to specify array objects as it doesn't make sense from column attribute, as the value must be static
1 parent 5f910a7 commit ed1a455

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/Annotation/Column.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,7 @@ protected function setAttributes(array $attributes): void
158158
$array = array_column($values::cases(), 'value');
159159
} elseif (is_array($values)) {
160160
$array = array_map(function ($value) {
161-
if ($value instanceof \BackedEnum) {
162-
return $value->value;
163-
}
164-
if (is_object($value) && property_exists($value, 'value')) {
165-
return $value->value;
166-
}
167-
return $value;
161+
return $value instanceof \BackedEnum ? $value->value : $value;
168162
}, $values);
169163
}
170164

0 commit comments

Comments
 (0)