Code Duplication    Length = 8-10 lines in 2 locations

Ajax/semantic/html/collections/form/HtmlForm.php 1 location

@@ 40-47 (lines=8) @@
37
	public function addFields($fields=NULL,$label=NULL){
38
		if(isset($fields)){
39
			if(!$fields instanceof HtmlFormFields){
40
				if(\is_array($fields)===false){
41
					$fields = \func_get_args();
42
					$end=\end($fields);
43
					if(\is_string($end)){
44
						$label=$end;
45
						\array_pop($fields);
46
					}else $label=NULL;
47
				}
48
				$this->_fields=\array_merge($this->_fields,$fields);
49
				$fields=new HtmlFormFields("fields-".$this->identifier."-".$this->count(),$fields);
50
			}

Ajax/semantic/html/collections/form/HtmlFormFields.php 1 location

@@ 25-34 (lines=10) @@
22
	}
23
24
	public function addFields($fields=NULL,$label=NULL){
25
		if(!$fields instanceof HtmlFormFields){
26
			if(\is_array($fields)===false){
27
				$fields = \func_get_args();
28
				$end=\end($fields);
29
				if(\is_string($end)){
30
					$label=$end;
31
					\array_pop($fields);
32
				}else $label=NULL;
33
			}
34
		}
35
		if(isset($label))
36
			$this->setLabel($label);
37
		foreach ($fields as $field){