Code Duplication    Length = 3-3 lines in 3 locations

Ajax/semantic/html/content/HtmlGridRow.php 1 location

@@ 106-108 (lines=3) @@
103
		$count=$this->count();
104
		$valuesSize=\sizeof($values);
105
		if($force===true){
106
			for($i=$count;$i<$valuesSize;$i++){
107
				$this->addItem(new HtmlGridCol($this->identifier."-col-".($this->count()+1),null));
108
			}
109
		}
110
		$count=\min(array($this->count(),$valuesSize));
111
		for($i=0;$i<$count;$i++){

Ajax/semantic/html/collections/HtmlGrid.php 2 locations

@@ 120-122 (lines=3) @@
117
	public function setRowsCount($rowsCount, $colsCount=NULL, $force=false) {
118
		$count=$this->count();
119
		if ($rowsCount < 2 && $force === false) {
120
			for($i=$count; $i < $colsCount; $i++) {
121
				$this->addItem(new HtmlGridCol("col-" . $this->identifier . "-" . $i));
122
			}
123
		} else {
124
			if ($this->hasOnlyCols($count)) {
125
				$tmpContent=$this->content;
@@ 156-158 (lines=3) @@
153
		if ($toCreate === true) {
154
			$count=$this->count();
155
			if ($count == 0 || $this->hasOnlyCols($count)) {
156
				for($i=$count; $i < $numCols; $i++) {
157
					$this->addItem(new HtmlGridCol("col-" . $this->identifier . "-" . $i, $width));
158
				}
159
			} else {
160
				for($i=0; $i < $count; $i++) {
161
					$this->getItem($i)->setColsCount($numCols);