mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-27 22:34:32 +02:00
Applied symplify rules to codebase.
This commit is contained in:
parent
2f20d90041
commit
388e847b17
136 changed files with 1370 additions and 789 deletions
|
@ -26,6 +26,7 @@ namespace App\Security\Voter;
|
|||
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\UserSystem\User;
|
||||
use function in_array;
|
||||
|
||||
class AttachmentVoter extends ExtendedVoter
|
||||
{
|
||||
|
@ -54,7 +55,7 @@ class AttachmentVoter extends ExtendedVoter
|
|||
protected function supports($attribute, $subject)
|
||||
{
|
||||
if ($subject instanceof Attachment) {
|
||||
return \in_array($attribute, $this->resolver->listOperationsForPermission('parts_attachments'), false);
|
||||
return in_array($attribute, $this->resolver->listOperationsForPermission('parts_attachments'), false);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue