diff --git a/src/Command/ModelCommand.php b/src/Command/ModelCommand.php index 331702c3..afcf486d 100644 --- a/src/Command/ModelCommand.php +++ b/src/Command/ModelCommand.php @@ -1486,11 +1486,9 @@ protected function getEnumDefinitions(TableSchemaInterface $schema): array $dbType = TypeFactory::build($columnSchema['type']); if ($dbType instanceof EnumType) { $class = $dbType->getEnumClassName(); - /** @var \BackedEnum $enum */ - $rEnum = new ReflectionEnum($class); - $rBackingType = $rEnum->getBackingType(); - $type = (string)$rBackingType; - if ($type === 'int') { + $reflectionEnum = new ReflectionEnum($class); + $backingType = (string)$reflectionEnum->getBackingType(); + if ($backingType === 'int') { $isInt = true; } }