Code Duplication    Length = 16-16 lines in 3 locations

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

@@ 494-509 (lines=16) @@
491
     *
492
     * @return ChildBannerImageI18nQuery The current query, for fluid interface
493
     */
494
    public function filterByBannerImage($bannerImage, $comparison = null)
495
    {
496
        if ($bannerImage instanceof \xbanners\models\BannerImage) {
497
            return $this
498
                ->addUsingAlias(BannerImageI18nTableMap::COL_ID, $bannerImage->getId(), $comparison);
499
        } elseif ($bannerImage instanceof ObjectCollection) {
500
            if (null === $comparison) {
501
                $comparison = Criteria::IN;
502
            }
503
504
            return $this
505
                ->addUsingAlias(BannerImageI18nTableMap::COL_ID, $bannerImage->toKeyValue('PrimaryKey', 'Id'), $comparison);
506
        } else {
507
            throw new PropelException('filterByBannerImage() only accepts arguments of type \xbanners\models\BannerImage or Collection');
508
        }
509
    }
510
511
    /**
512
     * Adds a JOIN clause to the query using the BannerImage relation

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

@@ 714-729 (lines=16) @@
711
     *
712
     * @return ChildBannerImageQuery The current query, for fluid interface
713
     */
714
    public function filterByBanners($banners, $comparison = null)
715
    {
716
        if ($banners instanceof \xbanners\models\Banners) {
717
            return $this
718
                ->addUsingAlias(BannerImageTableMap::COL_BANNER_ID, $banners->getId(), $comparison);
719
        } elseif ($banners instanceof ObjectCollection) {
720
            if (null === $comparison) {
721
                $comparison = Criteria::IN;
722
            }
723
724
            return $this
725
                ->addUsingAlias(BannerImageTableMap::COL_BANNER_ID, $banners->toKeyValue('PrimaryKey', 'Id'), $comparison);
726
        } else {
727
            throw new PropelException('filterByBanners() only accepts arguments of type \xbanners\models\Banners or Collection');
728
        }
729
    }
730
731
    /**
732
     * Adds a JOIN clause to the query using the Banners relation

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

@@ 380-395 (lines=16) @@
377
     *
378
     * @return ChildBannersI18nQuery The current query, for fluid interface
379
     */
380
    public function filterByBanners($banners, $comparison = null)
381
    {
382
        if ($banners instanceof \xbanners\models\Banners) {
383
            return $this
384
                ->addUsingAlias(BannersI18nTableMap::COL_ID, $banners->getId(), $comparison);
385
        } elseif ($banners instanceof ObjectCollection) {
386
            if (null === $comparison) {
387
                $comparison = Criteria::IN;
388
            }
389
390
            return $this
391
                ->addUsingAlias(BannersI18nTableMap::COL_ID, $banners->toKeyValue('PrimaryKey', 'Id'), $comparison);
392
        } else {
393
            throw new PropelException('filterByBanners() only accepts arguments of type \xbanners\models\Banners or Collection');
394
        }
395
    }
396
397
    /**
398
     * Adds a JOIN clause to the query using the Banners relation