Skip to content

Commit

Permalink
Use match
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Feb 8, 2024
1 parent 343bc8c commit eebc012
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
}
}

0 comments on commit eebc012

Please sign in to comment.