From 8e33bb7aece37f0be72a86b632513e4bb2944104 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 29 Feb 2024 17:57:52 +0100 Subject: [PATCH 1/1] Match upstream prototype --- Transformer/DanceTransformer.php | 6 +++--- Transformer/SubscriptionTransformer.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Transformer/DanceTransformer.php b/Transformer/DanceTransformer.php index 16673c4..123f562 100644 --- a/Transformer/DanceTransformer.php +++ b/Transformer/DanceTransformer.php @@ -35,10 +35,10 @@ class DanceTransformer implements DataTransformerInterface { /** * Transforms a dance object array or collection to an int array * - * @param Dance $dances The dance instances array + * @param Collection|array $dances The dance instances array * @return array The dance ids */ - public function transform($dances) { + public function transform(mixed $dances): mixed { //Without dances if (null === $dances) { return []; @@ -60,7 +60,7 @@ class DanceTransformer implements DataTransformerInterface { * @throws TransformationFailedException when object (dance) is not found * @return array The dance instances array */ - public function reverseTransform($ids) { + public function reverseTransform(mixed $ids): mixed { //Without ids if ('' === $ids || null === $ids) { $ids = []; diff --git a/Transformer/SubscriptionTransformer.php b/Transformer/SubscriptionTransformer.php index c507063..9c82db0 100644 --- a/Transformer/SubscriptionTransformer.php +++ b/Transformer/SubscriptionTransformer.php @@ -35,10 +35,10 @@ class SubscriptionTransformer implements DataTransformerInterface { /** * Transforms a subscription object array or collection to an int array * - * @param Subscription $subscriptions The subscription instances array + * @param Collection|array $subscriptions The subscription instances array * @return array The subscription ids */ - public function transform($subscriptions) { + public function transform(mixed $subscriptions): mixed { //Without subscriptions if (null === $subscriptions) { return []; @@ -58,9 +58,9 @@ class SubscriptionTransformer implements DataTransformerInterface { * * @param array $ids * @throws TransformationFailedException when object (subscription) is not found - * @return array The subscription instances array + * @return Collection The subscription instances array */ - public function reverseTransform($ids) { + public function reverseTransform(mixed $ids): mixed { //Without ids if ('' === $ids || null === $ids) { $ids = []; -- 2.41.1