Code Duplication    Length = 3-3 lines in 2 locations

DataStructures/Trees/TrieTree.php 2 locations

@@ 239-241 (lines=3) @@
236
            if($node->isWord) {
237
                $words[] = $prefix;
238
            }
239
            foreach($node->children as $char => $n) {
240
                $words = $this->_traverseWithPrefix($node->children[$char], $words, $prefix . $char);
241
            }
242
        }
243
244
        return $words;
@@ 259-261 (lines=3) @@
256
            return $words;
257
        }
258
259
        foreach($node->children as $char => &$n) {
260
            $words = $this->_traverseWithPrefix($node->children[$char], $words, $word . $char);
261
        }
262
263
        return $words;
264
    }