From 2ba534e8aa163accb787a42fb296e31db4ceda9e Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Sun, 8 Dec 2024 01:00:27 +0400 Subject: [PATCH] fix: add nullable params (PHP 8.4 compatibility) --- composer.lock | 12 ++++++------ src/Client/TrapHandle/Dumper.php | 2 +- src/Client/TrapHandle/StaticState.php | 4 ++-- src/Sender/RemoteSender.php | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index d11b4252..b8ff7e7d 100644 --- a/composer.lock +++ b/composer.lock @@ -5767,16 +5767,16 @@ }, { "name": "spiral/code-style", - "version": "v2.2.0", + "version": "v2.2.1", "source": { "type": "git", "url": "https://github.com/spiral/code-style.git", - "reference": "672d982dc52191616aa167b75414816922935604" + "reference": "e1372d893e3ad8d400733620c99af3418490bed0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/code-style/zipball/672d982dc52191616aa167b75414816922935604", - "reference": "672d982dc52191616aa167b75414816922935604", + "url": "https://api.github.com/repos/spiral/code-style/zipball/e1372d893e3ad8d400733620c99af3418490bed0", + "reference": "e1372d893e3ad8d400733620c99af3418490bed0", "shasum": "" }, "require": { @@ -5811,7 +5811,7 @@ "description": "Code style and static analysis tools rulesets collection", "homepage": "https://github.com/spiral/code-style", "support": { - "source": "https://github.com/spiral/code-style/tree/v2.2.0" + "source": "https://github.com/spiral/code-style/tree/v2.2.1" }, "funding": [ { @@ -5819,7 +5819,7 @@ "type": "github" } ], - "time": "2024-10-23T14:13:49+00:00" + "time": "2024-12-07T20:55:03+00:00" }, { "name": "symfony/event-dispatcher", diff --git a/src/Client/TrapHandle/Dumper.php b/src/Client/TrapHandle/Dumper.php index 10e662f6..81ae827d 100644 --- a/src/Client/TrapHandle/Dumper.php +++ b/src/Client/TrapHandle/Dumper.php @@ -38,7 +38,7 @@ public static function dump(mixed $var, string|int|null $label = null, int $dept * @return null|callable(mixed, string|null, int): mixed * @psalm-suppress MixedInferredReturnType, MixedPropertyTypeCoercion, MismatchingDocblockReturnType */ - public static function setHandler(callable $callable = null): ?\Closure + public static function setHandler(?callable $callable = null): ?\Closure { return ([$callable, self::$handler] = [self::$handler, $callable === null ? null : $callable(...)])[0]; } diff --git a/src/Client/TrapHandle/StaticState.php b/src/Client/TrapHandle/StaticState.php index 77a70966..0789a479 100644 --- a/src/Client/TrapHandle/StaticState.php +++ b/src/Client/TrapHandle/StaticState.php @@ -31,8 +31,8 @@ private function __construct( * @param StackTraceWithObjects|null $stackTraceWithObjects */ public static function new( - array $stackTrace = null, - array $stackTraceWithObjects = null, + ?array $stackTrace = null, + ?array $stackTraceWithObjects = null, ): self { $new = new self( $stackTrace ?? StackTrace::stackTrace(provideObjects: false), diff --git a/src/Sender/RemoteSender.php b/src/Sender/RemoteSender.php index c8d2cf5c..93ce6ff8 100644 --- a/src/Sender/RemoteSender.php +++ b/src/Sender/RemoteSender.php @@ -16,7 +16,7 @@ final class RemoteSender extends SocketSender private readonly string $clientVersion; public function __construct( - string $uuid = null, + ?string $uuid = null, string $host = '127.0.0.1', int $port = 9912, ) {