Completed
Push — intl ( b391f2...20c33e )
by Fabio
08:04
created
framework/Web/Javascripts/TJavaScript.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -171,8 +171,7 @@  discard block
 block discarded – undo
171 171
 					}
172 172
 				}
173 173
 				return '{'.$results.'}';
174
-			}
175
-			else
174
+			} else
176 175
 			{
177 176
 				foreach($value as $v)
178 177
 				{
@@ -185,8 +184,7 @@  discard block
 block discarded – undo
185 184
 				}
186 185
 				return '['.$results.']';
187 186
 			}
188
-		}
189
-		else if(is_integer($value))
187
+		} else if(is_integer($value))
190 188
 			return "$value";
191 189
 		else if(is_float($value))
192 190
 		{
@@ -206,8 +204,7 @@  discard block
 block discarded – undo
206 204
 						return str_replace($locale['decimal_point'], '.', "$value");
207 205
 					break;
208 206
 			}
209
-		}
210
-		else if(is_object($value))
207
+		} else if(is_object($value))
211 208
 			if ($value instanceof TJavaScriptLiteral)
212 209
 				return $value->toJavaScriptLiteral();
213 210
 			else
Please login to merge, or discard this patch.
framework/Web/TUrlManager.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -80,12 +80,10 @@  discard block
 block discarded – undo
80 80
 						$name=urlencode($name.'[]');
81 81
 						foreach($value as $v)
82 82
 							$url.=$amp.$name.'='.urlencode($v);
83
-					}
84
-					else
83
+					} else
85 84
 						$url.=$amp.urlencode($name).'='.urlencode($value);
86 85
 				}
87
-			}
88
-			else
86
+			} else
89 87
 			{
90 88
 				foreach($getItems as $name=>$value)
91 89
 				{
@@ -93,8 +91,7 @@  discard block
 block discarded – undo
93 91
 					{
94 92
 						foreach($value as $v)
95 93
 							$url.=$amp.$name.'[]='.$v;
96
-					}
97
-					else
94
+					} else
98 95
 						$url.=$amp.$name.'='.$value;
99 96
 				}
100 97
 			}
@@ -147,14 +144,12 @@  discard block
 block discarded – undo
147 144
 							$getVariables[substr($name,0,$pos)][]=$value;
148 145
 						else
149 146
 							$getVariables[$name]=$value;
150
-					}
151
-					else
147
+					} else
152 148
 						$getVariables[$path]='';
153 149
 				}
154 150
 			}
155 151
 			return $getVariables;
156
-		}
157
-		else
152
+		} else
158 153
 			return array();
159 154
 	}
160 155
 }
Please login to merge, or discard this patch.
framework/Web/THttpResponse.php 1 patch
Braces   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 		$status=TPropertyValue::ensureInteger($status);
282 282
 		if(isset(self::$HTTP_STATUS_CODES[$status])) {
283 283
 			$this->_reason=self::$HTTP_STATUS_CODES[$status];
284
-		}else{
284
+		} else{
285 285
 			if($reason===null || $reason==='') {
286 286
 				throw new TInvalidDataValueException("response_status_reason_missing");
287 287
 			}
@@ -377,8 +377,7 @@  discard block
 block discarded – undo
377 377
 		{
378 378
 			foreach($headers as $h)
379 379
 				header($h);
380
-		}
381
-		else
380
+		} else
382 381
 		{
383 382
 			header('Pragma: public');
384 383
 			header('Expires: 0');
@@ -488,13 +487,11 @@  discard block
 block discarded – undo
488 487
 				{
489 488
 					$this->_bufferOutput = false;
490 489
 					ob_end_flush();
491
-				}
492
-				else
490
+				} else
493 491
 					ob_flush();
494 492
 				flush();
495 493
 			}
496
-		}
497
-		else
494
+		} else
498 495
 			flush();
499 496
 	}
500 497
 
@@ -645,8 +642,7 @@  discard block
 block discarded – undo
645 642
 				$cookie->getSecure(),
646 643
 				$cookie->getHttpOnly()
647 644
 			);
648
-		}
649
-		else {
645
+		} else {
650 646
 			setcookie(
651 647
 				$cookie->getName(),
652 648
 				$cookie->getValue(),
Please login to merge, or discard this patch.
framework/Web/Services/TJsonService.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
 				foreach($config['json'] as $id => $json)
80 80
 					$this->_services[$id] = $json;
81 81
 			}
82
-		}
83
-		else
82
+		} else
84 83
 		{
85 84
 			foreach($config->getElementsByTagName('json') as $json)
86 85
 			{
@@ -111,14 +110,11 @@  discard block
 block discarded – undo
111 110
 					{
112 111
 						$properties = isset($serviceConfig['properties'])?$serviceConfig['properties']:array();
113 112
 						$this->createJsonResponse($service,$properties,$serviceConfig);
114
-					}
115
-					else
113
+					} else
116 114
 						throw new TConfigurationException('jsonservice_response_type_invalid',$id);
117
-				}
118
-				else
115
+				} else
119 116
 					throw new TConfigurationException('jsonservice_class_required',$id);
120
-			}
121
-			else
117
+			} else
122 118
 			{
123 119
 				$properties=$serviceConfig->getAttributes();
124 120
 				if(($class=$properties->remove('class'))!==null)
@@ -128,12 +124,10 @@  discard block
 block discarded – undo
128 124
 						$this->createJsonResponse($service,$properties,$serviceConfig);
129 125
 					else
130 126
 						throw new TConfigurationException('jsonservice_response_type_invalid',$id);
131
-				}
132
-				else
127
+				} else
133 128
 					throw new TConfigurationException('jsonservice_class_required',$id);
134 129
 			}
135
-		}
136
-		else
130
+		} else
137 131
 			throw new THttpException(404,'jsonservice_provider_unknown',$id);
138 132
 	}
139 133
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableRow.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
 		{
120 120
 			$this->raiseCallbackEvent($param);
121 121
 			return true;
122
-		}
123
-		else return false;
122
+		} else return false;
124 123
 	}
125 124
 
126 125
 	/**
@@ -163,8 +162,7 @@  discard block
 block discarded – undo
163 162
 			parent::render($writer);
164 163
 			if ($this->getActiveControl()->canUpdateClientSide())
165 164
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
166
-		}
167
-		else
165
+		} else
168 166
 		{
169 167
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
170 168
 			// If we update a TActiveTableRow on callback, we shouldn't update all childs,
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRepeatInfo.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -191,13 +191,11 @@  discard block
 block discarded – undo
191 191
 				$control->setCaption($this->_caption);
192 192
 				$control->setCaptionAlign($this->_captionAlign);
193 193
 			}
194
-		}
195
-		else if($this->_repeatLayout===TRepeatLayout::Raw)
194
+		} else if($this->_repeatLayout===TRepeatLayout::Raw)
196 195
 		{
197 196
 			$this->renderRawContents($writer,$user);
198 197
 			return;
199
-		}
200
-		else
198
+		} else
201 199
 			$control=new TWebControl;
202 200
 		$control->setID($user->getClientID());
203 201
 		$control->copyBaseAttributes($user);
@@ -295,8 +293,7 @@  discard block
 block discarded – undo
295 293
 				}
296 294
 			}
297 295
 			$writer->renderEndTag();
298
-		}
299
-		else
296
+		} else
300 297
 		{
301 298
 			$column=0;
302 299
 			for($i=0;$i<$itemCount;++$i)
@@ -334,8 +331,7 @@  discard block
 block discarded – undo
334 331
 			$rows=$itemCount;
335 332
 			$columns=1;
336 333
 			$lastColumns=1;
337
-		}
338
-		else
334
+		} else
339 335
 		{
340 336
 			$columns=$this->_repeatColumns;
341 337
 			$rows=(int)(($itemCount+$columns-1)/$columns);
@@ -391,8 +387,7 @@  discard block
 block discarded – undo
391 387
 						$user->renderItem($writer,$this,'Separator',$index);
392 388
 						$writer->renderEndTag();
393 389
 						$writer->writeLine();
394
-					}
395
-					else if($columns>1)
390
+					} else if($columns>1)
396 391
 						$writer->write("<td></td>\n");
397 392
 				}
398 393
 				if($row==$rows-1)
@@ -407,8 +402,7 @@  discard block
 block discarded – undo
407 402
 				$writer->writeLine();
408 403
 			}
409 404
 			$writer->renderEndTag();
410
-		}
411
-		else
405
+		} else
412 406
 		{
413 407
 			$renderedItems=0;
414 408
 			for($row=0;$row<$rows;++$row)
@@ -473,8 +467,7 @@  discard block
 block discarded – undo
473 467
 			$writer->renderEndTag();
474 468
 			$writer->renderEndTag();
475 469
 			$writer->renderEndTag();
476
-		}
477
-		else
470
+		} else
478 471
 		{
479 472
 			$user->renderItem($writer,$this,'Header',-1);
480 473
 			if($needBreak)
@@ -505,8 +498,7 @@  discard block
 block discarded – undo
505 498
 			$writer->renderEndTag();
506 499
 			$writer->renderEndTag();
507 500
 			$writer->renderEndTag();
508
-		}
509
-		else
501
+		} else
510 502
 			$user->renderItem($writer,$this,'Footer',-1);
511 503
 		$writer->writeLine();
512 504
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TListBox.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@  discard block
 block discarded – undo
101 101
 				{
102 102
 					$this->setSelectedIndex($index);
103 103
 					return $this->_dataChanged=true;
104
-				}
105
-				else
104
+				} else
106 105
 					return false;
107 106
 			}
108 107
 			if(!is_array($selections))
@@ -124,8 +123,7 @@  discard block
 block discarded – undo
124 123
 						break;
125 124
 					}
126 125
 				}
127
-			}
128
-			else
126
+			} else
129 127
 				$flag=true;
130 128
 			if($flag)
131 129
 			{
@@ -133,13 +131,11 @@  discard block
 block discarded – undo
133 131
 				$this->_dataChanged=true;
134 132
 			}
135 133
 			return $flag;
136
-		}
137
-		else if($this->getSelectedIndex()!==-1)
134
+		} else if($this->getSelectedIndex()!==-1)
138 135
 		{
139 136
 			$this->clearSelection();
140 137
 			return $this->_dataChanged=true;
141
-		}
142
-		else
138
+		} else
143 139
 			return false;
144 140
 	}
145 141
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBaseValidator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -518,16 +518,14 @@
 block discarded – undo
518 518
 				{
519 519
 					$this->setIsValid(true);
520 520
 					$this->onValidationSuccess();
521
-				}
522
-				else
521
+				} else
523 522
 				{
524 523
 					if($target)
525 524
 						$target->setIsValid(false);
526 525
 					$this->setIsValid(false);
527 526
 					$this->onValidationError();
528 527
 				}
529
-			}
530
-			else
528
+			} else
531 529
 			{
532 530
 				$this->evaluateIsValid();
533 531
 				$this->setIsValid(true);
Please login to merge, or discard this patch.
framework/Web/UI/TTemplateControl.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@  discard block
 block discarded – undo
69 69
 			if(!isset(self::$_template[$class]))
70 70
 				self::$_template[$class]=$this->loadTemplate();
71 71
 			return self::$_template[$class];
72
-		}
73
-		else
72
+		} else
74 73
 			return $this->_localTemplate;
75 74
 	}
76 75
 
@@ -205,8 +204,7 @@  discard block
 block discarded – undo
205 204
 			$controls=$placeholder->getParent()->getControls();
206 205
 			$loc=$controls->remove($placeholder);
207 206
 			$controls->insertAt($loc,$content);
208
-		}
209
-		else
207
+		} else
210 208
 			throw new TConfigurationException('templatecontrol_placeholder_inexistent',$id);
211 209
 	}
212 210
 
@@ -232,8 +230,7 @@  discard block
 block discarded – undo
232 230
 			$master->ensureChildControls();
233 231
 			foreach($this->_contents as $id=>$content)
234 232
 				$master->injectContent($id,$content);
235
-		}
236
-		else if(!empty($this->_contents))
233
+		} else if(!empty($this->_contents))
237 234
 			throw new TConfigurationException('templatecontrol_mastercontrol_required',get_class($this));
238 235
 		parent::initRecursive($namingContainer);
239 236
 	}
@@ -261,8 +258,7 @@  discard block
 block discarded – undo
261 258
                                                 $control->Checked = (boolean) $arObj->{$key};
262 259
                                         elseif ($control instanceof TDatePicker)
263 260
                                                 $control->Date = $arObj->{$key};
264
-                                }
265
-                                else
261
+                                } else
266 262
                                 {
267 263
                                         foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
268 264
                                         {
@@ -284,8 +280,7 @@  discard block
 block discarded – undo
284 280
                                         }
285 281
                                         break;
286 282
                                 }
287
-                        } 
288
-                        catch (Exception $ex)
283
+                        } catch (Exception $ex)
289 284
                         {
290 285
                                 if ($throwExceptions)
291 286
                                         throw $ex;
@@ -315,8 +310,7 @@  discard block
 block discarded – undo
315 310
                                         $arObj->{$key} = $control->Checked;
316 311
                                 elseif ($control instanceof TDatePicker)
317 312
                                         $arObj->{$key} = $control->Date;
318
-                        } 
319
-                        catch (Exception $ex)
313
+                        } catch (Exception $ex)
320 314
                         {
321 315
                                 if ($throwExceptions)
322 316
                                         throw $ex;
Please login to merge, or discard this patch.