From 44e5b0b6e793a63487bb4054b4f75b1fd8c062e3 Mon Sep 17 00:00:00 2001 From: julien57 Date: Thu, 27 Jun 2019 18:49:16 +0200 Subject: [PATCH] removed return values --- src/Symfony/Component/Security/Csrf/CsrfTokenManager.php | 6 +++--- .../Component/Security/Csrf/CsrfTokenManagerInterface.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php index 450387a057..84a0b330bb 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php @@ -66,7 +66,7 @@ class CsrfTokenManager implements CsrfTokenManagerInterface /** * {@inheritdoc} */ - public function getToken($tokenId) + public function getToken(string $tokenId) { $namespacedId = $this->getNamespace().$tokenId; if ($this->storage->hasToken($namespacedId)) { @@ -83,7 +83,7 @@ class CsrfTokenManager implements CsrfTokenManagerInterface /** * {@inheritdoc} */ - public function refreshToken($tokenId) + public function refreshToken(string $tokenId) { $namespacedId = $this->getNamespace().$tokenId; $value = $this->generator->generateToken(); @@ -96,7 +96,7 @@ class CsrfTokenManager implements CsrfTokenManagerInterface /** * {@inheritdoc} */ - public function removeToken($tokenId) + public function removeToken(string $tokenId) { return $this->storage->removeToken($this->getNamespace().$tokenId); } diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php index a29c04fa7a..588090cd1d 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php @@ -30,7 +30,7 @@ interface CsrfTokenManagerInterface * * @return CsrfToken The CSRF token */ - public function getToken($tokenId); + public function getToken(string $tokenId); /** * Generates a new token value for the given ID. @@ -44,7 +44,7 @@ interface CsrfTokenManagerInterface * * @return CsrfToken The CSRF token */ - public function refreshToken($tokenId); + public function refreshToken(string $tokenId); /** * Invalidates the CSRF token with the given ID, if one exists. @@ -54,7 +54,7 @@ interface CsrfTokenManagerInterface * @return string|null Returns the removed token value if one existed, NULL * otherwise */ - public function removeToken($tokenId); + public function removeToken(string $tokenId); /** * Returns whether the given CSRF token is valid.