Skip to content

fix cs violation introduced when merging master to 2.x #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/Plugin/RetryPluginSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
6 changes: 3 additions & 3 deletions src/Plugin/RetryPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down