Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
framework/Web/UI/WebControls/TMultiView.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@  discard block
 block discarded – undo
105 105
 			$this->_cachedActiveViewIndex = -1;
106 106
 			if($index >= 0)
107 107
 				$this->activateView($views->itemAt($index), true);
108
-		}
109
-		else
108
+		} else
110 109
 			throw new TInvalidDataValueException('multiview_activeviewindex_invalid', $index);
111 110
 	}
112 111
 
@@ -161,8 +160,7 @@  discard block
 block discarded – undo
161 160
 					$view->onActivate(null);
162 161
 					$this->onActiveViewChanged(null);
163 162
 				}
164
-			}
165
-			elseif($v->getActive())
163
+			} elseif($v->getActive())
166 164
 			{
167 165
 				$v->setActive(false);
168 166
 				if($triggerEvent)
@@ -240,8 +238,7 @@  discard block
 block discarded – undo
240 238
 					{
241 239
 						$this->setActiveView($view);
242 240
 						return true;
243
-					}
244
-					else
241
+					} else
245 242
 						throw new TInvalidDataValueException('multiview_viewid_invalid', $viewID);
246 243
 					break;
247 244
 				case self::CMD_SWITCHVIEWINDEX:
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TConditional.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
 		try
80 80
 		{
81 81
 			$result = $this->getTemplateControl()->evaluateExpression($this->_condition);
82
-		}
83
-		catch(\Exception $e)
82
+		} catch(\Exception $e)
84 83
 		{
85 84
 			throw new TInvalidDataValueException('conditional_condition_invalid', $this->_condition, $e->getMessage());
86 85
 		}
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
 		{
89 88
 			if($this->_trueTemplate)
90 89
 				$this->_trueTemplate->instantiateIn($this->getTemplateControl(), $this);
91
-		}
92
-		elseif($this->_falseTemplate)
90
+		} elseif($this->_falseTemplate)
93 91
 			$this->_falseTemplate->instantiateIn($this->getTemplateControl(), $this);
94 92
 		$this->_creatingChildren = false;
95 93
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLiteralColumn.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,8 +117,7 @@
 block discarded – undo
117 117
 					$text = THttpUtility::htmlEncode($text);
118 118
 				$cell->setText($text);
119 119
 			}
120
-		}
121
-		else
120
+		} else
122 121
 			parent::initializeCell($cell, $columnIndex, $itemType);
123 122
 	}
124 123
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TEmailAddressValidator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
 				{
70 70
 					$domain = substr($value, $pos + 1);
71 71
 					return $domain === ''?false:checkdnsrr($domain, 'MX');
72
-				}
73
-				else
72
+				} else
74 73
 					return false;
75 74
 			}
76 75
 		}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TSlider.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -301,8 +301,7 @@  discard block
 block discarded – undo
301 301
 		{
302 302
 			$this->setValue($value);
303 303
 			return $this->_dataChanged = true;
304
-		}
305
-		else
304
+		} else
306 305
 			return false;
307 306
 	}
308 307
 
@@ -474,8 +473,7 @@  discard block
 block discarded – undo
474 473
 				if ($value < $minValue) unset($values[$idx]);
475 474
 				if ($value > $maxValue) unset($values[$idx]);
476 475
 			}
477
-		}
478
-		else
476
+		} else
479 477
 		{
480 478
 			// Values are not provided, generate automatically using stepsize
481 479
 			$step = $this->getStepSize();
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRepeater.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -467,8 +467,7 @@  discard block
 block discarded – undo
467 467
 			$this->onItemCreated($param);
468 468
 			$this->getControls()->add($item);
469 469
 			return $item;
470
-		}
471
-		else
470
+		} else
472 471
 			return null;
473 472
 	}
474 473
 
@@ -492,8 +491,7 @@  discard block
 block discarded – undo
492 491
 			$item->dataBind();
493 492
 			$this->onItemDataBound($param);
494 493
 			return $item;
495
-		}
496
-		else
494
+		} else
497 495
 			return null;
498 496
 	}
499 497
 
@@ -543,15 +541,13 @@  discard block
 block discarded – undo
543 541
 				$item->setItemIndex($itemIndex);
544 542
 				$item->setItemType($itemType);
545 543
 			}
546
-		}
547
-		elseif($template !== null)
544
+		} elseif($template !== null)
548 545
 		{
549 546
 			$item = new TRepeaterItem;
550 547
 			$item->setItemIndex($itemIndex);
551 548
 			$item->setItemType($itemType);
552 549
 			$template->instantiateIn($item);
553
-		}
554
-		else
550
+		} else
555 551
 			$item = null;
556 552
 
557 553
 		return $item;
@@ -635,8 +631,7 @@  discard block
 block discarded – undo
635 631
 				$items->add($this->createItemInternal($i, $itemType, false, null));
636 632
 			}
637 633
 			$this->_footer = $this->createItemInternal(-1, TListItemType::Footer);
638
-		}
639
-		else
634
+		} else
640 635
 			$this->createEmptyContent();
641 636
 		$this->clearChildState();
642 637
 	}
@@ -697,8 +692,7 @@  discard block
 block discarded – undo
697 692
 		{
698 693
 			$this->onItemCommand($param);
699 694
 			return true;
700
-		}
701
-		else
695
+		} else
702 696
 			return false;
703 697
 	}
704 698
 
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
@@ -117,8 +117,7 @@  discard block
 block discarded – undo
117 117
 					$this->_cache = $this->getApplication()->getModule($this->_cacheModuleID);
118 118
 					if(!($this->_cache instanceof ICache))
119 119
 						throw new TConfigurationException('outputcache_cachemoduleid_invalid', $this->_cacheModuleID);
120
-				}
121
-				else
120
+				} else
122 121
 					$this->_cache = $this->getApplication()->getCache();
123 122
 				if($this->_cache !== null)
124 123
 				{
@@ -130,8 +129,7 @@  discard block
 block discarded – undo
130 129
 						$param->setCacheTime(isset($data[3])?$data[3]:0);
131 130
 						$this->onCheckDependency($param);
132 131
 						$this->_dataCached = $param->getIsValid();
133
-					}
134
-					else
132
+					} else
135 133
 						$this->_dataCached = false;
136 134
 					if($this->_dataCached)
137 135
 						list($this->_contents, $this->_state, $this->_actions, $this->_cacheTime) = $data;
@@ -155,8 +153,7 @@  discard block
 block discarded – undo
155 153
 			$stack->push($this);
156 154
 			parent::initRecursive($namingContainer);
157 155
 			$stack->pop();
158
-		}
159
-		else
156
+		} else
160 157
 			parent::initRecursive($namingContainer);
161 158
 	}
162 159
 
@@ -176,8 +173,7 @@  discard block
 block discarded – undo
176 173
 			$stack->push($this);
177 174
 			parent::loadRecursive();
178 175
 			$stack->pop();
179
-		}
180
-		else
176
+		} else
181 177
 		{
182 178
 			if($this->_dataCached)
183 179
 				$this->performActions();
@@ -215,8 +211,7 @@  discard block
 block discarded – undo
215 211
 			$stack->push($this);
216 212
 			parent::preRenderRecursive();
217 213
 			$stack->pop();
218
-		}
219
-		else
214
+		} else
220 215
 			parent::preRenderRecursive();
221 216
 	}
222 217
 
@@ -497,8 +492,7 @@  discard block
 block discarded – undo
497 492
 			$content = $textwriter->flush();
498 493
 			$data = [$content,$this->_state,$this->_actions,time()];
499 494
 			$this->_cache->set($this->getCacheKey(), $data, $this->getDuration(), $this->getCacheDependency());
500
-		}
501
-		else
495
+		} else
502 496
 			parent::render($writer);
503 497
 	}
504 498
 }
505 499
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataGridColumn.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -433,8 +433,7 @@  discard block
 block discarded – undo
433 433
 				}
434 434
 				$control->setData($text);
435 435
 			}
436
-		}
437
-		elseif($this->getAllowSorting())
436
+		} elseif($this->getAllowSorting())
438 437
 		{
439 438
 			$sortExpression = $this->getSortExpression();
440 439
 			if(($url = $this->getHeaderImageUrl()) !== '')
@@ -447,8 +446,7 @@  discard block
 block discarded – undo
447 446
 					$button->setAlternateText($text);
448 447
 				$button->setCausesValidation(false);
449 448
 				$cell->getControls()->add($button);
450
-			}
451
-			elseif($text !== '')
449
+			} elseif($text !== '')
452 450
 			{
453 451
 				$button = new TLinkButton;
454 452
 				$button->setText($text);
@@ -456,11 +454,9 @@  discard block
 block discarded – undo
456 454
 				$button->setCommandParameter($sortExpression);
457 455
 				$button->setCausesValidation(false);
458 456
 				$cell->getControls()->add($button);
459
-			}
460
-			else
457
+			} else
461 458
 				$cell->setText('&nbsp;');
462
-		}
463
-		else
459
+		} else
464 460
 		{
465 461
 			if(($url = $this->getHeaderImageUrl()) !== '')
466 462
 			{
@@ -469,8 +465,7 @@  discard block
 block discarded – undo
469 465
 				if($text !== '')
470 466
 					$image->setAlternateText($text);
471 467
 				$cell->getControls()->add($image);
472
-			}
473
-			elseif($text !== '')
468
+			} elseif($text !== '')
474 469
 				$cell->setText($text);
475 470
 			else
476 471
 				$cell->setText('&nbsp;');
@@ -504,8 +499,7 @@  discard block
 block discarded – undo
504 499
 				}
505 500
 				$control->setData($text);
506 501
 			}
507
-		}
508
-		elseif($text !== '')
502
+		} elseif($text !== '')
509 503
 			$cell->setText($text);
510 504
 		else
511 505
 			$cell->setText('&nbsp;');
@@ -535,13 +529,11 @@  discard block
 block discarded – undo
535 529
 				if(eval("\$result=$expression;") === false)
536 530
 					throw new Exception('');
537 531
 				return $result;
538
-			}
539
-			catch(Exception $e)
532
+			} catch(Exception $e)
540 533
 			{
541 534
 				throw new TInvalidDataValueException('datagridcolumn_expression_invalid', get_class($this), $expression, $e->getMessage());
542 535
 			}
543
-		}
544
-		else
536
+		} else
545 537
 			return sprintf($formatString, $value);
546 538
 	}
547 539
 }
548 540
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TButton.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,8 +115,7 @@  discard block
 block discarded – undo
115 115
 		{
116 116
 			if($this->getEnableClientScript() && $this->needPostBackScript())
117 117
 				$this->renderClientControlScript($writer);
118
-		}
119
-		elseif($this->getEnabled()) // in this case, parent will not render 'disabled'
118
+		} elseif($this->getEnabled()) // in this case, parent will not render 'disabled'
120 119
 			$writer->addAttribute('disabled', 'disabled');
121 120
 
122 121
 		parent::addAttributesToRender($writer);
@@ -150,8 +149,7 @@  discard block
 block discarded – undo
150 149
 		{
151 150
 			$group = $this->getValidationGroup();
152 151
 			return $this->getPage()->getValidators($group)->getCount() > 0;
153
-		}
154
-		else
152
+		} else
155 153
 			return false;
156 154
 	}
157 155
 
Please login to merge, or discard this patch.