Code Duplication    Length = 24-24 lines in 6 locations

src/cli/Database/Base/ChannelQuery.php 1 location

@@ 562-585 (lines=24) @@
559
     * @throws PropelException Any exceptions caught during processing will be
560
     *                         rethrown wrapped into a PropelException.
561
     */
562
    public function delete(ConnectionInterface $con = null)
563
    {
564
        if (null === $con) {
565
            $con = Propel::getServiceContainer()->getWriteConnection(ChannelTableMap::DATABASE_NAME);
566
        }
567
568
        $criteria = $this;
569
570
        // Set the correct dbName
571
        $criteria->setDbName(ChannelTableMap::DATABASE_NAME);
572
573
        // use transaction because $criteria could contain info
574
        // for more than one table or we could emulating ON DELETE CASCADE, etc.
575
        return $con->transaction(function () use ($con, $criteria) {
576
            $affectedRows = 0; // initialize var to track total num of affected rows
577
578
            ChannelTableMap::removeInstanceFromPool($criteria);
579
580
            $affectedRows += ModelCriteria::delete($con);
581
            ChannelTableMap::clearRelatedInstancePool();
582
583
            return $affectedRows;
584
        });
585
    }
586
587
} // ChannelQuery
588

src/cli/Database/Base/ConnectionQuery.php 1 location

@@ 696-719 (lines=24) @@
693
     * @throws PropelException Any exceptions caught during processing will be
694
     *                         rethrown wrapped into a PropelException.
695
     */
696
    public function delete(ConnectionInterface $con = null)
697
    {
698
        if (null === $con) {
699
            $con = Propel::getServiceContainer()->getWriteConnection(ConnectionTableMap::DATABASE_NAME);
700
        }
701
702
        $criteria = $this;
703
704
        // Set the correct dbName
705
        $criteria->setDbName(ConnectionTableMap::DATABASE_NAME);
706
707
        // use transaction because $criteria could contain info
708
        // for more than one table or we could emulating ON DELETE CASCADE, etc.
709
        return $con->transaction(function () use ($con, $criteria) {
710
            $affectedRows = 0; // initialize var to track total num of affected rows
711
712
            ConnectionTableMap::removeInstanceFromPool($criteria);
713
714
            $affectedRows += ModelCriteria::delete($con);
715
            ConnectionTableMap::clearRelatedInstancePool();
716
717
            return $affectedRows;
718
        });
719
    }
720
721
} // ConnectionQuery
722

src/cli/Database/Base/UserQuery.php 1 location

@@ 645-668 (lines=24) @@
642
     * @throws PropelException Any exceptions caught during processing will be
643
     *                         rethrown wrapped into a PropelException.
644
     */
645
    public function delete(ConnectionInterface $con = null)
646
    {
647
        if (null === $con) {
648
            $con = Propel::getServiceContainer()->getWriteConnection(UserTableMap::DATABASE_NAME);
649
        }
650
651
        $criteria = $this;
652
653
        // Set the correct dbName
654
        $criteria->setDbName(UserTableMap::DATABASE_NAME);
655
656
        // use transaction because $criteria could contain info
657
        // for more than one table or we could emulating ON DELETE CASCADE, etc.
658
        return $con->transaction(function () use ($con, $criteria) {
659
            $affectedRows = 0; // initialize var to track total num of affected rows
660
661
            UserTableMap::removeInstanceFromPool($criteria);
662
663
            $affectedRows += ModelCriteria::delete($con);
664
            UserTableMap::clearRelatedInstancePool();
665
666
            return $affectedRows;
667
        });
668
    }
669
670
} // UserQuery
671

src/cli/Database/Base/InputQuery.php 1 location

@@ 712-735 (lines=24) @@
709
     * @throws PropelException Any exceptions caught during processing will be
710
     *                         rethrown wrapped into a PropelException.
711
     */
712
    public function delete(ConnectionInterface $con = null)
713
    {
714
        if (null === $con) {
715
            $con = Propel::getServiceContainer()->getWriteConnection(InputTableMap::DATABASE_NAME);
716
        }
717
718
        $criteria = $this;
719
720
        // Set the correct dbName
721
        $criteria->setDbName(InputTableMap::DATABASE_NAME);
722
723
        // use transaction because $criteria could contain info
724
        // for more than one table or we could emulating ON DELETE CASCADE, etc.
725
        return $con->transaction(function () use ($con, $criteria) {
726
            $affectedRows = 0; // initialize var to track total num of affected rows
727
728
            InputTableMap::removeInstanceFromPool($criteria);
729
730
            $affectedRows += ModelCriteria::delete($con);
731
            InputTableMap::clearRelatedInstancePool();
732
733
            return $affectedRows;
734
        });
735
    }
736
737
} // InputQuery
738

src/cli/Database/Base/InstanceQuery.php 1 location

@@ 727-750 (lines=24) @@
724
     * @throws PropelException Any exceptions caught during processing will be
725
     *                         rethrown wrapped into a PropelException.
726
     */
727
    public function delete(ConnectionInterface $con = null)
728
    {
729
        if (null === $con) {
730
            $con = Propel::getServiceContainer()->getWriteConnection(InstanceTableMap::DATABASE_NAME);
731
        }
732
733
        $criteria = $this;
734
735
        // Set the correct dbName
736
        $criteria->setDbName(InstanceTableMap::DATABASE_NAME);
737
738
        // use transaction because $criteria could contain info
739
        // for more than one table or we could emulating ON DELETE CASCADE, etc.
740
        return $con->transaction(function () use ($con, $criteria) {
741
            $affectedRows = 0; // initialize var to track total num of affected rows
742
743
            InstanceTableMap::removeInstanceFromPool($criteria);
744
745
            $affectedRows += ModelCriteria::delete($con);
746
            InstanceTableMap::clearRelatedInstancePool();
747
748
            return $affectedRows;
749
        });
750
    }
751
752
} // InstanceQuery
753

src/cli/Database/Base/SubscriptionQuery.php 1 location

@@ 1046-1069 (lines=24) @@
1043
     * @throws PropelException Any exceptions caught during processing will be
1044
     *                         rethrown wrapped into a PropelException.
1045
     */
1046
    public function delete(ConnectionInterface $con = null)
1047
    {
1048
        if (null === $con) {
1049
            $con = Propel::getServiceContainer()->getWriteConnection(SubscriptionTableMap::DATABASE_NAME);
1050
        }
1051
1052
        $criteria = $this;
1053
1054
        // Set the correct dbName
1055
        $criteria->setDbName(SubscriptionTableMap::DATABASE_NAME);
1056
1057
        // use transaction because $criteria could contain info
1058
        // for more than one table or we could emulating ON DELETE CASCADE, etc.
1059
        return $con->transaction(function () use ($con, $criteria) {
1060
            $affectedRows = 0; // initialize var to track total num of affected rows
1061
1062
            SubscriptionTableMap::removeInstanceFromPool($criteria);
1063
1064
            $affectedRows += ModelCriteria::delete($con);
1065
            SubscriptionTableMap::clearRelatedInstancePool();
1066
1067
            return $affectedRows;
1068
        });
1069
    }
1070
1071
} // SubscriptionQuery
1072