Code Duplication    Length = 24-24 lines in 3 locations

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