Code Duplication    Length = 8-21 lines in 2 locations

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

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