Fixed PHPStan issue.

This commit is contained in:
Jan Böhmer 2020-06-01 18:21:50 +02:00
parent 1b06203ca6
commit 7de2137370
2 changed files with 4 additions and 0 deletions

View file

@ -46,6 +46,7 @@ use App\Entity\LogSystem\UserLoginLogEntry;
use App\Entity\UserSystem\User;
use App\Services\LogSystem\EventLogger;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Symfony\Component\Security\Http\SecurityEvents;
@ -64,6 +65,7 @@ final class LoginSuccessSubscriber implements EventSubscriberInterface
public function __construct(TranslatorInterface $translator, SessionInterface $session, EventLogger $eventLogger, bool $gpdr_compliance)
{
$this->translator = $translator;
/** @var $session Session */
$this->flashBag = $session->getFlashBag();
$this->eventLogger = $eventLogger;
$this->gpdr_compliance = $gpdr_compliance;

View file

@ -45,6 +45,7 @@ namespace App\EventSubscriber\UserSystem;
use App\Entity\UserSystem\User;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
@ -81,6 +82,7 @@ final class PasswordChangeNeededSubscriber implements EventSubscriberInterface
public function __construct(Security $security, SessionInterface $session, HttpUtils $httpUtils)
{
$this->security = $security;
/** @var $session Session */
$this->flashBag = $session->getFlashBag();
$this->httpUtils = $httpUtils;
}