| @@ -65,9 +65,9 @@ | ||
| 65 | 65 | $retryCurlErrors = []; |
| 66 | 66 | if (\extension_loaded('curl')) { |
| 67 | 67 | $retryCurlErrors[\CURLE_RECV_ERROR] = \true; |
| 68 | 68 | } |
| 69 | - return function ($retries, CommandInterface $command, RequestInterface $request, ResultInterface $result = null, $error = null) use($maxRetries, $retryCurlErrors, $extraConfig) { | |
| 69 | + return function ($retries, CommandInterface $command, RequestInterface $request, ?ResultInterface $result = null, $error = null) use($maxRetries, $retryCurlErrors, $extraConfig) { | |
| 70 | 70 | // Allow command-level options to override this value |
| 71 | 71 | $maxRetries = null !== $command['@retries'] ? $command['@retries'] : $maxRetries; |
| 72 | 72 | $isRetryable = self::isRetryable($result, $error, $retryCurlErrors, $extraConfig); |
| 73 | 73 | if ($retries >= $maxRetries) { |
| @@ -150,9 +150,9 @@ | ||
| 150 | 150 | * @param RequestInterface $request |
| 151 | 151 | * |
| 152 | 152 | * @return PromiseInterface |
| 153 | 153 | */ |
| 154 | - public function __invoke(CommandInterface $command, RequestInterface $request = null) | |
| 154 | + public function __invoke(CommandInterface $command, ?RequestInterface $request = null) | |
| 155 | 155 | { |
| 156 | 156 | $retries = 0; |
| 157 | 157 | $requestStats = []; |
| 158 | 158 | $monitoringEvents = []; |