Completed
Push — remove_deprecates ( 1de955...c03db3 )
by Fabio
16:32 queued 07:25
created
framework/Web/UI/ActiveControls/TActivePageAdapter.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -256,14 +256,12 @@
 block discarded – undo
256 256
 				$param = $this->getCallbackEventParameter();
257 257
 				$result = new TCallbackEventParameter($this->getResponse(), $param);
258 258
 				$callbackHandler->raiseCallbackEvent($result);
259
-			}
260
-			else
259
+			} else
261 260
 			{
262 261
 				throw new TInvalidCallbackException(
263 262
 					'callback_invalid_handler', $callbackHandler->getUniqueID());
264 263
 			}
265
-		 }
266
-		 else
264
+		 } else
267 265
 		 {
268 266
 		 	$target = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_TARGET);
269 267
 		 	throw new TInvalidCallbackException('callback_invalid_target', $target);
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDataGrid.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -140,8 +140,7 @@  discard block
 block discarded – undo
140 140
 				$button->setText($text);
141 141
 				return $button;
142 142
 			}
143
-		}
144
-		else {
143
+		} else {
145 144
 			$button=new TActiveButton;
146 145
 			if(!$enabled)
147 146
 				$button->setEnabled(false);
@@ -175,8 +174,7 @@  discard block
 block discarded – undo
175 174
 		if($this->getHasPreRendered()) {
176 175
 			$this->renderDataGrid($writer);
177 176
 			if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer);
178
-		}
179
-		else {
177
+		} else {
180 178
 			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
181 179
 		}
182 180
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveButtonColumn.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
 				$button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
52 52
 			$cell->getControls()->add($button);
53 53
 			$cell->registerObject('Button',$button);
54
-		}
55
-		else
54
+		} else
56 55
 			parent::initializeCell($cell,$columnIndex,$itemType);
57 56
 	}
58 57
 }
59 58
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TBaseActiveCallbackControl.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -233,8 +233,7 @@  discard block
 block discarded – undo
233 233
 				$newid=substr($id,$pos+1);
234 234
 				if ($control!==null)
235 235
 					$control=$control->$newid;
236
-			}
237
-			else
236
+			} else
238 237
 			{
239 238
 				// TCheckBoxList overrides findControl() with a fake implementation
240 239
 				// but accepts a second parameter to use the standard one
@@ -296,8 +295,7 @@  discard block
 block discarded – undo
296 295
 		{
297 296
 			$group=$this->getValidationGroup();
298 297
 			return $this->getPage()->getValidators($group)->getCount()>0;
299
-		}
300
-		else
298
+		} else
301 299
 			return false;
302 300
 	}
303 301
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRepeaterItem.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,8 +129,7 @@
 block discarded – undo
129 129
 		{
130 130
 			$this->raiseBubbleEvent($this,new TRepeaterCommandEventParameter($this,$sender,$param));
131 131
 			return true;
132
-		}
133
-		else
132
+		} else
134 133
 			return false;
135 134
 	}
136 135
 }
137 136
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataGrid.php 1 patch
Braces   +21 added lines, -42 removed lines patch added patch discarded remove patch
@@ -708,33 +708,27 @@  discard block
 block discarded – undo
708 708
 				$this->setSelectedItemIndex($param->getItem()->getItemIndex());
709 709
 				$this->onSelectedIndexChanged($param);
710 710
 				return true;
711
-			}
712
-			else if(strcasecmp($command,self::CMD_EDIT)===0)
711
+			} else if(strcasecmp($command,self::CMD_EDIT)===0)
713 712
 			{
714 713
 				$this->onEditCommand($param);
715 714
 				return true;
716
-			}
717
-			else if(strcasecmp($command,self::CMD_DELETE)===0)
715
+			} else if(strcasecmp($command,self::CMD_DELETE)===0)
718 716
 			{
719 717
 				$this->onDeleteCommand($param);
720 718
 				return true;
721
-			}
722
-			else if(strcasecmp($command,self::CMD_UPDATE)===0)
719
+			} else if(strcasecmp($command,self::CMD_UPDATE)===0)
723 720
 			{
724 721
 				$this->onUpdateCommand($param);
725 722
 				return true;
726
-			}
727
-			else if(strcasecmp($command,self::CMD_CANCEL)===0)
723
+			} else if(strcasecmp($command,self::CMD_CANCEL)===0)
728 724
 			{
729 725
 				$this->onCancelCommand($param);
730 726
 				return true;
731
-			}
732
-			else if(strcasecmp($command,self::CMD_SORT)===0)
727
+			} else if(strcasecmp($command,self::CMD_SORT)===0)
733 728
 			{
734 729
 				$this->onSortCommand(new TDataGridSortCommandEventParameter($sender,$param));
735 730
 				return true;
736
-			}
737
-			else if(strcasecmp($command,self::CMD_PAGE)===0)
731
+			} else if(strcasecmp($command,self::CMD_PAGE)===0)
738 732
 			{
739 733
 				$p=$param->getCommandParameter();
740 734
 				if(strcasecmp($p,self::CMD_PAGE_NEXT)===0)
@@ -881,8 +875,7 @@  discard block
 block discarded – undo
881 875
 			foreach($this->_autoColumns as $column)
882 876
 				$state[]=$column->saveState();
883 877
 			$this->setViewState('AutoColumns',$state,array());
884
-		}
885
-		else
878
+		} else
886 879
 			$this->clearViewState('AutoColumns');
887 880
 		if($this->_columns)
888 881
 		{
@@ -890,8 +883,7 @@  discard block
 block discarded – undo
890 883
 			foreach($this->_columns as $column)
891 884
 				$state[]=$column->saveState();
892 885
 			$this->setViewState('Columns',$state,array());
893
-		}
894
-		else
886
+		} else
895 887
 			$this->clearViewState('Columns');
896 888
 	}
897 889
 
@@ -916,8 +908,7 @@  discard block
 block discarded – undo
916 908
 					$column->loadState($st);
917 909
 					$this->_autoColumns->add($column);
918 910
 				}
919
-			}
920
-			else
911
+			} else
921 912
 				$this->_autoColumns=null;
922 913
 			$state=$this->getViewState('Columns',array());
923 914
 			if($this->_columns && $this->_columns->getCount()===count($state))
@@ -1023,8 +1014,7 @@  discard block
 block discarded – undo
1023 1014
 			$columns=new TList($this->getColumns());
1024 1015
 			$autoColumns=$this->createAutoColumns($data);
1025 1016
 			$columns->mergeWith($autoColumns);
1026
-		}
1027
-		else
1017
+		} else
1028 1018
 			$columns=$this->getColumns();
1029 1019
 		$this->_allColumns=$columns;
1030 1020
 
@@ -1114,8 +1104,7 @@  discard block
 block discarded – undo
1114 1104
 					{
1115 1105
 						$prevCell=$cell;
1116 1106
 						$prevCellText=$cellText;
1117
-					}
1118
-					else
1107
+					} else
1119 1108
 					{
1120 1109
 						if(($rowSpan=$prevCell->getRowSpan())===0)
1121 1110
 							$rowSpan=1;
@@ -1164,8 +1153,7 @@  discard block
 block discarded – undo
1164 1153
 			$this->getControls()->add($item);
1165 1154
 			$item->dataBind();
1166 1155
 			$this->onItemDataBound($param);
1167
-		}
1168
-		else
1156
+		} else
1169 1157
 		{
1170 1158
 			$this->onItemCreated($param);
1171 1159
 			$this->getControls()->add($item);
@@ -1248,8 +1236,7 @@  discard block
 block discarded – undo
1248 1236
 				$button->setText($text);
1249 1237
 				return $button;
1250 1238
 			}
1251
-		}
1252
-		else
1239
+		} else
1253 1240
 		{
1254 1241
 			$button=new TButton;
1255 1242
 			if(!$enabled)
@@ -1283,8 +1270,7 @@  discard block
 block discarded – undo
1283 1270
 
1284 1271
 			$label=$this->createPagerButton($pager,$buttonType,false,$style->getPrevPageText(),'','');
1285 1272
 			$controls->add($label);
1286
-		}
1287
-		else
1273
+		} else
1288 1274
 		{
1289 1275
 			if(($text=$style->getFirstPageText())!=='')
1290 1276
 			{
@@ -1307,8 +1293,7 @@  discard block
 block discarded – undo
1307 1293
 				$label=$this->createPagerButton($pager,$buttonType,false,$text,'','');
1308 1294
 				$controls->add($label);
1309 1295
 			}
1310
-		}
1311
-		else
1296
+		} else
1312 1297
 		{
1313 1298
 			$button=$this->createPagerButton($pager,$buttonType,true,$style->getNextPageText(),self::CMD_PAGE,self::CMD_PAGE_NEXT);
1314 1299
 			$controls->add($button);
@@ -1368,8 +1353,7 @@  discard block
 block discarded – undo
1368 1353
 			{
1369 1354
 				$label=$this->createPagerButton($pager,$buttonType,false,"$i",'','');
1370 1355
 				$controls->add($label);
1371
-			}
1372
-			else
1356
+			} else
1373 1357
 			{
1374 1358
 				$button=$this->createPagerButton($pager,$buttonType,true,"$i",self::CMD_PAGE,"$i");
1375 1359
 				$controls->add($button);
@@ -1415,8 +1399,7 @@  discard block
 block discarded – undo
1415 1399
 					$column->setDataField($key);
1416 1400
 					$column->setSortExpression($key);
1417 1401
 					$autoColumns->add($column);
1418
-				}
1419
-				else
1402
+				} else
1420 1403
 				{
1421 1404
 					$column->setHeaderText(TListItemType::Item);
1422 1405
 					$column->setDataField($key);
@@ -1507,8 +1490,7 @@  discard block
 block discarded – undo
1507 1490
 					{
1508 1491
 						if($itemStyle)
1509 1492
 							$item->getStyle()->mergeWith($itemStyle);
1510
-					}
1511
-					else
1493
+					} else
1512 1494
 					{
1513 1495
 						if($alternatingItemStyle)
1514 1496
 							$item->getStyle()->mergeWith($alternatingItemStyle);
@@ -1521,8 +1503,7 @@  discard block
 block discarded – undo
1521 1503
 					{
1522 1504
 						if($itemStyle)
1523 1505
 							$item->getStyle()->mergeWith($itemStyle);
1524
-					}
1525
-					else
1506
+					} else
1526 1507
 					{
1527 1508
 						if($alternatingItemStyle)
1528 1509
 							$item->getStyle()->mergeWith($alternatingItemStyle);
@@ -1536,8 +1517,7 @@  discard block
 block discarded – undo
1536 1517
 						{
1537 1518
 							if($pagerStyle->getPosition()===TDataGridPagerPosition::Bottom || !$pagerStyle->getVisible())
1538 1519
 								$item->setVisible(false);
1539
-						}
1540
-						else
1520
+						} else
1541 1521
 						{
1542 1522
 							if($pagerStyle->getPosition()===TDataGridPagerPosition::Top || !$pagerStyle->getVisible())
1543 1523
 								$item->setVisible(false);
@@ -1609,8 +1589,7 @@  discard block
 block discarded – undo
1609 1589
 				$control->renderBeginTag($writer);
1610 1590
 				$this->renderContents($writer);
1611 1591
 				$control->renderEndTag($writer);
1612
-			}
1613
-			else if($this->getViewState('ItemCount',0)>0)
1592
+			} else if($this->getViewState('ItemCount',0)>0)
1614 1593
 			{
1615 1594
 				$this->applyItemStyles();
1616 1595
 				if($this->_topPager)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataBoundControl.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -286,8 +286,7 @@  discard block
 block discarded – undo
286 286
 		{
287 287
 			$this->_requiresDataBinding=true;
288 288
 			$this->ensureDataBound();
289
-		}
290
-		else
289
+		} else
291 290
 			$this->_requiresDataBinding=$value;
292 291
 	}
293 292
 
@@ -350,8 +349,7 @@  discard block
 block discarded – undo
350 349
 					$this->setCurrentPageIndex($ds->getCurrentPageIndex());
351 350
 				}
352 351
 				$this->performDataBinding($ds);
353
-			}
354
-			else
352
+			} else
355 353
 			{
356 354
 				$this->clearViewState('PageCount');
357 355
 				$this->performDataBinding($data);
@@ -380,8 +378,7 @@  discard block
 block discarded – undo
380 378
 				if($this->_currentViewIsFromDataSourceID=$this->getUsingDataSourceID())
381 379
 					$view->attachEventHandler('OnDataSourceViewChanged',array($this,'dataSourceViewChanged'));
382 380
 				$this->_currentView=$view;
383
-			}
384
-			else
381
+			} else
385 382
 				$this->_currentView=null;
386 383
 			$this->_currentViewValid=true;
387 384
 		}
@@ -400,8 +397,7 @@  discard block
 block discarded – undo
400 397
 					throw new TInvalidDataValueException('databoundcontrol_datasourceid_invalid',$dsid);
401 398
 				else
402 399
 					$this->_currentDataSource=$dataSource;
403
-			}
404
-			else if(($dataSource=$this->getDataSource())!==null)
400
+			} else if(($dataSource=$this->getDataSource())!==null)
405 401
 				$this->_currentDataSource=new TReadOnlyDataSource($dataSource,$this->getDataMember());
406 402
 			else
407 403
 				$this->_currentDataSource=null;
@@ -482,14 +478,12 @@  discard block
 block discarded – undo
482 478
 					$list->add(array($value,is_string($key)?$key:$value));
483 479
 			}
484 480
 			return $list;
485
-		}
486
-		else if(is_array($value))
481
+		} else if(is_array($value))
487 482
 			return new TMap($value);
488 483
 		else if($value instanceof TDbDataReader) {
489 484
 			// read array from TDbDataReader since it's forward-only stream and can only be traversed once
490 485
 			return $value->readAll();
491
-		}
492
-		else if(($value instanceof \Traversable) || $value===null)
486
+		} else if(($value instanceof \Traversable) || $value===null)
493 487
 			return $value;
494 488
 		else
495 489
 			throw new TInvalidDataTypeException('databoundcontrol_datasource_invalid',get_class($this));
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TPager.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -403,8 +403,7 @@  discard block
 block discarded – undo
403 403
 			$this->setPageCount($targetControl->getPageCount());
404 404
 			$this->setCurrentPageIndex($targetControl->getCurrentPageIndex());
405 405
 			$this->buildPager();
406
-		}
407
-		else
406
+		} else
408 407
 			$this->_pageCount=0;
409 408
 	}
410 409
 
@@ -466,15 +465,13 @@  discard block
 block discarded – undo
466 465
 				$button->setCssClass($this->getButtonCssClass());
467 466
 				return $button;
468 467
 			}
469
-		}
470
-		else
468
+		} else
471 469
 		{
472 470
 			if($buttonType===TPagerButtonType::ImageButton)
473 471
 			{
474 472
 				$button=new TImageButton;
475 473
 				$button->setImageUrl($this->getPageImageUrl($text,$commandName));
476
-			}
477
-			else
474
+			} else
478 475
 				$button=new TButton;
479 476
 			if(!$enabled)
480 477
 				$button->setEnabled(false);
@@ -529,8 +526,7 @@  discard block
 block discarded – undo
529 526
 			}
530 527
 			$label=$this->createPagerButton($buttonType,false,$this->getPrevPageText(),self::CMD_PAGE_PREV,'');
531 528
 			$controls->add($label);
532
-		}
533
-		else
529
+		} else
534 530
 		{
535 531
 			if(($text=$this->getFirstPageText())!=='')
536 532
 			{
@@ -552,8 +548,7 @@  discard block
 block discarded – undo
552 548
 				$label=$this->createPagerButton($buttonType,false,$text,self::CMD_PAGE_LAST,'');
553 549
 				$controls->add($label);
554 550
 			}
555
-		}
556
-		else
551
+		} else
557 552
 		{
558 553
 			$button=$this->createPagerButton($buttonType,true,$this->getNextPageText(),self::CMD_PAGE_NEXT,'');
559 554
 			$controls->add($button);
@@ -611,8 +606,7 @@  discard block
 block discarded – undo
611 606
 			{
612 607
 				$label=$this->createPagerButton($buttonType,false,"$i",self::CMD_PAGE,'');
613 608
 				$controls->add($label);
614
-			}
615
-			else
609
+			} else
616 610
 			{
617 611
 				$button=$this->createPagerButton($buttonType,true,"$i",self::CMD_PAGE,"$i");
618 612
 				$controls->add($button);
@@ -689,32 +683,27 @@  discard block
 block discarded – undo
689 683
 				$pageIndex=TPropertyValue::ensureInteger($param->getCommandParameter())-1;
690 684
 				$this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$pageIndex));
691 685
 				return true;
692
-			}
693
-			else if(strcasecmp($command,self::CMD_PAGE_NEXT)===0)
686
+			} else if(strcasecmp($command,self::CMD_PAGE_NEXT)===0)
694 687
 			{
695 688
 				$pageIndex=$this->getCurrentPageIndex()+1;
696 689
 				$this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$pageIndex));
697 690
 				return true;
698
-			}
699
-			else if(strcasecmp($command,self::CMD_PAGE_PREV)===0)
691
+			} else if(strcasecmp($command,self::CMD_PAGE_PREV)===0)
700 692
 			{
701 693
 				$pageIndex=$this->getCurrentPageIndex()-1;
702 694
 				$this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$pageIndex));
703 695
 				return true;
704
-			}
705
-			else if(strcasecmp($command,self::CMD_PAGE_FIRST)===0)
696
+			} else if(strcasecmp($command,self::CMD_PAGE_FIRST)===0)
706 697
 			{
707 698
 				$this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,0));
708 699
 				return true;
709
-			}
710
-			else if(strcasecmp($command,self::CMD_PAGE_LAST)===0)
700
+			} else if(strcasecmp($command,self::CMD_PAGE_LAST)===0)
711 701
 			{
712 702
 				$this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$this->getPageCount()-1));
713 703
 				return true;
714 704
 			}
715 705
 			return false;
716
-		}
717
-		else
706
+		} else
718 707
 			return false;
719 708
 	}
720 709
 }
721 710
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TOutputCache.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -116,8 +116,7 @@  discard block
 block discarded – undo
116 116
 					$this->_cache=$this->getApplication()->getModule($this->_cacheModuleID);
117 117
 					if(!($this->_cache instanceof ICache))
118 118
 						throw new TConfigurationException('outputcache_cachemoduleid_invalid',$this->_cacheModuleID);
119
-				}
120
-				else
119
+				} else
121 120
 					$this->_cache=$this->getApplication()->getCache();
122 121
 				if($this->_cache!==null)
123 122
 				{
@@ -129,8 +128,7 @@  discard block
 block discarded – undo
129 128
 						$param->setCacheTime(isset($data[3])?$data[3]:0);
130 129
 						$this->onCheckDependency($param);
131 130
 						$this->_dataCached=$param->getIsValid();
132
-					}
133
-					else
131
+					} else
134 132
 						$this->_dataCached=false;
135 133
 					if($this->_dataCached)
136 134
 						list($this->_contents,$this->_state,$this->_actions,$this->_cacheTime)=$data;
@@ -154,8 +152,7 @@  discard block
 block discarded – undo
154 152
 			$stack->push($this);
155 153
 			parent::initRecursive($namingContainer);
156 154
 			$stack->pop();
157
-		}
158
-		else
155
+		} else
159 156
 			parent::initRecursive($namingContainer);
160 157
 	}
161 158
 
@@ -175,8 +172,7 @@  discard block
 block discarded – undo
175 172
 			$stack->push($this);
176 173
 			parent::loadRecursive();
177 174
 			$stack->pop();
178
-		}
179
-		else
175
+		} else
180 176
 		{
181 177
 			if($this->_dataCached)
182 178
 				$this->performActions();
@@ -214,8 +210,7 @@  discard block
 block discarded – undo
214 210
 			$stack->push($this);
215 211
 			parent::preRenderRecursive();
216 212
 			$stack->pop();
217
-		}
218
-		else
213
+		} else
219 214
 			parent::preRenderRecursive();
220 215
 	}
221 216
 
@@ -496,8 +491,7 @@  discard block
 block discarded – undo
496 491
 			$content=$textwriter->flush();
497 492
 			$data=array($content,$this->_state,$this->_actions,time());
498 493
 			$this->_cache->set($this->getCacheKey(),$data,$this->getDuration(),$this->getCacheDependency());
499
-		}
500
-		else
494
+		} else
501 495
 			parent::render($writer);
502 496
 	}
503 497
 }
504 498
\ No newline at end of file
Please login to merge, or discard this patch.