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;