Code Duplication    Length = 8-21 lines in 2 locations

src/Mouf/Database/TDBM/DbRow.php 2 locations

@@ 234-254 (lines=21) @@
231
        return isset($this->dbRow[$var]);
232
    }*/
233
234
    public function set($var, $value)
235
    {
236
        $this->_dbLoadIfNotLoaded();
237
238
        /*
239
        // Ok, let's start by checking the column type
240
        $type = $this->db_connection->getColumnType($this->dbTableName, $var);
241
242
        // Throws an exception if the type is not ok.
243
        if (!$this->db_connection->checkType($value, $type)) {
244
            throw new TDBMException("Error! Invalid value passed for attribute '$var' of table '$this->dbTableName'. Passed '$value', but expecting '$type'");
245
        }
246
        */
247
248
        /*if ($var == $this->getPrimaryKey() && isset($this->dbRow[$var]))
249
            throw new TDBMException("Error! Changing primary key value is forbidden.");*/
250
        $this->dbRow[$var] = $value;
251
        if ($this->tdbmService !== null && $this->status === TDBMObjectStateEnum::STATE_LOADED) {
252
            $this->status = TDBMObjectStateEnum::STATE_DIRTY;
253
            $this->tdbmService->_addToToSaveObjectList($this);
254
        }
255
    }
256
257
    /**
@@ 261-268 (lines=8) @@
258
     * @param string             $foreignKeyName
259
     * @param AbstractTDBMObject $bean
260
     */
261
    public function setRef($foreignKeyName, AbstractTDBMObject $bean = null)
262
    {
263
        $this->references[$foreignKeyName] = $bean;
264
265
        if ($this->tdbmService !== null && $this->status === TDBMObjectStateEnum::STATE_LOADED) {
266
            $this->status = TDBMObjectStateEnum::STATE_DIRTY;
267
            $this->tdbmService->_addToToSaveObjectList($this);
268
        }
269
    }
270
271
    /**