Fixed some PHPStan level 5 issues

This commit is contained in:
Jan Böhmer 2023-06-13 20:24:54 +02:00
parent 74051c5649
commit 19530a9102
35 changed files with 95 additions and 63 deletions

View file

@ -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);