Code Duplication    Length = 12-12 lines in 2 locations

Entity/Category.php 1 location

@@ 246-257 (lines=12) @@
243
     *
244
     * @return string
245
     */
246
    public function getTree($separator = '/')
247
    {
248
        $tree = '';
249
250
        $current = $this;
251
        do {
252
            $tree = $current->getSlug().$separator.$tree;
253
            $current = $current->getParent();
254
        } while ($current);
255
256
        return trim($tree, $separator);
257
    }
258
259
    /**
260
     * @ORM\PrePersist()

Entity/Page.php 1 location

@@ 479-490 (lines=12) @@
476
     *
477
     * @return string
478
     */
479
    public function getTree($separator = '/')
480
    {
481
        $tree = '';
482
483
        $current = $this;
484
        do {
485
            $tree = $current->getSlug().$separator.$tree;
486
            $current = $current->getParent();
487
        } while ($current);
488
489
        return trim($tree, $separator);
490
    }
491
492
    /**
493
     * @ORM\PrePersist()