66use Illuminate \Cache \CacheManager ;
77use Illuminate \Support \Collection ;
88use Illuminate \Container \Container ;
9+ use Dingo \Api \Http \RateLimit \Throttle \Route ;
10+ use Dingo \Api \Contract \Http \RateLimit \Throttle ;
911
1012class Handler
1113{
@@ -33,7 +35,7 @@ class Handler
3335 /**
3436 * Throttle used for rate limiting.
3537 *
36- * @var \Dingo\Api\Http\RateLimit\Throttle \Throttle
38+ * @var \Dingo\Api\Contract\ Http\RateLimit\Throttle
3739 */
3840 protected $ throttle ;
3941
@@ -89,14 +91,14 @@ public function rateLimitRequest(Request $request, $limit = 0, $expires = 0)
8991
9092 // If the throttle instance is already set then we'll just carry on as
9193 // per usual.
92- if ($ this ->throttle instanceof Throttle \Throttle ) {
94+ if ($ this ->throttle instanceof Throttle) {
9395 //
9496
9597 // If the developer specified a certain amount of requests or expiration
9698 // time on a specific route then we'll always use the route specific
9799 // throttle with the given values.
98100 } elseif ($ limit > 0 || $ expires > 0 ) {
99- $ this ->throttle = new Throttle \ Route (['limit ' => $ limit , 'expires ' => $ expires ]);
101+ $ this ->throttle = new Route (['limit ' => $ limit , 'expires ' => $ expires ]);
100102
101103 $ this ->keyPrefix = md5 ($ request ->path ());
102104
@@ -256,7 +258,7 @@ public function setRateLimiter(callable $limiter)
256258 /**
257259 * Set the throttle to use for rate limiting.
258260 *
259- * @param string|\Dingo\Api\Http\RateLimit\Throttle \Throttle
261+ * @param string|\Dingo\Api\Contract\ Http\RateLimit\Throttle
260262 *
261263 * @return void
262264 */
@@ -272,7 +274,7 @@ public function setThrottle($throttle)
272274 /**
273275 * Get the throttle used to rate limit the request.
274276 *
275- * @return \Dingo\Api\Http\RateLimit\Throttle \Throttle
277+ * @return \Dingo\Api\Contract\ Http\RateLimit\Throttle
276278 */
277279 public function getThrottle ()
278280 {
0 commit comments