removed return values

This commit is contained in:
julien57 2019-06-27 18:49:16 +02:00
parent c10ad18c5a
commit 44e5b0b6e7
2 changed files with 6 additions and 6 deletions

View File

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

View File

@ -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.