Skip to content

Commit 3eca791

Browse files
committed
add note
1 parent 7e4260f commit 3eca791

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Contract/Rector/RectorInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ public function getNodeTypes(): array;
2121
/**
2222
* Process Node of matched type
2323
* @return Node|Node[]|null|int
24+
*
25+
* For int return, choose:
26+
*
27+
* ✔️ To decorate current node and its children to not be traversed on current rule, return one of:
28+
* - NodeVisitor::DONT_TRAVERSE_CHILDREN
29+
* - NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN
30+
*
31+
* ✔️ To remove node of Stmt and Param, return:
32+
* - NodeVisitor::REMOVE_NODE to remove Stmt or Param
2433
*/
2534
public function refactor(Node $node);
2635
}

0 commit comments

Comments
 (0)