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