mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-05 23:09:35 +00:00
Fixed some deprecations.
This commit is contained in:
parent
4fa8eef1bf
commit
5fd608f42a
59 changed files with 202 additions and 165 deletions
|
|
@ -54,7 +54,7 @@ class PartVoter extends ExtendedVoter
|
|||
{
|
||||
public const READ = 'read';
|
||||
|
||||
protected function supports($attribute, $subject)
|
||||
protected function supports($attribute, $subject): bool
|
||||
{
|
||||
if (is_a($subject, Part::class, true)) {
|
||||
//Check if a sub permission should be checked -> $attribute has format name.edit
|
||||
|
|
@ -71,7 +71,7 @@ class PartVoter extends ExtendedVoter
|
|||
return false;
|
||||
}
|
||||
|
||||
protected function voteOnUser($attribute, $subject, User $user): bool
|
||||
protected function voteOnUser(string $attribute, $subject, User $user): bool
|
||||
{
|
||||
//Check for sub permissions
|
||||
if (false !== strpos($attribute, '.')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue