Code Duplication    Length = 13-13 lines in 2 locations

Ajax/semantic/html/collections/HtmlTable.php 1 location

@@ 285-297 (lines=13) @@
282
	 *
283
	 * @see \Ajax\common\html\BaseHtml::fromDatabaseObject()
284
	 */
285
	public function fromDatabaseObject($object, $function) {
286
		$result=$function($object);
287
		if (\is_array($result)) {
288
			$result= $this->addRow($function($object));
289
		} else {
290
			$result= $this->getBody()->_addRow($result);
291
		}
292
		if(isset($this->_afterCompileEvents["onNewRow"])){
293
			if(\is_callable($this->_afterCompileEvents["onNewRow"]))
294
				$this->_afterCompileEvents["onNewRow"]($result,$object);
295
		}
296
		return $result;
297
	}
298
299
	/**
300
	 * @param array $parts

Ajax/semantic/html/collections/table/HtmlTable.php 1 location

@@ 250-262 (lines=13) @@
247
	 *
248
	 * @see \Ajax\common\html\BaseHtml::fromDatabaseObject()
249
	 */
250
	public function fromDatabaseObject($object, $function) {
251
		$result=$function($object);
252
		if (\is_array($result)) {
253
			$result= $this->addRow($function($object));
254
		} else {
255
			$result= $this->getBody()->_addRow($result);
256
		}
257
		if(isset($this->_afterCompileEvents["onNewRow"])){
258
			if(\is_callable($this->_afterCompileEvents["onNewRow"]))
259
				$this->_afterCompileEvents["onNewRow"]($result,$object);
260
		}
261
		return $result;
262
	}
263
264
	/**
265
	 * @param array $parts