Skip to content

Commit

Permalink
Fix Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Dec 11, 2023
1 parent 3988f77 commit 88b27b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/SimpleItemsStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ private function updateItemName(string $name, Item $item): void

/**
* @psalm-param Item::TYPE_* $type
*
* @psalm-return ($type is Item::TYPE_PERMISSION ? array<string, Permission> : array<string, Role>)
*/
private function getItemsByType(string $type): array
{
Expand Down Expand Up @@ -282,6 +284,7 @@ private function fillParentsRecursive(string $name, array &$result): void

$parent = $this->get($parentName);
if ($parent !== null) {
/** @psalm-var ItemsIndexedByName $result Imported type in `psalm-param-out` is not resolved. */
$result[$parentName] = $parent;
}

Expand Down

0 comments on commit 88b27b1

Please sign in to comment.