From 6e62057177e2bba32c2070935a4c5a700f801cc5 Mon Sep 17 00:00:00 2001 From: kcasas Date: Fri, 14 Jul 2017 13:33:19 +0800 Subject: [PATCH] changed RetryHandler method name for deciding retries --- src/Zendesk/API/Middleware/RetryHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Zendesk/API/Middleware/RetryHandler.php b/src/Zendesk/API/Middleware/RetryHandler.php index ca8f44f1..d81a0956 100644 --- a/src/Zendesk/API/Middleware/RetryHandler.php +++ b/src/Zendesk/API/Middleware/RetryHandler.php @@ -37,7 +37,7 @@ public function __construct(array $config = []) * * @return callable */ - public function decider() + public function shouldRetryRequest() { return function ($retries, Request $request, $response, $exception) { if ($retries >= $this->options['max']) { @@ -76,7 +76,7 @@ public function delay() */ public function __invoke(callable $handler) { - $retryMiddleware = new RetryMiddleware($this->decider(), $handler, $this->delay()); + $retryMiddleware = new RetryMiddleware($this->shouldRetryRequest(), $handler, $this->delay()); return $retryMiddleware; }