Skip to content

Commit

Permalink
Fix Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Sep 27, 2023
1 parent ba8373a commit b2285cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ItemsStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,13 @@ public function removeChildren(string $parentName): void
*/
private function getItemsByType(string $type): array
{
/** @psalm-var RawItem[] $rawItems */
/** @psalm-var RawPermission[] | RawRole[] $rawItems */
$rawItems = (new Query($this->database))
->from($this->tableName)
->where(['type' => $type])
->all();

/** @psalm-var array<string, Permission> | array<string, Role> */
return $this->getItemsIndexedByName($rawItems);
}

Expand Down

0 comments on commit b2285cf

Please sign in to comment.