Code Duplication    Length = 15-15 lines in 2 locations

application/modules/core/models/Base/Route.php 2 locations

@@ 1532-1546 (lines=15) @@
1529
     * @param  SCategory $sCategory The SCategory object to remove.
1530
     * @return $this|ChildRoute The current object (for fluent API support)
1531
     */
1532
    public function removeSCategory(SCategory $sCategory)
1533
    {
1534
        if ($this->getSCategories()->contains($sCategory)) {
1535
            $pos = $this->collSCategories->search($sCategory);
1536
            $this->collSCategories->remove($pos);
1537
            if (null === $this->sCategoriesScheduledForDeletion) {
1538
                $this->sCategoriesScheduledForDeletion = clone $this->collSCategories;
1539
                $this->sCategoriesScheduledForDeletion->clear();
1540
            }
1541
            $this->sCategoriesScheduledForDeletion[]= $sCategory;
1542
            $sCategory->setRoute(null);
1543
        }
1544
1545
        return $this;
1546
    }
1547
1548
1549
    /**
@@ 1782-1796 (lines=15) @@
1779
     * @param  SProducts $sProducts The SProducts object to remove.
1780
     * @return $this|ChildRoute The current object (for fluent API support)
1781
     */
1782
    public function removeSProducts(SProducts $sProducts)
1783
    {
1784
        if ($this->getSProductss()->contains($sProducts)) {
1785
            $pos = $this->collSProductss->search($sProducts);
1786
            $this->collSProductss->remove($pos);
1787
            if (null === $this->sProductssScheduledForDeletion) {
1788
                $this->sProductssScheduledForDeletion = clone $this->collSProductss;
1789
                $this->sProductssScheduledForDeletion->clear();
1790
            }
1791
            $this->sProductssScheduledForDeletion[]= $sProducts;
1792
            $sProducts->setRoute(null);
1793
        }
1794
1795
        return $this;
1796
    }
1797
1798
1799
    /**