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; }