Code Duplication    Length = 21-21 lines in 2 locations

src/Hal/Component/Ast/NodeTraverser.php 2 locations

@@ 99-119 (lines=21) @@
96
}
97
98
if (PHP_VERSION_ID >= 70000) {
99
    class NodeTraverser extends Mother
100
    {
101
        /** @var Traverser */
102
        private $traverser;
103
104
        public function __construct($cloneNodes = false, $stopCondition = null)
105
        {
106
            parent::__construct();
107
            $this->traverser = new Traverser($this, $stopCondition);
108
        }
109
110
        public function traverseNode(Node $node): Node
111
        {
112
            return parent::traverseNode($node);
113
        }
114
115
        protected function traverseArray(array $nodes): array
116
        {
117
            return $this->traverser->traverseArray($nodes, $this->visitors);
118
        }
119
    }
120
} else {
121
    class NodeTraverser extends Mother
122
    {
@@ 121-141 (lines=21) @@
118
        }
119
    }
120
} else {
121
    class NodeTraverser extends Mother
122
    {
123
        /** @var Traverser */
124
        private $traverser;
125
126
        public function __construct($cloneNodes = false, $stopCondition = null)
127
        {
128
            parent::__construct();
129
            $this->traverser = new Traverser($this, $stopCondition);
130
        }
131
132
        public function traverseNode(Node $node)
133
        {
134
            return parent::traverseNode($node);
135
        }
136
137
        protected function traverseArray(array $nodes)
138
        {
139
            return $this->traverser->traverseArray($nodes, $this->visitors);
140
        }
141
    }
142
}