Code Duplication    Length = 10-10 lines in 2 locations

src/eXpansion/Bundle/LocalRecords/Model/Base/Record.php 1 location

@@ 966-975 (lines=10) @@
963
                $this->setPlayer($this->aPlayer);
964
            }
965
966
            if ($this->isNew() || $this->isModified()) {
967
                // persist changes
968
                if ($this->isNew()) {
969
                    $this->doInsert($con);
970
                    $affectedRows += 1;
971
                } else {
972
                    $affectedRows += $this->doUpdate($con);
973
                }
974
                $this->resetModified();
975
            }
976
977
            $this->alreadyInSave = false;
978

src/eXpansion/Framework/PlayersBundle/Model/Base/Player.php 1 location

@@ 853-862 (lines=10) @@
850
        if (!$this->alreadyInSave) {
851
            $this->alreadyInSave = true;
852
853
            if ($this->isNew() || $this->isModified()) {
854
                // persist changes
855
                if ($this->isNew()) {
856
                    $this->doInsert($con);
857
                    $affectedRows += 1;
858
                } else {
859
                    $affectedRows += $this->doUpdate($con);
860
                }
861
                $this->resetModified();
862
            }
863
864
            if ($this->recordsScheduledForDeletion !== null) {
865
                if (!$this->recordsScheduledForDeletion->isEmpty()) {