mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 05:23:49 +00:00
fix: Strict types interfaces: VoterHelperInterface
, ProvideRoleHierarchyInterface
and ProvideRoleInterface
.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Security\Authorization;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
@@ -50,7 +52,7 @@ final class DefaultVoterHelper implements VoterHelperInterface
|
||||
}
|
||||
|
||||
if (NULL === $subject) {
|
||||
return 0 < count($this->authorizationHelper->getReachableCenters($token->getUser(), $attribute, null));
|
||||
return [] !== $this->authorizationHelper->getReachableCenters($token->getUser(), $attribute, null);
|
||||
}
|
||||
|
||||
return $this->authorizationHelper->userHasAccess(
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Security\Authorization;
|
||||
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Security\Authorization;
|
||||
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
@@ -8,5 +10,5 @@ interface VoterHelperInterface
|
||||
{
|
||||
public function supports($attribute, $subject): bool;
|
||||
|
||||
public function voteOnAttribute($attribute, $subject, TokenInterface $token);
|
||||
public function voteOnAttribute($attribute, $subject, TokenInterface $token): bool;
|
||||
}
|
||||
|
Reference in New Issue
Block a user