diff --git a/ModelDescriber/EnumModelDescriber.php b/ModelDescriber/EnumModelDescriber.php index b1cc18fb4..9bba56d2d 100644 --- a/ModelDescriber/EnumModelDescriber.php +++ b/ModelDescriber/EnumModelDescriber.php @@ -18,7 +18,7 @@ public function describe(Model $model, Schema $schema) } $reflectionEnum = new \ReflectionEnum($enumClass); - if ($reflectionEnum->isBacked() && $reflectionEnum->getBackingType()->getName() === 'int') { + if ($reflectionEnum->isBacked() && 'int' === $reflectionEnum->getBackingType()->getName()) { $schema->type = 'integer'; } else { $schema->type = 'string'; diff --git a/Tests/Functional/FunctionalTest.php b/Tests/Functional/FunctionalTest.php index 4af14588d..53ec17f60 100644 --- a/Tests/Functional/FunctionalTest.php +++ b/Tests/Functional/FunctionalTest.php @@ -665,7 +665,6 @@ public function testEnumSupport() $this->assertSame('string', $model->type); $this->assertCount(2, $model->enum); - $model = $this->getModel('ArticleType81IntBacked'); $this->assertSame('integer', $model->type);