diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 211af313..f16c7e02 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -85,11 +85,6 @@ parameters: count: 1 path: src/bundle/DependencyInjection/ConfigurationMapper.php - - - message: "#^Parameter \\#1 \\$configuration of method Symfony\\\\Component\\\\DependencyInjection\\\\Extension\\\\Extension\\:\\:processConfiguration\\(\\) expects Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface, Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface\\|null given\\.$#" - count: 1 - path: src/bundle/DependencyInjection/EzRecommendationClientExtension.php - - message: "#^Method EzSystems\\\\EzRecommendationClientBundle\\\\EzRecommendationClientBundle\\:\\:build\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/lib/Service/ContentService.php b/src/lib/Service/ContentService.php index 86aafff0..1f2d770c 100644 --- a/src/lib/Service/ContentService.php +++ b/src/lib/Service/ContentService.php @@ -259,12 +259,13 @@ private function getAuthor(APIContent $contentValue, APIContentType $contentType * * @return array */ - private function prepareFields(APIContentType $contentType, array $fields): array + private function prepareFields(APIContentType $contentType, ?array $fields = null): array { - if (empty($fields)) { + if (!empty($fields)) { return $fields; } + $fields = []; foreach ($contentType->getFieldDefinitions() as $field) { $fields[] = $field->identifier; }