From 16b58bb0595792d876e3ccf36892898b676aabb4 Mon Sep 17 00:00:00 2001 From: rgaunt Date: Tue, 23 Sep 2025 12:51:39 +1000 Subject: [PATCH] Added explicit nullable type. --- src/Rest/HttpExchangeFormatter.php | 2 +- src/Rest/RestApiBrowser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Rest/HttpExchangeFormatter.php b/src/Rest/HttpExchangeFormatter.php index f4cee95..d757089 100644 --- a/src/Rest/HttpExchangeFormatter.php +++ b/src/Rest/HttpExchangeFormatter.php @@ -11,7 +11,7 @@ class HttpExchangeFormatter private $response; - public function __construct(RequestInterface $request = null, ResponseInterface $response = null) + public function __construct(?RequestInterface $request = null, ?ResponseInterface $response = null) { $this->request = $request; $this->response = $response; diff --git a/src/Rest/RestApiBrowser.php b/src/Rest/RestApiBrowser.php index 60143bc..406016c 100644 --- a/src/Rest/RestApiBrowser.php +++ b/src/Rest/RestApiBrowser.php @@ -40,7 +40,7 @@ class RestApiBrowser /** * @param string $host */ - public function __construct($host, ClientInterface $httpClient = null) + public function __construct($host, ?ClientInterface $httpClient = null) { $this->host = $host; $this->httpClient = $httpClient ?: Psr18ClientDiscovery::find();