mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 14:04:30 +02:00
Fixed some PHPStan level 5 issues
This commit is contained in:
parent
74051c5649
commit
19530a9102
35 changed files with 95 additions and 63 deletions
|
@ -58,6 +58,11 @@ class UpgradePermissionsSchemaSubscriber implements EventSubscriberInterface
|
|||
$session = $event->getRequest()->getSession();
|
||||
$flashBag = $session->getFlashBag();
|
||||
|
||||
//Check if the user is an instance of User, otherwise we can't upgrade the schema
|
||||
if (!$user instanceof User) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->permissionSchemaUpdater->isSchemaUpdateNeeded($user)) {
|
||||
$this->eventCommentHelper->setMessage('Automatic permission schema update');
|
||||
$this->permissionSchemaUpdater->userUpgradeSchemaRecursively($user);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue