diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 17:54:00 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 18:16:35 +0200 |
commit | fedf9c69d9c84fc0399badef39ed765de72c08f1 (patch) | |
tree | bfaae1e7efb907cb236769fada35a9cd05ebf29e /lib/private/Authentication | |
parent | 60be722ee8781d9e94ecc66d62c0e5fcb7e3934e (diff) | |
download | nextcloud-server-fedf9c69d9c84fc0399badef39ed765de72c08f1.tar.gz nextcloud-server-fedf9c69d9c84fc0399badef39ed765de72c08f1.zip |
Use matching parameter names form interfaces and implementations
Found by Psalm 3.14.1
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r-- | lib/private/Authentication/Token/IProvider.php | 4 | ||||
-rw-r--r-- | lib/private/Authentication/Token/PublicKeyTokenProvider.php | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php index 384828c207e..2b6223fded9 100644 --- a/lib/private/Authentication/Token/IProvider.php +++ b/lib/private/Authentication/Token/IProvider.php @@ -140,13 +140,13 @@ interface IProvider { /** * Get the (unencrypted) password of the given token * - * @param IToken $token + * @param IToken $savedToken * @param string $tokenId * @throws InvalidTokenException * @throws PasswordlessTokenException * @return string */ - public function getPassword(IToken $token, string $tokenId): string; + public function getPassword(IToken $savedToken, string $tokenId): string; /** * Encrypt and set the password of the given token diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index 091f47d7da3..7fe4a0d8703 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -227,20 +227,20 @@ class PublicKeyTokenProvider implements IProvider { return $this->mapper->getTokenByUser($uid); } - public function getPassword(IToken $token, string $tokenId): string { - if (!($token instanceof PublicKeyToken)) { + public function getPassword(IToken $savedToken, string $tokenId): string { + if (!($savedToken instanceof PublicKeyToken)) { throw new InvalidTokenException("Invalid token type"); } - if ($token->getPassword() === null) { + if ($savedToken->getPassword() === null) { throw new PasswordlessTokenException(); } // Decrypt private key with tokenId - $privateKey = $this->decrypt($token->getPrivateKey(), $tokenId); + $privateKey = $this->decrypt($savedToken->getPrivateKey(), $tokenId); // Decrypt password with private key - return $this->decryptPassword($token->getPassword(), $privateKey); + return $this->decryptPassword($savedToken->getPassword(), $privateKey); } public function setPassword(IToken $token, string $tokenId, string $password) { |