diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2611060a..f16c7e02 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -875,11 +875,6 @@ parameters: count: 1 path: src/lib/Service/ContentService.php - - - message: "#^Method EzSystems\\\\EzRecommendationClient\\\\Service\\\\ContentService\\:\\:prepareFields\\(\\) should return array\\ but returns array\\, mixed\\>\\|null\\.$#" - count: 1 - path: src/lib/Service/ContentService.php - - message: "#^Method EzSystems\\\\EzRecommendationClient\\\\Service\\\\ContentService\\:\\:setContent\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 diff --git a/src/lib/Service/ContentService.php b/src/lib/Service/ContentService.php index b41be9b2..1f2d770c 100644 --- a/src/lib/Service/ContentService.php +++ b/src/lib/Service/ContentService.php @@ -265,6 +265,7 @@ private function prepareFields(APIContentType $contentType, ?array $fields = nul return $fields; } + $fields = []; foreach ($contentType->getFieldDefinitions() as $field) { $fields[] = $field->identifier; }