diff --git a/src/Configurator.php b/src/Configurator.php index ac385ca7..8bdda3bf 100644 --- a/src/Configurator.php +++ b/src/Configurator.php @@ -408,10 +408,8 @@ private function getPropertyMetadata(\ReflectionProperty $property, string $name private function isOnInsertGeneratedField(Field $field): bool { - return $field->isPrimary() - || $field->getType() === 'serial' - || $field->getType() === 'smallserial' - || $field->getType() === 'serial' - || $field->getType() === 'bigserial'; + return $field->isPrimary() || match ($field->getType()) { + 'serial', 'bigserial', 'smallserial' => true + }; } }