diff --git a/spec/Plugin/RetryPluginSpec.php b/spec/Plugin/RetryPluginSpec.php index 354fc4d..e01ba54 100644 --- a/spec/Plugin/RetryPluginSpec.php +++ b/spec/Plugin/RetryPluginSpec.php @@ -109,12 +109,12 @@ public function it_respects_custom_exception_decider(RequestInterface $request, $this->beConstructedWith([ 'exception_decider' => function (RequestInterface $request, Exception $e) { return false; - } + }, ]); $exception = new Exception\NetworkException('Exception', $request->getWrappedObject()); $called = false; - $next = function (RequestInterface $receivedRequest) use($exception, &$called) { + $next = function (RequestInterface $receivedRequest) use ($exception, &$called) { if ($called) { throw new \RuntimeException('Did not expect to be called multiple times'); } diff --git a/src/Plugin/RetryPlugin.php b/src/Plugin/RetryPlugin.php index d3d372a..5292ddf 100644 --- a/src/Plugin/RetryPlugin.php +++ b/src/Plugin/RetryPlugin.php @@ -48,9 +48,9 @@ final class RetryPlugin implements Plugin /** * @param array $config { * - * @var int $retries Number of retries to attempt if an exception occurs before letting the exception bubble up. - * @var callable $exception_decider A callback that gets a request and an exception to decide after a failure whether the request should be retried. - * @var callable $exception_delay A callback that gets a request, an exception and the number of retries and returns how many microseconds we should wait before trying again. + * @var int $retries Number of retries to attempt if an exception occurs before letting the exception bubble up + * @var callable $exception_decider A callback that gets a request and an exception to decide after a failure whether the request should be retried + * @var callable $exception_delay A callback that gets a request, an exception and the number of retries and returns how many microseconds we should wait before trying again * } */ public function __construct(array $config = [])