Code Duplication    Length = 11-12 lines in 2 locations

Ajax/semantic/html/content/table/HtmlTR.php 1 location

@@ 60-71 (lines=12) @@
57
	 * Sets values to the row cols
58
	 * @param mixed $values
59
	 */
60
	public function setValues($values=array()){
61
		$count=$this->count();
62
		if(\is_array($values)===false){
63
			$values=\array_fill(0, $count, $values);
64
		}
65
		$count=\min(\sizeof($values),$count);
66
67
		for ($i=0;$i<$count;$i++){
68
			$cell=$this->content[$i];
69
			$cell->setValue($values[$i]);
70
		}
71
	}
72
73
	/**
74
	 * Removes the col at $index

Ajax/semantic/html/content/table/HtmlTableContent.php 1 location

@@ 122-132 (lines=11) @@
119
		return $this;
120
	}
121
122
	public function setColValues($colIndex, $values=array()) {
123
		$count=$this->count();
124
		if (\is_array($values)===false) {
125
			$values=\array_fill(0, $count, $values);
126
		}
127
		$count=\min(\sizeof($values), $count);
128
		for($i=0; $i<$count; $i++) {
129
			$this->getCell($i, $colIndex)->setValue($values[$i]);
130
		}
131
		return $this;
132
	}
133
134
	public function setRowValues($rowIndex, $values=array()) {
135
		$count=$this->count();