Code Duplication    Length = 3-3 lines in 2 locations

DataStructures/Trees/TrieTree.php 2 locations

@@ 208-210 (lines=3) @@
205
        $node = $this->getNodeFromPrefix($prefix);
206
        $words = [];
207
        if($node !== null) {
208
            foreach($node->children as $char => $n) {
209
                $words = $this->_traverse($node->children[$char], $words, $prefix . $char);
210
            }
211
            
212
        }
213
        
@@ 227-229 (lines=3) @@
224
            $words[] = $word;
225
        }
226
227
        foreach($node->children as $char => $n) {
228
            return $this->_traverse($node->children[$char], $words, $word . $n->char);
229
        }   
230
    }
231
232
    /**