Code Duplication    Length = 18-18 lines in 2 locations

src/SQLParser/Query/Select.php 1 location

@@ 410-427 (lines=18) @@
407
     *
408
     * @param VisitorInterface $visitor
409
     */
410
    public function walk(VisitorInterface $visitor)
411
    {
412
        $node = $this;
413
        $result = $visitor->enterNode($node);
414
        if ($result instanceof NodeInterface) {
415
            $node = $result;
416
        }
417
        if ($result !== NodeTraverser::DONT_TRAVERSE_CHILDREN) {
418
            $this->walkChildren($this->columns, $visitor);
419
            $this->walkChildren($this->from, $visitor);
420
            $this->walkChildren($this->where, $visitor);
421
            $this->walkChildren($this->group, $visitor);
422
            $this->walkChildren($this->having, $visitor);
423
            $this->walkChildren($this->order, $visitor);
424
        }
425
426
        return $visitor->leaveNode($node);
427
    }
428
429
    private function walkChildren(&$children, VisitorInterface $visitor)
430
    {

src/SQLParser/Query/Union.php 1 location

@@ 91-108 (lines=18) @@
88
     *
89
     * @param VisitorInterface $visitor
90
     */
91
    public function walk(VisitorInterface $visitor)
92
    {
93
        $node = $this;
94
        $result = $visitor->enterNode($node);
95
        if ($result instanceof NodeInterface) {
96
            $node = $result;
97
        }
98
        if ($result !== NodeTraverser::DONT_TRAVERSE_CHILDREN) {
99
            $this->walkChildren($this->columns, $visitor);
100
            $this->walkChildren($this->from, $visitor);
101
            $this->walkChildren($this->where, $visitor);
102
            $this->walkChildren($this->group, $visitor);
103
            $this->walkChildren($this->having, $visitor);
104
            $this->walkChildren($this->order, $visitor);
105
        }
106
107
        return $visitor->leaveNode($node);
108
    }
109
110
    private function walkChildren(&$children, VisitorInterface $visitor)
111
    {