Code Duplication    Length = 8-21 lines in 2 locations

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

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