mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +02:00
Applied rector with PHP8.1 migration rules
This commit is contained in:
parent
dc6a67c2f0
commit
7ee01d9a05
303 changed files with 1228 additions and 3465 deletions
|
@ -44,7 +44,7 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
|
|||
*/
|
||||
public function getAnonymousUser(): ?User
|
||||
{
|
||||
if (null === $this->anonymous_user) {
|
||||
if (!$this->anonymous_user instanceof \App\Entity\UserSystem\User) {
|
||||
$this->anonymous_user = $this->findOneBy([
|
||||
'id' => User::ID_ANONYMOUS,
|
||||
]);
|
||||
|
@ -78,7 +78,7 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
|
|||
|
||||
try {
|
||||
return $qb->getQuery()->getOneOrNullResult();
|
||||
} catch (NonUniqueResultException $nonUniqueResultException) {
|
||||
} catch (NonUniqueResultException) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue