From 8fdf37261d5fb490645875cd59162168601359e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 23 Jun 2024 00:42:49 +0200 Subject: [PATCH] Fixed phpstan issues --- src/Serializer/StructuralElementNormalizer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Serializer/StructuralElementNormalizer.php b/src/Serializer/StructuralElementNormalizer.php index 3af8d293..1838f210 100644 --- a/src/Serializer/StructuralElementNormalizer.php +++ b/src/Serializer/StructuralElementNormalizer.php @@ -48,9 +48,6 @@ class StructuralElementNormalizer implements NormalizerInterface return $data instanceof AbstractStructuralDBElement; } - /** - * @return array - */ public function normalize($object, string $format = null, array $context = []): mixed { if (!$object instanceof AbstractStructuralDBElement) { @@ -59,6 +56,7 @@ class StructuralElementNormalizer implements NormalizerInterface $data = $this->normalizer->normalize($object, $format, $context); + //If the data is not an array, we can't do anything with it if (!is_array($data)) { return $data; }