aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security/RateLimiting/Backend/IBackend.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-14 11:47:00 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-14 21:08:23 +0100
commitcf0a3399970eb00621e822923f17d3d52845e0a6 (patch)
treec7d0603711f70b29341e802e98821ca9089fa25c /lib/private/Security/RateLimiting/Backend/IBackend.php
parent60f38d37fe5ca505258510adc1e106da54426510 (diff)
downloadnextcloud-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.php13
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);
}