From 1af5fd5b72e059c8942071955bea53f8f48c37fc Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 26 Jul 2024 11:47:45 +0545 Subject: [PATCH] fix: PHP 8.4 compliance --- lib/Client.php | 2 +- lib/Response.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Client.php b/lib/Client.php index 0837e8d..ed07045 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -175,7 +175,7 @@ public function send(RequestInterface $request): ResponseInterface * After calling sendAsync, you must therefore occasionally call the poll() * method, or wait(). */ - public function sendAsync(RequestInterface $request, callable $success = null, callable $error = null) + public function sendAsync(RequestInterface $request, ?callable $success = null, ?callable $error = null) { $this->emit('beforeRequest', [$request]); $this->sendAsyncInternal($request, $success, $error); diff --git a/lib/Response.php b/lib/Response.php index c06c963..7b622fe 100644 --- a/lib/Response.php +++ b/lib/Response.php @@ -103,7 +103,7 @@ class Response extends Message implements ResponseInterface * @param array $headers * @param resource $body */ - public function __construct($status = 500, array $headers = null, $body = null) + public function __construct($status = 500, ?array $headers = null, $body = null) { if (null !== $status) { $this->setStatus($status);