mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-22 02:49:31 +00:00
Fixed some deprecations.
This commit is contained in:
parent
4fa8eef1bf
commit
5fd608f42a
59 changed files with 202 additions and 165 deletions
|
|
@ -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])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue