Code Duplication    Length = 8-21 lines in 2 locations

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

@@ 221-241 (lines=21) @@
218
		return isset($this->dbRow[$var]);
219
	}*/
220
	
221
	public function set($var, $value) {
222
		$this->_dbLoadIfNotLoaded();
223
224
		/*
225
		// Ok, let's start by checking the column type
226
		$type = $this->db_connection->getColumnType($this->dbTableName, $var);
227
228
		// Throws an exception if the type is not ok.
229
		if (!$this->db_connection->checkType($value, $type)) {
230
			throw new TDBMException("Error! Invalid value passed for attribute '$var' of table '$this->dbTableName'. Passed '$value', but expecting '$type'");
231
		}
232
		*/
233
234
		/*if ($var == $this->getPrimaryKey() && isset($this->dbRow[$var]))
235
			throw new TDBMException("Error! Changing primary key value is forbidden.");*/
236
		$this->dbRow[$var] = $value;
237
		if ($this->tdbmService !== null && $this->status === TDBMObjectStateEnum::STATE_LOADED) {
238
			$this->status = TDBMObjectStateEnum::STATE_DIRTY;
239
			$this->tdbmService->_addToToSaveObjectList($this);
240
		}
241
	}
242
243
	/**
244
	 * @param string $foreignKeyName
@@ 247-254 (lines=8) @@
244
	 * @param string $foreignKeyName
245
	 * @param AbstractTDBMObject $bean
246
	 */
247
	public function setRef($foreignKeyName, AbstractTDBMObject $bean = null) {
248
		$this->references[$foreignKeyName] = $bean;
249
250
        if ($this->tdbmService !== null && $this->status === TDBMObjectStateEnum::STATE_LOADED) {
251
            $this->status = TDBMObjectStateEnum::STATE_DIRTY;
252
            $this->tdbmService->_addToToSaveObjectList($this);
253
        }
254
	}
255
256
    /**
257
     * @param string $foreignKeyName A unique name for this reference