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

@ -37,12 +37,12 @@ class LabelProfileVoter extends ExtendedVoter
'revert_element' => 'revert_element',
];
protected function voteOnUser($attribute, $subject, User $user): bool
protected function voteOnUser(string $attribute, $subject, User $user): bool
{
return $this->resolver->inherit($user, 'labels', self::MAPPING[$attribute]) ?? false;
}
protected function supports($attribute, $subject)
protected function supports($attribute, $subject): bool
{
if ($subject instanceof LabelProfile) {
if (!isset(self::MAPPING[$attribute])) {