Skip to content

Commit 9662249

Browse files
committed
[solid] make AbstractRector::leave() final, to avoid breaking removing mechanism in child classes
1 parent 6363da5 commit 9662249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rector/AbstractRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ final public function enterNode(Node $node): int|Node|null
190190
* Replacing nodes in leaveNode() method avoids infinite recursion
191191
* see"infinite recursion" in https://github.com/nikic/PHP-Parser/blob/master/doc/component/Walking_the_AST.markdown
192192
*/
193-
public function leaveNode(Node $node): array|int|Node|null
193+
final public function leaveNode(Node $node): array|int|Node|null
194194
{
195195
if ($node->hasAttribute(AttributeKey::ORIGINAL_NODE)) {
196196
return null;

0 commit comments

Comments
 (0)