Skip to content

Commit

Permalink
IBX-8357: Fixed item export (#115)
Browse files Browse the repository at this point in the history
* IBX-8357: Fixed item export

* fix phpstan

* Apply suggested change
  • Loading branch information
reithor authored Jun 6, 2024
1 parent a74064f commit 9637aed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/lib/Service/ContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,13 @@ private function getAuthor(APIContent $contentValue, APIContentType $contentType
*
* @return array<string>
*/
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;
}
Expand Down

0 comments on commit 9637aed

Please sign in to comment.