apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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'),
};
}