Code Duplication    Length = 11-13 lines in 3 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 2 locations

@@ 97-109 (lines=13) @@
94
	 * Sets the cells values
95
	 * @param mixed $values
96
	 */
97
	public function setValues($values=array()){
98
		$count=$this->count();
99
		if(\is_array($values)===false){
100
			$values=\array_fill(0, $count, $values);
101
		}
102
		$count=\min(\sizeof($values),$count);
103
104
		for ($i=0;$i<$count;$i++){
105
			$row=$this->content[$i];
106
			$row->setValues($values[$i]);
107
		}
108
		return $this;
109
	}
110
111
	public function setColValues($colIndex,$values=array()){
112
		$count=$this->count();
@@ 111-121 (lines=11) @@
108
		return $this;
109
	}
110
111
	public function setColValues($colIndex,$values=array()){
112
		$count=$this->count();
113
		if(\is_array($values)===false){
114
			$values=\array_fill(0, $count, $values);
115
		}
116
		$count=\min(\sizeof($values),$count);
117
		for ($i=0;$i<$count;$i++){
118
			$this->getCell($i, $colIndex)->setValue($values[$i]);
119
		}
120
		return $this;
121
	}
122
123
	public function colCenter($colIndex){
124
		$count=$this->count();