Code Duplication    Length = 3-3 lines in 2 locations

DataStructures/Trees/TrieTree.php 2 locations

@@ 159-161 (lines=3) @@
156
        $node = $this->getNodeFromPrefix($prefix);
157
        $words = [];
158
        if($node !== null) {
159
            foreach($node->children as $char => $n) {
160
                $words = $this->_traverse($node->children[$char], $words, $prefix . $char);
161
            }
162
            
163
        }
164
        
@@ 178-180 (lines=3) @@
175
            $words[] = $word;
176
        }
177
178
        foreach($node->children as $char => $n) {
179
            return $this->_traverse($node->children[$char], $words, $word . $n->char);
180
        }
181
        
182
    }
183