From 0694b50eb6dba555926d7ef612961737bd1247fd Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Fri, 22 May 2026 19:54:16 +0000 Subject: [PATCH] - Fixed null value declaration --- src/Util/DumpHandler.php | 11 ++++------- src/Util/ExceptionHandler.php | 9 +++------ src/Util/TaskHandler.php | 9 +++------ 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/Util/DumpHandler.php b/src/Util/DumpHandler.php index 6ea906f..77f234a 100644 --- a/src/Util/DumpHandler.php +++ b/src/Util/DumpHandler.php @@ -5,13 +5,10 @@ namespace Negundo\Client\Util; use Negundo\Client\DataInterface; class DumpHandler { - - public ? DataInterface $dataManipulator; - - public function __construct(DataInterface $dataManipulator = null) - { - $this->dataManipulator = $dataManipulator; - } + + public function __construct( + public ? DataInterface $dataManipulator = null + ) {} public function dumpData(...$content) : array { diff --git a/src/Util/ExceptionHandler.php b/src/Util/ExceptionHandler.php index f570a3e..fa6a2fa 100644 --- a/src/Util/ExceptionHandler.php +++ b/src/Util/ExceptionHandler.php @@ -6,12 +6,9 @@ use Negundo\Client\DataInterface; class ExceptionHandler { - public ? DataInterface $dataManipulator; - - public function __construct(DataInterface $dataManipulator = null) - { - $this->dataManipulator = $dataManipulator; - } + public function __construct( + public ? DataInterface $dataManipulator = null + ) {} public function extractExceptionData(\Throwable $ex, array $serverData, array $postData, $dataManipulator = null) : array { diff --git a/src/Util/TaskHandler.php b/src/Util/TaskHandler.php index e88b064..e9f60f3 100644 --- a/src/Util/TaskHandler.php +++ b/src/Util/TaskHandler.php @@ -6,12 +6,9 @@ use Negundo\Client\DataInterface; class TaskHandler { - public ? DataInterface $dataManipulator; - - public function __construct(DataInterface $dataManipulator = null) - { - $this->dataManipulator = $dataManipulator; - } + public function __construct( + public ? DataInterface $dataManipulator = null + ) {} public function sendReport(string $message, ? string $title = null, array $data = [], array $events = []) : array {