mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 14:04:30 +02:00
Fixed some more psalm issues.
This commit is contained in:
parent
cb0aa7bc7a
commit
a28e81065f
11 changed files with 25 additions and 18 deletions
|
@ -43,6 +43,7 @@ declare(strict_types=1);
|
|||
namespace App\Security\Voter;
|
||||
|
||||
use App\Entity\UserSystem\User;
|
||||
use App\Repository\UserRepository;
|
||||
use App\Services\PermissionResolver;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
|
@ -76,6 +77,7 @@ abstract class ExtendedVoter extends Voter
|
|||
|
||||
// if the user is anonymous, we use the anonymous user.
|
||||
if (! $user instanceof User) {
|
||||
/** @var UserRepository $repo */
|
||||
$repo = $this->entityManager->getRepository(User::class);
|
||||
$user = $repo->getAnonymousUser();
|
||||
if (null === $user) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue