Code Duplication    Length = 23-23 lines in 3 locations

app/Models/Task/Base/Task.php 1 location

@@ 629-651 (lines=23) @@
626
     * @throws PropelException
627
     * @see save()
628
     */
629
    protected function doSave(ConnectionInterface $con)
630
    {
631
        $affectedRows = 0; // initialize var to track total num of affected rows
632
        if (!$this->alreadyInSave) {
633
            $this->alreadyInSave = true;
634
635
            if ($this->isNew() || $this->isModified()) {
636
                // persist changes
637
                if ($this->isNew()) {
638
                    $this->doInsert($con);
639
                    $affectedRows += 1;
640
                } else {
641
                    $affectedRows += $this->doUpdate($con);
642
                }
643
                $this->resetModified();
644
            }
645
646
            $this->alreadyInSave = false;
647
648
        }
649
650
        return $affectedRows;
651
    } // doSave()
652
653
    /**
654
     * Insert the row in the database.

app/Models/User/Base/User.php 1 location

@@ 785-807 (lines=23) @@
782
     * @throws PropelException
783
     * @see save()
784
     */
785
    protected function doSave(ConnectionInterface $con)
786
    {
787
        $affectedRows = 0; // initialize var to track total num of affected rows
788
        if (!$this->alreadyInSave) {
789
            $this->alreadyInSave = true;
790
791
            if ($this->isNew() || $this->isModified()) {
792
                // persist changes
793
                if ($this->isNew()) {
794
                    $this->doInsert($con);
795
                    $affectedRows += 1;
796
                } else {
797
                    $affectedRows += $this->doUpdate($con);
798
                }
799
                $this->resetModified();
800
            }
801
802
            $this->alreadyInSave = false;
803
804
        }
805
806
        return $affectedRows;
807
    } // doSave()
808
809
    /**
810
     * Insert the row in the database.

packages/Price/Models/Selfprice/Base/Selfprice.php 1 location

@@ 655-677 (lines=23) @@
652
     * @throws PropelException
653
     * @see save()
654
     */
655
    protected function doSave(ConnectionInterface $con)
656
    {
657
        $affectedRows = 0; // initialize var to track total num of affected rows
658
        if (!$this->alreadyInSave) {
659
            $this->alreadyInSave = true;
660
661
            if ($this->isNew() || $this->isModified()) {
662
                // persist changes
663
                if ($this->isNew()) {
664
                    $this->doInsert($con);
665
                    $affectedRows += 1;
666
                } else {
667
                    $affectedRows += $this->doUpdate($con);
668
                }
669
                $this->resetModified();
670
            }
671
672
            $this->alreadyInSave = false;
673
674
        }
675
676
        return $affectedRows;
677
    } // doSave()
678
679
    /**
680
     * Insert the row in the database.