From 1c6c3d13d5540e475657280c389b6eeda62ddbf6 Mon Sep 17 00:00:00 2001 From: LevFlavien Date: Thu, 9 Jun 2022 10:34:44 +0200 Subject: [PATCH] Refact: Use AccessTokenStorageInterface instead of AccessTokenSessionStorage --- src/Controller/WelcomeAction.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/WelcomeAction.php b/src/Controller/WelcomeAction.php index 114b460..fea1e88 100644 --- a/src/Controller/WelcomeAction.php +++ b/src/Controller/WelcomeAction.php @@ -4,7 +4,7 @@ namespace App\Controller; -use App\Storage\AccessTokenSessionStorage; +use App\Storage\AccessTokenStorageInterface; use App\Validator\ReachableUrl; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; @@ -20,7 +20,7 @@ final class WelcomeAction public function __construct( private TwigEnvironment $twig, private RouterInterface $router, - private AccessTokenSessionStorage $accessTokenSessionStorage, + private AccessTokenStorageInterface $accessTokenStorage, private ValidatorInterface $validator, ) { } @@ -42,7 +42,7 @@ public function __invoke(Request $request): Response $session->set('pim_url', \rtrim((string) $pimUrl, '/')); - $accessToken = $this->accessTokenSessionStorage->getAccessToken(); + $accessToken = $this->accessTokenStorage->getAccessToken(); if (null !== $accessToken) { return new RedirectResponse($this->router->generate('catalogs')); }