mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 14:49:55 +02:00
Fixed some deprecations.
This commit is contained in:
parent
4fa8eef1bf
commit
5fd608f42a
59 changed files with 202 additions and 165 deletions
|
@ -49,7 +49,7 @@ class LogEntryVoter extends ExtendedVoter
|
|||
{
|
||||
public const ALLOWED_OPS = ['read', 'delete'];
|
||||
|
||||
protected function voteOnUser($attribute, $subject, User $user): bool
|
||||
protected function voteOnUser(string $attribute, $subject, User $user): bool
|
||||
{
|
||||
if ('delete' === $attribute) {
|
||||
return $this->resolver->inherit($user, 'system', 'delete_logs') ?? false;
|
||||
|
@ -70,7 +70,7 @@ class LogEntryVoter extends ExtendedVoter
|
|||
return false;
|
||||
}
|
||||
|
||||
protected function supports($attribute, $subject)
|
||||
protected function supports($attribute, $subject): bool
|
||||
{
|
||||
if ($subject instanceof AbstractLogEntry) {
|
||||
return in_array($subject, static::ALLOWED_OPS, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue