We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31fb03b commit 10f772aCopy full SHA for 10f772a
2 files changed
system/Throttle/Throttler.php
@@ -79,10 +79,9 @@ public function getTokenTime(): int
79
*
80
* Example:
81
82
- * if (! $throttler->check($request->ipAddress(), 60, MINUTE))
83
- * {
+ * if (! $throttler->check($request->ipAddress(), 60, MINUTE)) {
84
* die('You submitted over 60 requests within a minute.');
85
- * }
+ * }
86
87
* @param string $key The name to use as the "bucket" name.
88
* @param int $capacity The number of requests the "bucket" can hold
tests/system/Throttle/ThrottleTest.php
@@ -56,7 +56,7 @@ public function testTokenTimeCalculation()
56
$throttler->setTestTime($time);
57
58
$capacity = 2;
59
- $seconds = 200;
+ $seconds = 200;
60
61
// refresh = 200 / 2 = 100 seconds
62
// refresh rate = 2 / 200 = 0.01 token per second
0 commit comments