From feb91a222c1cd05ec629a72ed4484a724b903f85 Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Thu, 8 Feb 2024 22:37:23 +0200 Subject: [PATCH] Rename method from getType to getFlags --- src/Annotation/Generated.php | 2 +- src/Configurator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Annotation/Generated.php b/src/Annotation/Generated.php index d663d215..c27bc013 100644 --- a/src/Annotation/Generated.php +++ b/src/Annotation/Generated.php @@ -23,7 +23,7 @@ public function __construct( ) { } - public function getType(): ?int + public function getFlags(): ?int { if (!$this->beforeInsert && !$this->onInsert && !$this->beforeUpdate) { return null; diff --git a/src/Configurator.php b/src/Configurator.php index f22e5381..ea30c586 100644 --- a/src/Configurator.php +++ b/src/Configurator.php @@ -308,7 +308,7 @@ public function initGeneratedFields(EntitySchema $entity, \ReflectionClass $clas try { $generated = $this->reader->firstPropertyMetadata($property, Generated::class); if ($generated !== null) { - $entity->getFields()->get($property->getName())->setGenerated($generated->getType()); + $entity->getFields()->get($property->getName())->setGenerated($generated->getFlags()); } } catch (\Throwable $e) { throw new AnnotationException($e->getMessage(), (int) $e->getCode(), $e);