From c1a66e19b1b56476b3a2e58983b4abe36049b932 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Thu, 26 Feb 2026 22:05:26 +0100 Subject: [PATCH] TASK: PHP8.4 compatibility --- Classes/Controller/TerminalCommandController.php | 8 ++++---- Classes/Domain/CommandContext.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Classes/Controller/TerminalCommandController.php b/Classes/Controller/TerminalCommandController.php index 780f345..c44c32e 100644 --- a/Classes/Controller/TerminalCommandController.php +++ b/Classes/Controller/TerminalCommandController.php @@ -90,10 +90,10 @@ public function getCommandsAction(): void */ public function invokeCommandAction( string $commandName, - string $argument = null, - Node $siteNode = null, - Node $documentNode = null, - Node $focusedNode = null + ?string $argument = null, + ?Node $siteNode = null, + ?Node $documentNode = null, + ?Node $focusedNode = null ): void { $this->response->setContentType('application/json'); diff --git a/Classes/Domain/CommandContext.php b/Classes/Domain/CommandContext.php index bdab2a7..9119cde 100644 --- a/Classes/Domain/CommandContext.php +++ b/Classes/Domain/CommandContext.php @@ -37,7 +37,7 @@ public function getSiteNode(): ?Node return $this->siteNode; } - public function withSiteNode(Node $siteNode = null): CommandContext + public function withSiteNode(?Node $siteNode = null): CommandContext { $instance = clone $this; $instance->siteNode = $siteNode; @@ -49,7 +49,7 @@ public function getDocumentNode(): ?Node return $this->documentNode; } - public function withDocumentNode(Node $documentNode = null): CommandContext + public function withDocumentNode(?Node $documentNode = null): CommandContext { $instance = clone $this; $instance->documentNode = $documentNode; @@ -61,7 +61,7 @@ public function getFocusedNode(): ?Node return $this->focusedNode; } - public function withFocusedNode(Node $focusedNode = null): CommandContext + public function withFocusedNode(?Node $focusedNode = null): CommandContext { $instance = clone $this; $instance->focusedNode = $focusedNode;