Fixed some deprecations.

This commit is contained in:
Jan Böhmer 2022-08-14 19:09:07 +02:00
parent 4fa8eef1bf
commit 5fd608f42a
59 changed files with 202 additions and 165 deletions

View file

@ -33,7 +33,7 @@ class OrderdetailVoter extends ExtendedVoter
*/
protected const PART_PERMS = ['show_history', 'revert_element'];
protected function voteOnUser($attribute, $subject, User $user): bool
protected function voteOnUser(string $attribute, $subject, User $user): bool
{
if (in_array($attribute, self::PART_PERMS, true)) {
return $this->resolver->inherit($user, 'parts', $attribute) ?? false;
@ -42,7 +42,7 @@ class OrderdetailVoter extends ExtendedVoter
return $this->resolver->inherit($user, 'parts_orderdetails', $attribute) ?? false;
}
protected function supports($attribute, $subject)
protected function supports($attribute, $subject): bool
{
if (is_a($subject, Orderdetail::class, true)) {
return in_array($attribute, array_merge(