@@ -42,11 +42,10 @@ 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
49- *
45+ * @param \Illuminate\Http\Request $request
46+ * @param int|string $maxAttempts
47+ * @param float|int $decayMinutes
48+ * @param string $prefix
5049 * @return \Symfony\Component\HttpFoundation\Response
5150 *
5251 * @throws \Illuminate\Http\Exceptions\ThrottleRequestsException
@@ -74,9 +73,8 @@ public function handle($request, Closure $next, $maxAttempts = 60, $decayMinutes
7473 /**
7574 * Resolve the number of attempts if the user is authenticated or not.
7675 *
77- * @param \Illuminate\Http\Request $request
78- * @param int|string $maxAttempts
79- *
76+ * @param \Illuminate\Http\Request $request
77+ * @param int|string $maxAttempts
8078 * @return int
8179 */
8280 protected function resolveMaxAttempts ($ request , $ maxAttempts )
@@ -85,7 +83,7 @@ protected function resolveMaxAttempts($request, $maxAttempts)
8583 $ maxAttempts = explode ('| ' , $ maxAttempts , 2 )[$ request ->user () ? 1 : 0 ];
8684 }
8785
88- if (!is_numeric ($ maxAttempts ) && $ request ->user ()) {
86+ if (! is_numeric ($ maxAttempts ) && $ request ->user ()) {
8987 $ maxAttempts = $ request ->user ()->{$ maxAttempts };
9088 }
9189
@@ -95,8 +93,7 @@ protected function resolveMaxAttempts($request, $maxAttempts)
9593 /**
9694 * Resolve request signature.
9795 *
98- * @param \Illuminate\Http\Request $request
99- *
96+ * @param \Illuminate\Http\Request $request
10097 * @return string
10198 *
10299 * @throws \RuntimeException
@@ -113,9 +110,8 @@ protected function resolveRequestSignature($request)
113110 /**
114111 * Create a 'too many attempts' exception.
115112 *
116- * @param string $key
117- * @param int $maxAttempts
118- *
113+ * @param string $key
114+ * @param int $maxAttempts
119115 * @return \Illuminate\Http\Exceptions\ThrottleRequestsException
120116 */
121117 protected function buildException ($ key , $ maxAttempts )
@@ -136,8 +132,7 @@ protected function buildException($key, $maxAttempts)
136132 /**
137133 * Get the number of seconds until the next retry.
138134 *
139- * @param string $key
140- *
135+ * @param string $key
141136 * @return int
142137 */
143138 protected function getTimeUntilNextRetry ($ key )
@@ -148,10 +143,9 @@ protected function getTimeUntilNextRetry($key)
148143 /**
149144 * Add the limit header information to the given response.
150145 *
151- * @param int $maxAttempts
152- * @param int $remainingAttempts
153- * @param int|null $retryAfter
154- *
146+ * @param int $maxAttempts
147+ * @param int $remainingAttempts
148+ * @param int|null $retryAfter
155149 * @return \Symfony\Component\HttpFoundation\Response
156150 */
157151 protected function addHeaders (Response $ response , $ maxAttempts , $ remainingAttempts , $ retryAfter = null )
@@ -166,10 +160,9 @@ protected function addHeaders(Response $response, $maxAttempts, $remainingAttemp
166160 /**
167161 * Get the limit headers information.
168162 *
169- * @param int $maxAttempts
170- * @param int $remainingAttempts
171- * @param int|null $retryAfter
172- *
163+ * @param int $maxAttempts
164+ * @param int $remainingAttempts
165+ * @param int|null $retryAfter
173166 * @return array
174167 */
175168 protected function getHeaders ($ maxAttempts , $ remainingAttempts , $ retryAfter = null )
@@ -179,7 +172,7 @@ protected function getHeaders($maxAttempts, $remainingAttempts, $retryAfter = nu
179172 'X-RateLimit-Remaining ' => $ remainingAttempts ,
180173 ];
181174
182- if (!is_null ($ retryAfter )) {
175+ if (! is_null ($ retryAfter )) {
183176 $ headers ['Retry-After ' ] = $ retryAfter ;
184177 $ headers ['X-RateLimit-Reset ' ] = $ this ->availableAt ($ retryAfter );
185178 }
@@ -190,10 +183,9 @@ protected function getHeaders($maxAttempts, $remainingAttempts, $retryAfter = nu
190183 /**
191184 * Calculate the number of remaining attempts.
192185 *
193- * @param string $key
194- * @param int $maxAttempts
195- * @param int|null $retryAfter
196- *
186+ * @param string $key
187+ * @param int $maxAttempts
188+ * @param int|null $retryAfter
197189 * @return int
198190 */
199191 protected function calculateRemainingAttempts ($ key , $ maxAttempts , $ retryAfter = null )
0 commit comments