Completed
Push — master ( 7089ac...364809 )
by Jean-Christophe
03:53
created
Ajax/semantic/html/collections/form/HtmlForm.php 1 patch
Braces   +24 added lines, -16 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
 	 */
48 48
 	public function addHeader($title, $niveau=1, $dividing=true) {
49 49
 		$header=new HtmlHeader("", $niveau, $title);
50
-		if ($dividing)
51
-			$header->setDividing();
50
+		if ($dividing) {
51
+					$header->setDividing();
52
+		}
52 53
 		return $this->addItem($header);
53 54
 	}
54 55
 
@@ -69,14 +70,16 @@  discard block
 block discarded – undo
69 70
 					if (\is_string($end)) {
70 71
 						$label=$end;
71 72
 						\array_pop($fields);
72
-					} else
73
-						$label=NULL;
73
+					} else {
74
+											$label=NULL;
75
+					}
74 76
 				}
75 77
 				$this->_fields=\array_merge($this->_fields, $fields);
76 78
 				$fields=new HtmlFormFields("fields-" . $this->identifier . "-" . $this->count(), $fields);
77 79
 			}
78
-			if (isset($label))
79
-				$fields=new HtmlFormField("", $fields, $label);
80
+			if (isset($label)) {
81
+							$fields=new HtmlFormField("", $fields, $label);
82
+			}
80 83
 		} else {
81 84
 			$fields=new HtmlFormFields("fields-" . $this->identifier . "-" . $this->count());
82 85
 		}
@@ -145,12 +148,15 @@  discard block
 block discarded – undo
145 148
 	 */
146 149
 	public function addMessage($identifier, $content, $header=NULL, $icon=NULL, $type=NULL) {
147 150
 		$message=new HtmlMessage($identifier, $content);
148
-		if (isset($header))
149
-			$message->addHeader($header);
150
-		if (isset($icon))
151
-			$message->setIcon($icon);
152
-		if (isset($type))
153
-			$message->setStyle($type);
151
+		if (isset($header)) {
152
+					$message->addHeader($header);
153
+		}
154
+		if (isset($icon)) {
155
+					$message->setIcon($icon);
156
+		}
157
+		if (isset($type)) {
158
+					$message->setStyle($type);
159
+		}
154 160
 		return $this->addItem($message);
155 161
 	}
156 162
 
@@ -169,15 +175,17 @@  discard block
 block discarded – undo
169 175
 	public function run(JsUtils $js) {
170 176
 		$compo=NULL;
171 177
 		foreach ($this->_fields as $field){
172
-			if($field instanceof HtmlFormField)
173
-				$compo=$this->addCompoValidation($js, $compo, $field);
178
+			if($field instanceof HtmlFormField) {
179
+							$compo=$this->addCompoValidation($js, $compo, $field);
180
+			}
174 181
 		}
175 182
 		foreach ($this->content as $field){
176 183
 			if($field instanceof HtmlFormFields){
177 184
 				$items=$field->getItems();
178 185
 				foreach ($items as $_field){
179
-					if($_field instanceof HtmlFormField)
180
-						$compo=$this->addCompoValidation($js, $compo, $_field);
186
+					if($_field instanceof HtmlFormField) {
187
+											$compo=$this->addCompoValidation($js, $compo, $_field);
188
+					}
181 189
 				}
182 190
 			}
183 191
 		}
Please login to merge, or discard this patch.