Completed
Push — master ( 80e027...da7bd7 )
by Jean-Christophe
04:34
created
Ajax/semantic/html/elements/HtmlButton.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	public function setFocusable($value=true) {
59
-		if ($value === true)
60
-			$this->setProperty("tabindex", "0");
61
-		else {
59
+		if ($value === true) {
60
+					$this->setProperty("tabindex", "0");
61
+		} else {
62 62
 			$this->removeProperty("tabindex");
63 63
 		}
64 64
 		return $this;
@@ -184,8 +184,9 @@  discard block
 block discarded – undo
184 184
 	 * @return HtmlButton
185 185
 	 */
186 186
 	public static function social($identifier, $social, $value=NULL) {
187
-		if ($value === NULL)
188
-			$value=\ucfirst($social);
187
+		if ($value === NULL) {
188
+					$value=\ucfirst($social);
189
+		}
189 190
 		$return=new HtmlButton($identifier, $value);
190 191
 		$return->addIcon($social);
191 192
 		return $return->addToPropertyCtrl("class", $social, Social::getConstants());
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@  discard block
 block discarded – undo
40 40
 	 * @param string $popupEvent
41 41
 	 */
42 42
 	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
43
-		if (isset($this->_popup))
44
-			$this->_popup->setAttributes($variation, $popupEvent);
43
+		if (isset($this->_popup)) {
44
+					$this->_popup->setAttributes($variation, $popupEvent);
45
+		}
45 46
 	}
46 47
 
47 48
 	/**
@@ -96,8 +97,9 @@  discard block
 block discarded – undo
96 97
 		$labelO=$label;
97 98
 		if (\is_object($label) === false) {
98 99
 			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
99
-			if (isset($icon))
100
-				$labelO->addIcon($icon);
100
+			if (isset($icon)) {
101
+							$labelO->addIcon($icon);
102
+			}
101 103
 		} else {
102 104
 			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
103 105
 		}
@@ -124,10 +126,12 @@  discard block
 block discarded – undo
124 126
 	 * @return HtmlSemDoubleElement
125 127
 	 */
126 128
 	public function asLink($href=NULL,$target=NULL) {
127
-		if (isset($href))
128
-			$this->setProperty("href", $href);
129
-		if(isset($target))
130
-			$this->setProperty("target", $target);
129
+		if (isset($href)) {
130
+					$this->setProperty("href", $href);
131
+		}
132
+		if(isset($target)) {
133
+					$this->setProperty("target", $target);
134
+		}
131 135
 		return $this->setTagName("a");
132 136
 	}
133 137
 
@@ -138,8 +142,9 @@  discard block
 block discarded – undo
138 142
 	 */
139 143
 	public function jsShowDimmer($show=true) {
140 144
 		$status="hide";
141
-		if ($show === true)
142
-			$status="show";
145
+		if ($show === true) {
146
+					$status="show";
147
+		}
143 148
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
144 149
 	}
145 150
 
@@ -148,8 +153,9 @@  discard block
 block discarded – undo
148 153
 	 * @see BaseHtml::compile()
149 154
 	 */
150 155
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
151
-	if (isset($this->_popup))
152
-			$this->_popup->compile($js);
156
+	if (isset($this->_popup)) {
157
+				$this->_popup->compile($js);
158
+	}
153 159
 		return parent::compile($js, $view);
154 160
 	}
155 161
 
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCard.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
 	private function getPart($part, $index=NULL) {
39 39
 		if (\array_key_exists($part, $this->content)) {
40
-			if (isset($index))
41
-				return $this->content[$part][$index];
40
+			if (isset($index)) {
41
+							return $this->content[$part][$index];
42
+			}
42 43
 			return $this->content[$part];
43 44
 		}
44 45
 		return NULL;
@@ -140,8 +141,9 @@  discard block
 block discarded – undo
140 141
 		$this->addToProperty("class", "link");
141 142
 		if ($href !== "") {
142 143
 			$this->setProperty("href", $href);
143
-			if (isset($target))
144
-				$this->setProperty("target", $target);
144
+			if (isset($target)) {
145
+							$this->setProperty("target", $target);
146
+			}
145 147
 		}
146 148
 		return $this;
147 149
 	}
Please login to merge, or discard this patch.
Ajax/semantic/widgets/dataform/DataForm.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			foreach ($values as $v){
60 60
 				$form->addField($v);
61 61
 			}
62
-		}else{
62
+		} else{
63 63
 			$separators[]=$count;
64 64
 			for($i=0;$i<$size;$i++){
65 65
 				$this->_generateFields($form, $values, $headers, $separators[$i], $separators[$i+1], $wrappers);
@@ -70,18 +70,20 @@  discard block
 block discarded – undo
70 70
 	protected function _generateFields($form,$values,$headers,$sepFirst,$sepLast,$wrappers){
71 71
 		$wrapper=null;
72 72
 		$fields=\array_slice($values, $sepFirst+1,$sepLast-$sepFirst);
73
-		if(isset($headers[$sepFirst+1]))
74
-			$form->addHeader($headers[$sepFirst+1],4,true);
73
+		if(isset($headers[$sepFirst+1])) {
74
+					$form->addHeader($headers[$sepFirst+1],4,true);
75
+		}
75 76
 			if(isset($wrappers[$sepFirst+1])){
76 77
 				$wrapper=$wrappers[$sepFirst+1];
77 78
 			}
78 79
 			if(\sizeof($fields)===1){
79 80
 				$added=$form->addField($fields[0]);
80
-			}elseif(\sizeof($fields)>1){
81
+			} elseif(\sizeof($fields)>1){
81 82
 				$added=$form->addFields($fields);
82 83
 			}
83
-			if(isset($wrapper))
84
-				$added->wrap($wrapper[0],$wrapper[1]);
84
+			if(isset($wrapper)) {
85
+							$added->wrap($wrapper[0],$wrapper[1]);
86
+			}
85 87
 	}
86 88
 
87 89
 	/**
Please login to merge, or discard this patch.
Ajax/service/AjaxCall.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	public function compile(JsUtils $js=null) {
17
-		if ($js==null)
18
-			return;
17
+		if ($js==null) {
18
+					return;
19
+		}
19 20
 		$params="{}";
20 21
 		$jsCallback=NULL;
21 22
 		$attr="id";
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlMessage.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,10 +68,11 @@  discard block
 block discarded – undo
68 68
 	}
69 69
 
70 70
 	public function setDismissable($dismiss=true){
71
-		if($dismiss===true)
72
-			$this->close=new HtmlIcon("close-".$this->identifier, "close");
73
-		else
74
-			$this->close=NULL;
71
+		if($dismiss===true) {
72
+					$this->close=new HtmlIcon("close-".$this->identifier, "close");
73
+		} else {
74
+					$this->close=NULL;
75
+		}
75 76
 		return $this;
76 77
 	}
77 78
 
@@ -113,8 +114,9 @@  discard block
 block discarded – undo
113 114
 	public function setMessage($message){
114 115
 		if(\is_array($this->content)){
115 116
 			$this->content[\sizeof($this->content)-1]=$message;
116
-		}else
117
-			$this->setContent($message);
117
+		} else {
118
+					$this->setContent($message);
119
+		}
118 120
 	}
119 121
 
120 122
 	public function setTimeout($_timeout) {
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTable.php 1 patch
Braces   +29 added lines, -20 removed lines patch added patch discarded remove patch
@@ -55,10 +55,12 @@  discard block
 block discarded – undo
55 55
 			$js->execOn("mouseover", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'visible');",["preventDefault"=>false,"stopPropagation"=>true]);
56 56
 			$js->execOn("mouseout", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'hidden');",["preventDefault"=>false,"stopPropagation"=>true]);
57 57
 		}
58
-		if(\is_array($this->_deleteBehavior))
59
-			$this->_generateBehavior("delete",$this->_deleteBehavior, $js);
60
-		if(\is_array($this->_editBehavior))
61
-			$this->_generateBehavior("edit",$this->_editBehavior,$js);
58
+		if(\is_array($this->_deleteBehavior)) {
59
+					$this->_generateBehavior("delete",$this->_deleteBehavior, $js);
60
+		}
61
+		if(\is_array($this->_editBehavior)) {
62
+					$this->_generateBehavior("edit",$this->_editBehavior,$js);
63
+		}
62 64
 		return parent::run($js);
63 65
 	}
64 66
 
@@ -94,12 +96,14 @@  discard block
 block discarded – undo
94 96
 			$table->setRowCount(0, \sizeof($captions));
95 97
 			$this->_generateHeader($table,$captions);
96 98
 
97
-			if(isset($this->_compileParts))
98
-				$table->setCompileParts($this->_compileParts);
99
+			if(isset($this->_compileParts)) {
100
+							$table->setCompileParts($this->_compileParts);
101
+			}
99 102
 
100 103
 			if(isset($this->_searchField) && isset($js)){
101
-				if(isset($this->_urls["refresh"]))
102
-					$this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
104
+				if(isset($this->_urls["refresh"])) {
105
+									$this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
106
+				}
103 107
 			}
104 108
 
105 109
 			$this->_generateContent($table);
@@ -157,8 +161,9 @@  discard block
 block discarded – undo
157 161
 			$field=$ck->getField();
158 162
 			$field->setProperty("value",$this->_instanceViewer->getIdentifier());
159 163
 			$field->setProperty("name", "selection[]");
160
-			if(isset($checkedClass))
161
-				$field->setClass($checkedClass);
164
+			if(isset($checkedClass)) {
165
+							$field->setClass($checkedClass);
166
+			}
162 167
 			\array_unshift($values, $ck);
163 168
 		}
164 169
 		$result=$table->newRow();
@@ -170,8 +175,9 @@  discard block
 block discarded – undo
170 175
 
171 176
 	protected function _generatePagination($table,$js=NULL){
172 177
 		if(isset($this->_toolbar)){
173
-			if($this->_toolbarPosition==PositionInTable::FOOTER)
174
-				$this->_toolbar->setFloated("left");
178
+			if($this->_toolbarPosition==PositionInTable::FOOTER) {
179
+							$this->_toolbar->setFloated("left");
180
+			}
175 181
 		}
176 182
 		$footer=$table->getFooter();
177 183
 		$footer->mergeCol();
@@ -228,7 +234,7 @@  discard block
 block discarded – undo
228 234
 		$hasPart=$table->hasPart($part);
229 235
 		if($hasPart){
230 236
 			$row=$table->getPart($part)->addRow(\sizeof($captions));
231
-		}else{
237
+		} else{
232 238
 			$row=$table->getPart($part)->getRow(0);
233 239
 		}
234 240
 		$row->mergeCol();
@@ -253,7 +259,7 @@  discard block
 block discarded – undo
253 259
 			$this->_urls["refresh"]=JArray::getValue($urls, "refresh",0);
254 260
 			$this->_urls["edit"]=JArray::getValue($urls, "edit",1);
255 261
 			$this->_urls["delete"]=JArray::getValue($urls, "delete",2);
256
-		}else{
262
+		} else{
257 263
 			$this->_urls=["refresh"=>$urls,"edit"=>$urls,"delete"=>$urls];
258 264
 		}
259 265
 		return $this;
@@ -327,8 +333,9 @@  discard block
 block discarded – undo
327 333
 
328 334
 	protected function getTargetSelector() {
329 335
 		$result=$this->_targetSelector;
330
-		if(!isset($result))
331
-			$result="#".$this->identifier;
336
+		if(!isset($result)) {
337
+					$result="#".$this->identifier;
338
+		}
332 339
 		return $result;
333 340
 	}
334 341
 
@@ -343,8 +350,9 @@  discard block
 block discarded – undo
343 350
 	}
344 351
 
345 352
 	public function getRefreshSelector() {
346
-		if(isset($this->_refreshSelector))
347
-			return $this->_refreshSelector;
353
+		if(isset($this->_refreshSelector)) {
354
+					return $this->_refreshSelector;
355
+		}
348 356
 		return "#".$this->identifier." tbody";
349 357
 	}
350 358
 
@@ -359,8 +367,9 @@  discard block
 block discarded – undo
359 367
 	 */
360 368
 	public function show($modelInstance){
361 369
 		if(\is_array($modelInstance)){
362
-			if(\is_array(array_values($modelInstance)[0]))
363
-				$modelInstance=\json_decode(\json_encode($modelInstance), FALSE);
370
+			if(\is_array(array_values($modelInstance)[0])) {
371
+							$modelInstance=\json_decode(\json_encode($modelInstance), FALSE);
372
+			}
364 373
 		}
365 374
 		$this->_modelInstance=$modelInstance;
366 375
 	}
Please login to merge, or discard this patch.