From 69893eca00047178f7f2068c62e49ae35c9ae3e6 Mon Sep 17 00:00:00 2001 From: DeiseCAPBarbosa Date: Tue, 18 Feb 2025 15:50:15 -0300 Subject: [PATCH] fix: default return in get data mapper --- src/LegacyRecord.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/LegacyRecord.php b/src/LegacyRecord.php index c1b41e42..089836c7 100644 --- a/src/LegacyRecord.php +++ b/src/LegacyRecord.php @@ -165,8 +165,10 @@ public function delete(): bool /** * Returns a DataMapper configured with the Schema and collection described * in this entity. + * @template T of DataMapper + * @return T */ - public function getDataMapper(): DataMapper + public function getDataMapper() { $dataMapper = Container::make(DataMapper::class); $dataMapper->setSchema($this->getSchema()); @@ -357,9 +359,11 @@ protected function execute(string $action): bool /** * Returns the valid instance from Ioc. * + * @template T of DataMapper + * @return T * @Throws NoCollectionNameException Throws exception when has no collection filled */ - protected static function getDataMapperInstance(): DataMapper + protected static function getDataMapperInstance() { $instance = Container::make(static::class);