From eebc0126c21e4ee26944f37b31988d684e7d54b8 Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Thu, 8 Feb 2024 22:21:19 +0200 Subject: [PATCH] Use match --- src/Configurator.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 + }; } }