Skip to content

Commit e7ad734

Browse files
add missing types (#55445)
1 parent c0be602 commit e7ad734

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Illuminate/Cache/RateLimiter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function limiter($name)
9999
* @param string $key
100100
* @param int $maxAttempts
101101
* @param \Closure $callback
102-
* @param int $decaySeconds
102+
* @param \DateTimeInterface|\DateInterval|int $decaySeconds
103103
* @return mixed
104104
*/
105105
public function attempt($key, $maxAttempts, Closure $callback, $decaySeconds = 60)
@@ -141,7 +141,7 @@ public function tooManyAttempts($key, $maxAttempts)
141141
* Increment (by 1) the counter for a given key for a given decay time.
142142
*
143143
* @param string $key
144-
* @param int $decaySeconds
144+
* @param \DateTimeInterface|\DateInterval|int $decaySeconds
145145
* @return int
146146
*/
147147
public function hit($key, $decaySeconds = 60)
@@ -153,7 +153,7 @@ public function hit($key, $decaySeconds = 60)
153153
* Increment the counter for a given key for a given decay time by a given amount.
154154
*
155155
* @param string $key
156-
* @param int $decaySeconds
156+
* @param \DateTimeInterface|\DateInterval|int $decaySeconds
157157
* @param int $amount
158158
* @return int
159159
*/
@@ -184,7 +184,7 @@ public function increment($key, $decaySeconds = 60, $amount = 1)
184184
* Decrement the counter for a given key for a given decay time by a given amount.
185185
*
186186
* @param string $key
187-
* @param int $decaySeconds
187+
* @param \DateTimeInterface|\DateInterval|int $decaySeconds
188188
* @param int $amount
189189
* @return int
190190
*/

src/Illuminate/Support/Facades/RateLimiter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/**
66
* @method static \Illuminate\Cache\RateLimiter for(\BackedEnum|\UnitEnum|string $name, \Closure $callback)
77
* @method static \Closure|null limiter(\BackedEnum|\UnitEnum|string $name)
8-
* @method static mixed attempt(string $key, int $maxAttempts, \Closure $callback, int $decaySeconds = 60)
8+
* @method static mixed attempt(string $key, int $maxAttempts, \Closure $callback, \DateTimeInterface|\DateInterval|int $decaySeconds = 60)
99
* @method static bool tooManyAttempts(string $key, int $maxAttempts)
10-
* @method static int hit(string $key, int $decaySeconds = 60)
11-
* @method static int increment(string $key, int $decaySeconds = 60, int $amount = 1)
12-
* @method static int decrement(string $key, int $decaySeconds = 60, int $amount = 1)
10+
* @method static int hit(string $key, \DateTimeInterface|\DateInterval|int $decaySeconds = 60)
11+
* @method static int increment(string $key, \DateTimeInterface|\DateInterval|int $decaySeconds = 60, int $amount = 1)
12+
* @method static int decrement(string $key, \DateTimeInterface|\DateInterval|int $decaySeconds = 60, int $amount = 1)
1313
* @method static mixed attempts(string $key)
1414
* @method static mixed resetAttempts(string $key)
1515
* @method static int remaining(string $key, int $maxAttempts)

0 commit comments

Comments
 (0)