@@ 74-89 (lines=16) @@ | ||
71 | * |
|
72 | * @param VisitorInterface $visitor |
|
73 | */ |
|
74 | public function walk(VisitorInterface $visitor) |
|
75 | { |
|
76 | $node = $this; |
|
77 | $result = $visitor->enterNode($node); |
|
78 | if ($result instanceof NodeInterface) { |
|
79 | $node = $result; |
|
80 | } |
|
81 | if ($result !== NodeTraverser::DONT_TRAVERSE_CHILDREN) { |
|
82 | $result2 = $this->operation->walk($visitor); |
|
83 | if ($result2 === NodeTraverser::REMOVE_NODE) { |
|
84 | return NodeTraverser::REMOVE_NODE; |
|
85 | } elseif ($result2 instanceof NodeInterface) { |
|
86 | $this->operation = $result2; |
|
87 | } |
|
88 | } |
|
89 | ||
90 | return $visitor->leaveNode($node); |
|
91 | } |
|
92 | } |
@@ 160-175 (lines=16) @@ | ||
157 | * |
|
158 | * @param VisitorInterface $visitor |
|
159 | */ |
|
160 | public function walk(VisitorInterface $visitor) |
|
161 | { |
|
162 | $node = $this; |
|
163 | $result = $visitor->enterNode($node); |
|
164 | if ($result instanceof NodeInterface) { |
|
165 | $node = $result; |
|
166 | } |
|
167 | if ($result !== NodeTraverser::DONT_TRAVERSE_CHILDREN) { |
|
168 | $result2 = $this->subQuery->walk($visitor); |
|
169 | if ($result2 === NodeTraverser::REMOVE_NODE) { |
|
170 | return NodeTraverser::REMOVE_NODE; |
|
171 | } elseif ($result2 instanceof NodeInterface) { |
|
172 | $this->subQuery = $result2; |
|
173 | } |
|
174 | } |
|
175 | ||
176 | return $visitor->leaveNode($node); |
|
177 | } |
|
178 |