Skip to content
Snippets Groups Projects
Commit 346a4feb authored by Václav Pávek's avatar Václav Pávek
Browse files

fix phpstan: checkMissingIterableValueType now is TRUE

parent 704bcae1
No related branches found
No related tags found
1 merge request!4Update phpstan
Pipeline #30063 passed
......@@ -4,9 +4,6 @@ parameters:
paths:
- src
# todo, remove:
checkMissingIterableValueType: false
includes:
- vendor/grifart/phpstan-oneline/config.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
......@@ -25,6 +25,9 @@ class RolesAccessNode implements AccessNode
}
/**
* @return string[]
*/
public function getRoles(): array
{
return $this->roles;
......
......@@ -20,8 +20,12 @@ class DefaultAuthorizator implements Authorizator
}
/**
* @param array{string, string} $action
*/
public function isAllowed(Identity $identity, AuthorizationScope $scope, array $action): bool
{
/** @phpstan-ignore-next-line */
assert(count($action) === 2 && isset($action[0], $action[1]) && is_string($action[0]) && is_string($action[1]));
$node = $scope->getIdentityAccess($identity);
......
......@@ -6,6 +6,9 @@ namespace Mangoweb\Authorization;
interface Identity
{
/**
* @return string[]
*/
public function getRoles(): array;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment