From e3b67c0ef22dfeebde167a073bbddcbcf5235aa2 Mon Sep 17 00:00:00 2001 From: Jorg Sowa Date: Tue, 28 May 2024 21:54:03 +0200 Subject: [PATCH] Reverted return types from ConnectingVisitor classes --- lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php | 6 +++--- lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index 308300327e..38fedfd506 100644 --- a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -25,12 +25,12 @@ final class NodeConnectingVisitor extends NodeVisitorAbstract { */ private $previous; - public function beforeTraverse(array $nodes): void { + public function beforeTraverse(array $nodes) { $this->stack = []; $this->previous = null; } - public function enterNode(Node $node): void { + public function enterNode(Node $node) { if (!empty($this->stack)) { $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); } @@ -43,7 +43,7 @@ public function enterNode(Node $node): void { $this->stack[] = $node; } - public function leaveNode(Node $node): void { + public function leaveNode(Node $node) { $this->previous = $node; array_pop($this->stack); diff --git a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index db36ec0399..1e7e9e8be5 100644 --- a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -20,11 +20,11 @@ final class ParentConnectingVisitor extends NodeVisitorAbstract { */ private array $stack = []; - public function beforeTraverse(array $nodes): void { + public function beforeTraverse(array $nodes) { $this->stack = []; } - public function enterNode(Node $node): void { + public function enterNode(Node $node) { if (!empty($this->stack)) { $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); } @@ -32,7 +32,7 @@ public function enterNode(Node $node): void { $this->stack[] = $node; } - public function leaveNode(Node $node): void { + public function leaveNode(Node $node) { array_pop($this->stack); } }