mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: fix phpstan issues with more strict type hinting in AuthorizationHelperInterface
This commit is contained in:
parent
dd344aed52
commit
a56370d851
@ -161,6 +161,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
|
|||||||
|
|
||||||
// loop on reachable scopes
|
// loop on reachable scopes
|
||||||
foreach ($reachableScopes as $scope) {
|
foreach ($reachableScopes as $scope) {
|
||||||
|
/** @phpstan-ignore-next-line */
|
||||||
if (in_array($scope->getId(), $scopes_ids, true)) {
|
if (in_array($scope->getId(), $scopes_ids, true)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -360,10 +360,12 @@ final class PersonContext implements PersonContextInterface
|
|||||||
|
|
||||||
private function isScopeNecessary(Person $person): bool
|
private function isScopeNecessary(Person $person): bool
|
||||||
{
|
{
|
||||||
if ($this->showScopes && 1 < $this->authorizationHelper->getReachableScopes(
|
if ($this->showScopes && 1 < count(
|
||||||
$this->security->getUser(),
|
$this->authorizationHelper->getReachableScopes(
|
||||||
PersonDocumentVoter::CREATE,
|
$this->security->getUser(),
|
||||||
$this->centerResolverManager->resolveCenters($person)
|
PersonDocumentVoter::CREATE,
|
||||||
|
$this->centerResolverManager->resolveCenters($person)
|
||||||
|
)
|
||||||
)) {
|
)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user