Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 63-74 (lines=12) @@
60
		return $this;
61
	}
62
63
	public function setValues($values=array()){
64
		$count=$this->count();
65
		if(\is_array($values)===false){
66
			$values=\array_fill(0, $count, $values);
67
		}
68
		$count=\min(\sizeof($values),$count);
69
70
		for ($i=0;$i<$count;$i++){
71
			$row=$this->content[$i];
72
			$row->setValues($values[$i]);
73
		}
74
	}
75
76
	public function getRowCount(){
77
		return $this->count();

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

@@ 43-54 (lines=12) @@
40
		$this->_row=$row;
41
	}
42
43
	public function setValues($values=array()){
44
		$count=$this->count();
45
		if(\is_array($values)===false){
46
			$values=\array_fill(0, $count, $values);
47
		}
48
		$count=\min(\sizeof($values),$count);
49
50
		for ($i=0;$i<$count;$i++){
51
			$cell=$this->content[$i];
52
			$cell->setValue($values[$i]);
53
		}
54
	}
55
56
	public function delete($index){
57
		$this->removeItem($index);