From 4f66ecd5bd89d71e0e894051a16276b2656abed1 Mon Sep 17 00:00:00 2001 From: cbepxpa3ym Date: Mon, 9 Dec 2024 13:11:00 +0200 Subject: [PATCH] Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead. (#70) --- src/Client.php | 2 +- src/ResponseBuilder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 35235f4..89a28af 100644 --- a/src/Client.php +++ b/src/Client.php @@ -28,7 +28,7 @@ public function __construct(ClientInterface $httpClient, ResponseBuilder $respon * @throws \UnexpectedValueException When response body is not a valid json * @throws \RuntimeException When there are transfer errors */ - public function query(string $query, array $variables = null): Response + public function query(string $query, ?array $variables = null): Response { return $this->executeQuery($query, $variables); } diff --git a/src/ResponseBuilder.php b/src/ResponseBuilder.php index ddb7782..cf385e4 100644 --- a/src/ResponseBuilder.php +++ b/src/ResponseBuilder.php @@ -8,7 +8,7 @@ class ResponseBuilder { private $dataObjectBuilder; - public function __construct(DataObjectBuilder $dataObjectBuilder = null) + public function __construct(?DataObjectBuilder $dataObjectBuilder = null) { $this->dataObjectBuilder = $dataObjectBuilder; }