Skip to content

Commit

Permalink
Fix CI and improve Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Dec 12, 2023
1 parent b1d01ec commit bb0d2e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
- windows-latest

php:
- 8.0
- 8.1
- 8.2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1', '8.2']
['8.1', '8.2']
extensions: uopz
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:

environment:
php:
version: 8.0.18
version: 8.1
pecl_extensions:
- uopz
ini:
Expand Down
5 changes: 5 additions & 0 deletions src/ItemsStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ private function hasItem(string $name): bool
return isset($this->items[$name]);
}

/**
* @psalm-param Item::TYPE_* $type
*
* @psalm-return ($type is Item::TYPE_PERMISSION ? array<string, Permission> : array<string, Role>)
*/
private function getInstanceByTypeAndName(string $type, string $name): Permission|Role
{
return $type === Item::TYPE_PERMISSION ? new Permission($name) : new Role($name);
Expand Down

0 comments on commit bb0d2e5

Please sign in to comment.