diff --git a/src/Foundation/DataTransferObject/HasResolvable.php b/src/Foundation/DataTransferObject/HasResolvable.php index dfd2724..49a7964 100644 --- a/src/Foundation/DataTransferObject/HasResolvable.php +++ b/src/Foundation/DataTransferObject/HasResolvable.php @@ -130,7 +130,7 @@ protected static function resolveArrayKeyOfInput(string $key): string } /** - * @param array | Model $data + * @param array $data * * Hydrate incoming data to resolve unstructured data * @@ -139,7 +139,7 @@ protected static function resolveArrayKeyOfInput(string $key): string * @template TKey of array-key * @template TValue */ - public static function hydrate(array | Model $data): static + public static function hydrate(array $data): static { /** @var DataMapper $dataMapper */ $dataMapper = resolve(name: DataMapper::class); @@ -147,10 +147,7 @@ public static function hydrate(array | Model $data): static /** @var static $instance */ $instance = $dataMapper->execute( signature: static::class, - data: match (true) { - $data instanceof Model => $data->attributesToArray(), - default => $data - } + data: $data ); return $instance;