Skip to content

Commit

Permalink
[BUGFIX] Make phpmd happy
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiLu committed Jan 30, 2025
1 parent 158df4e commit 1ea1e43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/Domain/Repository/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ public function findByUsergroup(int $uid): QueryResultInterface
* Find by Uid but don't respect storage page
*
* @param int $uid
* @return User
* @return User|null
*/
public function findByUid($uid): ?User
{
$query = $this->createQuery();
$query->getQuerySettings()->setRespectStoragePage(false);
$query->matching($query->equals('uid', $uid));
/** @var User|null $user */
return $query->execute()->getFirst();
$user = $query->execute()->getFirst();
return $user;
}

/**
Expand Down

0 comments on commit 1ea1e43

Please sign in to comment.