Code Duplication    Length = 7-9 lines in 2 locations

Ajax/common/html/HtmlCollection.php 2 locations

@@ 135-141 (lines=7) @@
132
133
	public function setProperties($properties){
134
		$i=0;
135
		foreach ($properties as $k=>$v){
136
			$c=$this->content[$i++];
137
			if(isset($c))
138
				$c->setProperty($k,$v);
139
			else
140
				return $this;
141
		}
142
		return $this;
143
	}
144
@@ 150-158 (lines=9) @@
147
		if(\is_array($values)===false){
148
			$values=\array_fill(0, $this->count(),$values);
149
		}
150
		foreach ($values as $value){
151
			$c=$this->content[$i++];
152
			if(isset($c)===true){
153
				$c->setProperty($property,$value);
154
			}
155
			else{
156
				return $this;
157
			}
158
		}
159
		return $this;
160
	}
161
}