Skip to content

Commit

Permalink
fix: default return in get data mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
DeiseCAPBarbosa committed Feb 18, 2025
1 parent e83bc01 commit 69893ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/LegacyRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 69893ec

Please sign in to comment.