Skip to content

Commit

Permalink
declare as array
Browse files Browse the repository at this point in the history
  • Loading branch information
reithor committed Jun 5, 2024
1 parent cfe53f2 commit 4092f93
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -875,11 +875,6 @@ parameters:
count: 1
path: src/lib/Service/ContentService.php

-
message: "#^Method EzSystems\\\\EzRecommendationClient\\\\Service\\\\ContentService\\:\\:prepareFields\\(\\) should return array\\<string\\> but returns array\\<int\\<0, max\\>, 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
Expand Down
1 change: 1 addition & 0 deletions src/lib/Service/ContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ private function prepareFields(APIContentType $contentType, ?array $fields = nul
return $fields;
}

$fields = [];
foreach ($contentType->getFieldDefinitions() as $field) {
$fields[] = $field->identifier;
}
Expand Down

0 comments on commit 4092f93

Please sign in to comment.