Skip to content

Commit

Permalink
Fixed phpstan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Sep 18, 2024
1 parent c8f0f61 commit ae0cee8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1750,11 +1750,6 @@ parameters:
count: 1
path: src/lib/Server/Controller/User.php

-
message: "#^Parameter \\#1 \\$versions of class Ibexa\\\\Rest\\\\Server\\\\Values\\\\VersionList constructor expects array\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\>, iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
count: 1
path: src/lib/Server/Controller/User.php

-
message: "#^Parameter \\#5 \\$relations of class Ibexa\\\\Rest\\\\Server\\\\Values\\\\RestUser constructor expects array\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Relation\\>, iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Relation\\> given\\.$#"
count: 5
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Server/Controller/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,10 @@ public function loadUserDrafts(int $userId, Request $request): Values\VersionLis
);

return new Values\VersionList(
array_map(
static fn (ContentDraftListItemInterface $draftListItem): VersionInfo => $draftListItem->getVersionInfo(),
array_filter(array_map(
static fn (ContentDraftListItemInterface $draftListItem): ?VersionInfo => $draftListItem->getVersionInfo(),
$contentDrafts->items
),
)),
$request->getPathInfo()
);
}
Expand Down

0 comments on commit ae0cee8

Please sign in to comment.