@@ -42,10 +42,11 @@ public function __construct(RateLimiter $limiter)
4242 /**
4343 * Handle an incoming request.
4444 *
45- * @param \Illuminate\Http\Request $request
46- * @param int|string $maxAttempts
47- * @param float|int $decayMinutes
48- * @param string $prefix
45+ * @param \Illuminate\Http\Request $request
46+ * @param int|string $maxAttempts
47+ * @param float|int $decayMinutes
48+ * @param string $prefix
49+ *
4950 * @return \Symfony\Component\HttpFoundation\Response
5051 *
5152 * @throws \Illuminate\Http\Exceptions\ThrottleRequestsException
@@ -73,8 +74,9 @@ public function handle($request, Closure $next, $maxAttempts = 60, $decayMinutes
7374 /**
7475 * Resolve the number of attempts if the user is authenticated or not.
7576 *
76- * @param \Illuminate\Http\Request $request
77- * @param int|string $maxAttempts
77+ * @param \Illuminate\Http\Request $request
78+ * @param int|string $maxAttempts
79+ *
7880 * @return int
7981 */
8082 protected function resolveMaxAttempts ($ request , $ maxAttempts )
@@ -83,7 +85,7 @@ protected function resolveMaxAttempts($request, $maxAttempts)
8385 $ maxAttempts = explode ('| ' , $ maxAttempts , 2 )[$ request ->user () ? 1 : 0 ];
8486 }
8587
86- if (! is_numeric ($ maxAttempts ) && $ request ->user ()) {
88+ if (!is_numeric ($ maxAttempts ) && $ request ->user ()) {
8789 $ maxAttempts = $ request ->user ()->{$ maxAttempts };
8890 }
8991
@@ -93,7 +95,8 @@ protected function resolveMaxAttempts($request, $maxAttempts)
9395 /**
9496 * Resolve request signature.
9597 *
96- * @param \Illuminate\Http\Request $request
98+ * @param \Illuminate\Http\Request $request
99+ *
97100 * @return string
98101 *
99102 * @throws \RuntimeException
@@ -110,8 +113,9 @@ protected function resolveRequestSignature($request)
110113 /**
111114 * Create a 'too many attempts' exception.
112115 *
113- * @param string $key
114- * @param int $maxAttempts
116+ * @param string $key
117+ * @param int $maxAttempts
118+ *
115119 * @return \Illuminate\Http\Exceptions\ThrottleRequestsException
116120 */
117121 protected function buildException ($ key , $ maxAttempts )
@@ -132,7 +136,8 @@ protected function buildException($key, $maxAttempts)
132136 /**
133137 * Get the number of seconds until the next retry.
134138 *
135- * @param string $key
139+ * @param string $key
140+ *
136141 * @return int
137142 */
138143 protected function getTimeUntilNextRetry ($ key )
@@ -143,9 +148,10 @@ protected function getTimeUntilNextRetry($key)
143148 /**
144149 * Add the limit header information to the given response.
145150 *
146- * @param int $maxAttempts
147- * @param int $remainingAttempts
148- * @param int|null $retryAfter
151+ * @param int $maxAttempts
152+ * @param int $remainingAttempts
153+ * @param int|null $retryAfter
154+ *
149155 * @return \Symfony\Component\HttpFoundation\Response
150156 */
151157 protected function addHeaders (Response $ response , $ maxAttempts , $ remainingAttempts , $ retryAfter = null )
@@ -160,9 +166,10 @@ protected function addHeaders(Response $response, $maxAttempts, $remainingAttemp
160166 /**
161167 * Get the limit headers information.
162168 *
163- * @param int $maxAttempts
164- * @param int $remainingAttempts
165- * @param int|null $retryAfter
169+ * @param int $maxAttempts
170+ * @param int $remainingAttempts
171+ * @param int|null $retryAfter
172+ *
166173 * @return array
167174 */
168175 protected function getHeaders ($ maxAttempts , $ remainingAttempts , $ retryAfter = null )
@@ -172,7 +179,7 @@ protected function getHeaders($maxAttempts, $remainingAttempts, $retryAfter = nu
172179 'X-RateLimit-Remaining ' => $ remainingAttempts ,
173180 ];
174181
175- if (! is_null ($ retryAfter )) {
182+ if (!is_null ($ retryAfter )) {
176183 $ headers ['Retry-After ' ] = $ retryAfter ;
177184 $ headers ['X-RateLimit-Reset ' ] = $ this ->availableAt ($ retryAfter );
178185 }
@@ -183,9 +190,10 @@ protected function getHeaders($maxAttempts, $remainingAttempts, $retryAfter = nu
183190 /**
184191 * Calculate the number of remaining attempts.
185192 *
186- * @param string $key
187- * @param int $maxAttempts
188- * @param int|null $retryAfter
193+ * @param string $key
194+ * @param int $maxAttempts
195+ * @param int|null $retryAfter
196+ *
189197 * @return int
190198 */
191199 protected function calculateRemainingAttempts ($ key , $ maxAttempts , $ retryAfter = null )
0 commit comments