Code Duplication    Length = 24-24 lines in 5 locations

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

@@ 1469-1492 (lines=24) @@
1466
     * @return int             Count of related BaseSCategory objects.
1467
     * @throws PropelException
1468
     */
1469
    public function countSCategories(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
1470
    {
1471
        $partial = $this->collSCategoriesPartial && !$this->isNew();
1472
        if (null === $this->collSCategories || null !== $criteria || $partial) {
1473
            if ($this->isNew() && null === $this->collSCategories) {
1474
                return 0;
1475
            }
1476
1477
            if ($partial && !$criteria) {
1478
                return count($this->getSCategories());
1479
            }
1480
1481
            $query = SCategoryQuery::create(null, $criteria);
1482
            if ($distinct) {
1483
                $query->distinct();
1484
            }
1485
1486
            return $query
1487
                ->filterByRoute($this)
1488
                ->count($con);
1489
        }
1490
1491
        return count($this->collSCategories);
1492
    }
1493
1494
    /**
1495
     * Method called to associate a SCategory object to this object
@@ 1719-1742 (lines=24) @@
1716
     * @return int             Count of related BaseSProducts objects.
1717
     * @throws PropelException
1718
     */
1719
    public function countSProductss(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
1720
    {
1721
        $partial = $this->collSProductssPartial && !$this->isNew();
1722
        if (null === $this->collSProductss || null !== $criteria || $partial) {
1723
            if ($this->isNew() && null === $this->collSProductss) {
1724
                return 0;
1725
            }
1726
1727
            if ($partial && !$criteria) {
1728
                return count($this->getSProductss());
1729
            }
1730
1731
            $query = SProductsQuery::create(null, $criteria);
1732
            if ($distinct) {
1733
                $query->distinct();
1734
            }
1735
1736
            return $query
1737
                ->filterByRoute($this)
1738
                ->count($con);
1739
        }
1740
1741
        return count($this->collSProductss);
1742
    }
1743
1744
    /**
1745
     * Method called to associate a SProducts object to this object

application/modules/xbanners/models/Base/BannerImage.php 1 location

@@ 1801-1824 (lines=24) @@
1798
     * @return int             Count of related BannerImageI18n objects.
1799
     * @throws PropelException
1800
     */
1801
    public function countBannerImageI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
1802
    {
1803
        $partial = $this->collBannerImageI18nsPartial && !$this->isNew();
1804
        if (null === $this->collBannerImageI18ns || null !== $criteria || $partial) {
1805
            if ($this->isNew() && null === $this->collBannerImageI18ns) {
1806
                return 0;
1807
            }
1808
1809
            if ($partial && !$criteria) {
1810
                return count($this->getBannerImageI18ns());
1811
            }
1812
1813
            $query = ChildBannerImageI18nQuery::create(null, $criteria);
1814
            if ($distinct) {
1815
                $query->distinct();
1816
            }
1817
1818
            return $query
1819
                ->filterByBannerImage($this)
1820
                ->count($con);
1821
        }
1822
1823
        return count($this->collBannerImageI18ns);
1824
    }
1825
1826
    /**
1827
     * Method called to associate a ChildBannerImageI18n object to this object

application/modules/xbanners/models/Base/Banners.php 2 locations

@@ 1523-1546 (lines=24) @@
1520
     * @return int             Count of related BannerImage objects.
1521
     * @throws PropelException
1522
     */
1523
    public function countBannerImages(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
1524
    {
1525
        $partial = $this->collBannerImagesPartial && !$this->isNew();
1526
        if (null === $this->collBannerImages || null !== $criteria || $partial) {
1527
            if ($this->isNew() && null === $this->collBannerImages) {
1528
                return 0;
1529
            }
1530
1531
            if ($partial && !$criteria) {
1532
                return count($this->getBannerImages());
1533
            }
1534
1535
            $query = ChildBannerImageQuery::create(null, $criteria);
1536
            if ($distinct) {
1537
                $query->distinct();
1538
            }
1539
1540
            return $query
1541
                ->filterByBanners($this)
1542
                ->count($con);
1543
        }
1544
1545
        return count($this->collBannerImages);
1546
    }
1547
1548
    /**
1549
     * Method called to associate a ChildBannerImage object to this object
@@ 1751-1774 (lines=24) @@
1748
     * @return int             Count of related BannersI18n objects.
1749
     * @throws PropelException
1750
     */
1751
    public function countBannersI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
1752
    {
1753
        $partial = $this->collBannersI18nsPartial && !$this->isNew();
1754
        if (null === $this->collBannersI18ns || null !== $criteria || $partial) {
1755
            if ($this->isNew() && null === $this->collBannersI18ns) {
1756
                return 0;
1757
            }
1758
1759
            if ($partial && !$criteria) {
1760
                return count($this->getBannersI18ns());
1761
            }
1762
1763
            $query = ChildBannersI18nQuery::create(null, $criteria);
1764
            if ($distinct) {
1765
                $query->distinct();
1766
            }
1767
1768
            return $query
1769
                ->filterByBanners($this)
1770
                ->count($con);
1771
        }
1772
1773
        return count($this->collBannersI18ns);
1774
    }
1775
1776
    /**
1777
     * Method called to associate a ChildBannersI18n object to this object