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.',