Modernize to PHP 8.0

This commit is contained in:
Yassine Guedidi
2025-04-05 13:56:56 +02:00
parent 1d5674a230
commit a107773c11
31 changed files with 97 additions and 199 deletions

View File

@ -35,12 +35,9 @@ class IgnoreOriginUserRuleVoter extends Voter
return false;
}
switch ($attribute) {
case self::EDIT:
case self::DELETE:
return $subject->getConfig()->getUser() === $user;
}
return false;
return match ($attribute) {
self::EDIT, self::DELETE => $subject->getConfig()->getUser() === $user,
default => false,
};
}
}