diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-01-14 11:47:00 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-14 21:08:23 +0100 |
commit | cf0a3399970eb00621e822923f17d3d52845e0a6 (patch) | |
tree | c7d0603711f70b29341e802e98821ca9089fa25c /lib/private/Security/RateLimiting/Backend/IBackend.php | |
parent | 60f38d37fe5ca505258510adc1e106da54426510 (diff) | |
download | nextcloud-server-cf0a3399970eb00621e822923f17d3d52845e0a6.tar.gz nextcloud-server-cf0a3399970eb00621e822923f17d3d52845e0a6.zip |
Make OC\Security\RateLimiting strict
* Add return types
* Add scalar argument types
* Made strict
* Cleaned up phpstorm inspections
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Security/RateLimiting/Backend/IBackend.php')
-rw-r--r-- | lib/private/Security/RateLimiting/Backend/IBackend.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/Security/RateLimiting/Backend/IBackend.php b/lib/private/Security/RateLimiting/Backend/IBackend.php index b20d27af42b..88c10fbbc8d 100644 --- a/lib/private/Security/RateLimiting/Backend/IBackend.php +++ b/lib/private/Security/RateLimiting/Backend/IBackend.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> * @@ -39,9 +40,9 @@ interface IBackend { * @param int $seconds Seconds to look back at * @return int */ - public function getAttempts($methodIdentifier, - $userIdentifier, - $seconds); + public function getAttempts(string $methodIdentifier, + string $userIdentifier, + int $seconds): int; /** * Registers an attempt @@ -50,7 +51,7 @@ interface IBackend { * @param string $userIdentifier Identifier for the user * @param int $period Period in seconds how long this attempt should be stored */ - public function registerAttempt($methodIdentifier, - $userIdentifier, - $period); + public function registerAttempt(string $methodIdentifier, + string $userIdentifier, + int $period); } |