Code Duplication    Length = 14-14 lines in 2 locations

src/Mouf/Database/TDBM/AbstractTDBMObject.php 1 location

@@ 553-566 (lines=14) @@
550
    /**
551
     * Override the native php clone function for TDBMObjects
552
     */
553
    public function __clone(){
554
        $this->_dbLoadIfNotLoaded();
555
        //First lets set the status to new (to enter the save function)
556
        $this->status = TDBMObjectStateEnum::STATE_NEW;
557
558
        // Add the current TDBMObject to the save object list
559
        $this->tdbmService->_addToToSaveObjectList($this);
560
561
        //Now unset the PK from the row
562
        $pk_array = $this->tdbmService->getPrimaryKeyColumns($this->dbTableName);
563
        foreach ($pk_array as $pk) {
564
            $this->dbRow[$pk] = null;
565
        }
566
    }
567
568
	/**
569
	 * Returns raw database rows.

src/Mouf/Database/TDBM/DbRow.php 1 location

@@ 338-351 (lines=14) @@
335
    /**
336
     * Override the native php clone function for TDBMObjects
337
     */
338
    public function __clone(){
339
        $this->_dbLoadIfNotLoaded();
340
        //First lets set the status to new (to enter the save function)
341
        $this->status = TDBMObjectStateEnum::STATE_NEW;
342
343
        // Add the current TDBMObject to the save object list
344
        $this->tdbmService->_addToToSaveObjectList($this);
345
346
        //Now unset the PK from the row
347
        $pk_array = $this->tdbmService->getPrimaryKeyColumns($this->dbTableName);
348
        foreach ($pk_array as $pk) {
349
            $this->dbRow[$pk] = null;
350
        }
351
    }
352
353
	/**
354
	 * Returns raw database row.