diff --git a/lib/Core/Util.php b/lib/Core/Util.php index fa20859f..fdd9be1f 100644 --- a/lib/Core/Util.php +++ b/lib/Core/Util.php @@ -23,7 +23,7 @@ public static function utf8($value) * * @return string A querystring, essentially. */ - public static function encodeQueryParams($arr, $prefix = null) + public static function encodeQueryParams($arr, string|null $prefix = null) { if (!is_array($arr)) { return $arr; diff --git a/lib/RetryMiddlewareFactory.php b/lib/RetryMiddlewareFactory.php index 3ed339b8..8f675298 100644 --- a/lib/RetryMiddlewareFactory.php +++ b/lib/RetryMiddlewareFactory.php @@ -32,8 +32,8 @@ private static function buildRetryDecider() return function ( $retries, \GuzzleHttp\Psr7\Request $request, - \GuzzleHttp\Psr7\Response $response = null, - \GuzzleHttp\Exception\TransferException $exception = null + \GuzzleHttp\Psr7\Response|null $response = null, + \GuzzleHttp\Exception\TransferException|null $exception = null ) { if ($retries >= self::MAX_AUTOMATIC_TIMEOUT_RETRIES) { return false; @@ -78,7 +78,7 @@ private static function buildRetryDelay() * * @return boolean */ - private static function isConnectionError(\GuzzleHttp\Exception\TransferException $exception = null) + private static function isConnectionError(\GuzzleHttp\Exception\TransferException|null $exception = null) { return $exception instanceof \GuzzleHttp\Exception\ConnectException; } @@ -90,7 +90,7 @@ private static function isConnectionError(\GuzzleHttp\Exception\TransferExceptio * * @return boolean */ - private static function isRetryableServerError(\GuzzleHttp\Psr7\Response $response = null) + private static function isRetryableServerError(\GuzzleHttp\Psr7\Response|null $response = null) { if ($response) { $statusCode = $response->getStatusCode();