From cc14f152231ab5f7344a5016dd15bd075374c64a Mon Sep 17 00:00:00 2001 From: Art4 Date: Thu, 27 Jun 2024 16:35:37 +0200 Subject: [PATCH] fix Implicitly nullable parameter declarations --- src/Redmine/Client/NativeCurlClient.php | 2 +- src/Redmine/Client/Psr18Client.php | 2 +- src/Redmine/Exception/UnexpectedResponseException.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Redmine/Client/NativeCurlClient.php b/src/Redmine/Client/NativeCurlClient.php index 7b89ea77..8eff3da3 100644 --- a/src/Redmine/Client/NativeCurlClient.php +++ b/src/Redmine/Client/NativeCurlClient.php @@ -36,7 +36,7 @@ final class NativeCurlClient implements Client, HttpClient public function __construct( string $url, string $apikeyOrUsername, - string $password = null + ?string $password = null ) { $this->url = $url; $this->apikeyOrUsername = $apikeyOrUsername; diff --git a/src/Redmine/Client/Psr18Client.php b/src/Redmine/Client/Psr18Client.php index f5048759..a62d415f 100644 --- a/src/Redmine/Client/Psr18Client.php +++ b/src/Redmine/Client/Psr18Client.php @@ -45,7 +45,7 @@ public function __construct( StreamFactoryInterface $streamFactory, string $url, string $apikeyOrUsername, - string $password = null + ?string $password = null ) { if (! $requestFactory instanceof RequestFactoryInterface && $requestFactory instanceof ServerRequestFactoryInterface) { @trigger_error( diff --git a/src/Redmine/Exception/UnexpectedResponseException.php b/src/Redmine/Exception/UnexpectedResponseException.php index 1eb693c2..12d65746 100644 --- a/src/Redmine/Exception/UnexpectedResponseException.php +++ b/src/Redmine/Exception/UnexpectedResponseException.php @@ -21,7 +21,7 @@ final class UnexpectedResponseException extends RuntimeException implements Redm */ private $response = null; - public static function create(Response $response, Throwable $prev = null): self + public static function create(Response $response, ?Throwable $prev = null): self { $e = new self( 'The Redmine server replied with an unexpected response.',