mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Fixed static analysis issues.
This commit is contained in:
parent
51e05a8669
commit
58ada496e4
4 changed files with 11 additions and 4 deletions
|
@ -73,6 +73,10 @@ class UserCacheKeyGenerator
|
|||
$user = $this->security->getUser();
|
||||
}
|
||||
|
||||
if (!$user instanceof User){
|
||||
throw new \RuntimeException('UserCacheKeyGenerator::generateKey() was called without a user, but no user is logged in!');
|
||||
}
|
||||
|
||||
//If the user is null, then treat it as anonymous user.
|
||||
//When the anonymous user is passed as user then use this path too.
|
||||
if (null === $user || User::ID_ANONYMOUS === $user->getID()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue