Code Duplication    Length = 9-11 lines in 2 locations

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

@@ 66-74 (lines=9) @@
63
	public function addFields($fields=NULL, $label=NULL) {
64
		if (isset($fields)) {
65
			if (!$fields instanceof HtmlFormFields) {
66
				if (\is_array($fields) === false) {
67
					$fields=\func_get_args();
68
					$end=\end($fields);
69
					if (\is_string($end)) {
70
						$label=$end;
71
						\array_pop($fields);
72
					} else
73
						$label=NULL;
74
				}
75
				$this->_fields=\array_merge($this->_fields, $fields);
76
				$fields=new HtmlFormFields("fields-" . $this->identifier . "-" . $this->count(), $fields);
77
			}

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

@@ 25-35 (lines=11) @@
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
33
					$label=NULL;
34
			}
35
		}
36
		if (isset($label))
37
			$this->setLabel($label);
38
		foreach ( $fields as $field ) {