From b14d0b24800f7e8bbc9699c56f1fba3484831d65 Mon Sep 17 00:00:00 2001 From: Andrej Rypo Date: Wed, 17 Jul 2024 10:30:33 +0200 Subject: [PATCH] PHP 8.4 compatibility --- src/Http/HttpClientContextStrata.php | 2 +- src/Http/HttpServerContextStrata.php | 2 +- src/LogicException.php | 2 +- src/RuntimeException.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Http/HttpClientContextStrata.php b/src/Http/HttpClientContextStrata.php index e59ed9c..28e0e0f 100644 --- a/src/Http/HttpClientContextStrata.php +++ b/src/Http/HttpClientContextStrata.php @@ -30,7 +30,7 @@ trait HttpClientContextStrata { use ContextStrata; - public function __construct($message = null, $code = 0, Throwable $previous = null) + public function __construct(?string $message = null, ?int $code = 0, ?Throwable $previous = null) { parent::__construct($message ?? $this->suggestErrorMessage(), $code ?? 0, $previous); } diff --git a/src/Http/HttpServerContextStrata.php b/src/Http/HttpServerContextStrata.php index fff2b49..d3e46db 100644 --- a/src/Http/HttpServerContextStrata.php +++ b/src/Http/HttpServerContextStrata.php @@ -30,7 +30,7 @@ trait HttpServerContextStrata { use ContextStrata; - public function __construct($message = null, $code = 0, Throwable $previous = null) + public function __construct(?string $message = null, ?int $code = 0, ?Throwable $previous = null) { parent::__construct($message ?? $this->suggestErrorMessage(), $code ?? 0, $previous); } diff --git a/src/LogicException.php b/src/LogicException.php index 8034929..ee574ca 100644 --- a/src/LogicException.php +++ b/src/LogicException.php @@ -18,7 +18,7 @@ class LogicException extends \LogicException implements { use ContextStrata; - public function __construct($message = null, $code = 0, Throwable $previous = null) + public function __construct(?string $message = null, ?int $code = 0, ?Throwable $previous = null) { parent::__construct($message ?? '', $code ?? 0, $previous); } diff --git a/src/RuntimeException.php b/src/RuntimeException.php index c25bb5a..3847b31 100644 --- a/src/RuntimeException.php +++ b/src/RuntimeException.php @@ -18,7 +18,7 @@ class RuntimeException extends \RuntimeException implements { use ContextStrata; - public function __construct($message = null, $code = 0, Throwable $previous = null) + public function __construct(?string $message = null, ?int $code = 0, ?Throwable $previous = null) { parent::__construct($message ?? '', $code ?? 0, $previous); }