Code Duplication    Length = 22-22 lines in 2 locations

application/modules/xbanners/models/Map/BannerImageI18nTableMap.php 1 location

@@ 489-510 (lines=22) @@
486
     * @throws PropelException Any exceptions caught during processing will be
487
     *                         rethrown wrapped into a PropelException.
488
     */
489
    public static function doInsert($criteria, ConnectionInterface $con = null)
490
    {
491
        if (null === $con) {
492
            $con = Propel::getServiceContainer()->getWriteConnection(BannerImageI18nTableMap::DATABASE_NAME);
493
        }
494
495
        if ($criteria instanceof Criteria) {
496
            $criteria = clone $criteria; // rename for clarity
497
        } else {
498
            $criteria = $criteria->buildCriteria(); // build Criteria from BannerImageI18n object
499
        }
500
501
502
        // Set the correct dbName
503
        $query = BannerImageI18nQuery::create()->mergeWith($criteria);
504
505
        // use transaction because $criteria could contain info
506
        // for more than one table (I guess, conceivably)
507
        return $con->transaction(function () use ($con, $query) {
508
            return $query->doInsert($con);
509
        });
510
    }
511
512
} // BannerImageI18nTableMap
513
// This is the static code needed to register the TableMap for this table with the main Propel class.

application/modules/xbanners/models/Map/BannersI18nTableMap.php 1 location

@@ 465-486 (lines=22) @@
462
     * @throws PropelException Any exceptions caught during processing will be
463
     *                         rethrown wrapped into a PropelException.
464
     */
465
    public static function doInsert($criteria, ConnectionInterface $con = null)
466
    {
467
        if (null === $con) {
468
            $con = Propel::getServiceContainer()->getWriteConnection(BannersI18nTableMap::DATABASE_NAME);
469
        }
470
471
        if ($criteria instanceof Criteria) {
472
            $criteria = clone $criteria; // rename for clarity
473
        } else {
474
            $criteria = $criteria->buildCriteria(); // build Criteria from BannersI18n object
475
        }
476
477
478
        // Set the correct dbName
479
        $query = BannersI18nQuery::create()->mergeWith($criteria);
480
481
        // use transaction because $criteria could contain info
482
        // for more than one table (I guess, conceivably)
483
        return $con->transaction(function () use ($con, $query) {
484
            return $query->doInsert($con);
485
        });
486
    }
487
488
} // BannersI18nTableMap
489
// This is the static code needed to register the TableMap for this table with the main Propel class.