Skip to content

Commit

Permalink
Psalm - type for item names
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Sep 8, 2023
1 parent 6f64b0d commit 5953a6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AssignmentsStorageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function exists(string $itemName, string $userId): bool;
* Whether at least one item from the given list is assigned to the user.
*
* @param string $userId User id.
* @param array $itemNames List of item names.
* @param string[] $itemNames List of item names.
*
* @return bool Whether at least one item from the given list is assigned to the user.
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/Support/FakeAssignmentsStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function userHasItem(string $userId, array $itemNames): bool
return false;
}

foreach ($itemNames as $permissionName) {
if (array_key_exists($permissionName, $assignments)) {
foreach ($itemNames as $itemName) {
if (array_key_exists($itemName, $assignments)) {
return true;
}
}
Expand Down

0 comments on commit 5953a6a

Please sign in to comment.