mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-22 02:49:31 +00:00
Applied symplify rules to codebase.
This commit is contained in:
parent
2f20d90041
commit
388e847b17
136 changed files with 1370 additions and 789 deletions
|
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
|||
namespace App\Security\Voter;
|
||||
|
||||
use App\Entity\UserSystem\User;
|
||||
use function in_array;
|
||||
|
||||
class UserVoter extends ExtendedVoter
|
||||
{
|
||||
|
|
@ -39,7 +40,7 @@ class UserVoter extends ExtendedVoter
|
|||
protected function supports($attribute, $subject)
|
||||
{
|
||||
if ($subject instanceof User) {
|
||||
return \in_array($attribute, array_merge(
|
||||
return in_array($attribute, array_merge(
|
||||
$this->resolver->listOperationsForPermission('users'),
|
||||
$this->resolver->listOperationsForPermission('self')),
|
||||
false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue