mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 03:53:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -21,8 +21,6 @@ use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use UnexpectedValueException;
|
||||
use function in_array;
|
||||
|
||||
class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface, ChillVoterInterface
|
||||
{
|
||||
@@ -71,7 +69,7 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface, Chi
|
||||
protected function supports($attribute, $subject)
|
||||
{
|
||||
return ($subject instanceof Household
|
||||
&& in_array($attribute, self::ALL, true))
|
||||
&& \in_array($attribute, self::ALL, true))
|
||||
|| $this->helper->supports($attribute, $subject);
|
||||
}
|
||||
|
||||
@@ -81,7 +79,7 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface, Chi
|
||||
self::SEE => $this->checkAssociatedMembersRole($subject, PersonVoter::SEE),
|
||||
self::EDIT => $this->checkAssociatedMembersRole($subject, PersonVoter::UPDATE),
|
||||
self::STATS => $this->voteOnAttribute($attribute, $subject, $token),
|
||||
default => throw new UnexpectedValueException('attribute not supported'),
|
||||
default => throw new \UnexpectedValueException('attribute not supported'),
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user