| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace PhpParser; |
| 4: | |
| 5: | interface NodeTraverserInterface |
| 6: | { |
| 7: | /** |
| 8: | * Adds a visitor. |
| 9: | * |
| 10: | * @param NodeVisitor $visitor Visitor to add |
| 11: | */ |
| 12: | public function addVisitor(NodeVisitor $visitor); |
| 13: | |
| 14: | /** |
| 15: | * Removes an added visitor. |
| 16: | * |
| 17: | * @param NodeVisitor $visitor |
| 18: | */ |
| 19: | public function removeVisitor(NodeVisitor $visitor); |
| 20: | |
| 21: | /** |
| 22: | * Traverses an array of nodes using the registered visitors. |
| 23: | * |
| 24: | * @param Node[] $nodes Array of nodes |
| 25: | * |
| 26: | * @return Node[] Traversed array of nodes |
| 27: | */ |
| 28: | public function traverse(array $nodes) : array; |
| 29: | } |
| 30: |