Passed
Push — php-cs-fixer ( b9836a...b7e6c1 )
by Fabio
30:46 queued 14:47
created
framework/Web/UI/THtmlWriter.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -100,8 +100,9 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function addAttributes($attrs)
102 102
 	{
103
-		foreach($attrs as $name => $value)
104
-			$this->_attributes[THttpUtility::htmlStrip($name)] = THttpUtility::htmlEncode($value);
103
+		foreach($attrs as $name => $value) {
104
+					$this->_attributes[THttpUtility::htmlStrip($name)] = THttpUtility::htmlEncode($value);
105
+		}
105 106
 	}
106 107
 
107 108
 	/**
@@ -129,8 +130,9 @@  discard block
 block discarded – undo
129 130
 	 */
130 131
 	public function addStyleAttributes($attrs)
131 132
 	{
132
-		foreach($attrs as $name => $value)
133
-			$this->_styles[THttpUtility::htmlStrip($name)] = THttpUtility::htmlEncode($value);
133
+		foreach($attrs as $name => $value) {
134
+					$this->_styles[THttpUtility::htmlStrip($name)] = THttpUtility::htmlEncode($value);
135
+		}
134 136
 	}
135 137
 
136 138
 	/**
@@ -195,21 +197,22 @@  discard block
 block discarded – undo
195 197
 	public function renderBeginTag($tagName)
196 198
 	{
197 199
 		$str = '<' . $tagName;
198
-		foreach($this->_attributes as $name => $value)
199
-			$str .= ' ' . $name . '="' . $value . '"';
200
+		foreach($this->_attributes as $name => $value) {
201
+					$str .= ' ' . $name . '="' . $value . '"';
202
+		}
200 203
 		if(!empty($this->_styles))
201 204
 		{
202 205
 			$str .= ' style="';
203
-			foreach($this->_styles as $name => $value)
204
-				$str .= $name . ':' . $value . ';';
206
+			foreach($this->_styles as $name => $value) {
207
+							$str .= $name . ':' . $value . ';';
208
+			}
205 209
 			$str .= '"';
206 210
 		}
207 211
 		if(isset(self::$_simpleTags[$tagName]))
208 212
 		{
209 213
 			$str .= ' />';
210 214
 			$this->_openTags[] = '';
211
-		}
212
-		else
215
+		} else
213 216
 		{
214 217
 			$str .= '>';
215 218
 			$this->_openTags[] = $tagName;
Please login to merge, or discard this patch.
framework/Web/UI/TControl.php 2 patches
Braces   +38 added lines, -40 removed lines patch added patch discarded remove patch
@@ -406,11 +406,9 @@  discard block
 block discarded – undo
406 406
 					return $this->_id;
407 407
 				else
408 408
 					return ($this->_uid = $prefix . self::ID_SEPARATOR . $this->_id);
409
-			}
410
-			else	// no naming container
409
+			} else	// no naming container
411 410
 				return $this->_id;
412
-		}
413
-		else
411
+		} else
414 412
 			return $this->_uid;
415 413
 	}
416 414
 
@@ -560,12 +558,12 @@  discard block
 block discarded – undo
560 558
 	{
561 559
 		if($checkParents)
562 560
 		{
563
-			for($control = $this;$control;$control = $control->_parent)
564
-				if(!$control->getVisible(false))
561
+			for($control = $this;$control;$control = $control->_parent) {
562
+							if(!$control->getVisible(false))
565 563
 					return false;
564
+			}
566 565
 			return true;
567
-		}
568
-		else
566
+		} else
569 567
 			return $this->getViewState('Visible', true);
570 568
 	}
571 569
 
@@ -591,12 +589,12 @@  discard block
 block discarded – undo
591 589
 	{
592 590
 		if($checkParents)
593 591
 		{
594
-			for($control = $this;$control;$control = $control->_parent)
595
-				if(!$control->getViewState('Enabled', true))
592
+			for($control = $this;$control;$control = $control->_parent) {
593
+							if(!$control->getViewState('Enabled', true))
596 594
 					return false;
595
+			}
597 596
 			return true;
598
-		}
599
-		else
597
+		} else
600 598
 			return $this->getViewState('Enabled', true);
601 599
 	}
602 600
 
@@ -689,12 +687,12 @@  discard block
 block discarded – undo
689 687
 	{
690 688
 		if($checkParents)
691 689
 		{
692
-			for($control = $this;$control !== null;$control = $control->getParent())
693
-				if($control->_flags & self::IS_DISABLE_VIEWSTATE)
690
+			for($control = $this;$control !== null;$control = $control->getParent()) {
691
+							if($control->_flags & self::IS_DISABLE_VIEWSTATE)
694 692
 					return false;
693
+			}
695 694
 			return true;
696
-		}
697
-		else
695
+		} else
698 696
 			return !($this->_flags & self::IS_DISABLE_VIEWSTATE);
699 697
 	}
700 698
 
@@ -779,8 +777,7 @@  discard block
 block discarded – undo
779 777
 			if(is_object($this->_tempState[$key]) && $this->_trackViewState)
780 778
 				$this->_viewState[$key] = $this->_tempState[$key];
781 779
 			return $this->_tempState[$key];
782
-		}
783
-		else
780
+		} else
784 781
 			return $defaultValue;
785 782
 	}
786 783
 
@@ -800,8 +797,7 @@  discard block
 block discarded – undo
800 797
 		{
801 798
 			unset($this->_tempState[$key]);
802 799
 			$this->_viewState[$key] = $value;
803
-		}
804
-		else
800
+		} else
805 801
 		{
806 802
 			unset($this->_viewState[$key]);
807 803
 			if($value === $defaultValue)
@@ -874,8 +870,9 @@  discard block
 block discarded – undo
874 870
 		{
875 871
 			if(($context = $this->getTemplateControl()) === null)
876 872
 				$context = $this;
877
-			foreach($this->_rf[self::RF_DATA_BINDINGS] as $property => $expression)
878
-				$this->setSubProperty($property, $context->evaluateExpression($expression));
873
+			foreach($this->_rf[self::RF_DATA_BINDINGS] as $property => $expression) {
874
+							$this->setSubProperty($property, $context->evaluateExpression($expression));
875
+			}
879 876
 		}
880 877
 	}
881 878
 
@@ -888,8 +885,9 @@  discard block
 block discarded – undo
888 885
 		{
889 886
 			if(($context = $this->getTemplateControl()) === null)
890 887
 				$context = $this;
891
-			foreach($this->_rf[self::RF_AUTO_BINDINGS] as $property => $expression)
892
-				$this->setSubProperty($property, $context->evaluateExpression($expression));
888
+			foreach($this->_rf[self::RF_AUTO_BINDINGS] as $property => $expression) {
889
+							$this->setSubProperty($property, $context->evaluateExpression($expression));
890
+			}
893 891
 		}
894 892
 	}
895 893
 
@@ -901,9 +899,10 @@  discard block
 block discarded – undo
901 899
 		Prado::trace("dataBindChildren()", 'Prado\Web\UI\TControl');
902 900
 		if(isset($this->_rf[self::RF_CONTROLS]))
903 901
 		{
904
-			foreach($this->_rf[self::RF_CONTROLS] as $control)
905
-				if($control instanceof IBindable)
902
+			foreach($this->_rf[self::RF_CONTROLS] as $control) {
903
+							if($control instanceof IBindable)
906 904
 					$control->dataBind();
905
+			}
907 906
 		}
908 907
 	}
909 908
 
@@ -950,8 +949,7 @@  discard block
 block discarded – undo
950 949
 					$this->createChildControls();
951 950
 				$this->_flags &= ~self::IS_CREATING_CHILD;
952 951
 				$this->_flags |= self::IS_CHILD_CREATED;
953
-			}
954
-			catch(Exception $e)
952
+			} catch(Exception $e)
955 953
 			{
956 954
 				$this->_flags &= ~self::IS_CREATING_CHILD;
957 955
 				$this->_flags |= self::IS_CHILD_CREATED;
@@ -1190,8 +1188,9 @@  discard block
 block discarded – undo
1190 1188
 	final protected function isDescendentOf($ancestor)
1191 1189
 	{
1192 1190
 		$control = $this;
1193
-		while($control !== $ancestor && $control->_parent)
1194
-			$control = $control->_parent;
1191
+		while($control !== $ancestor && $control->_parent) {
1192
+					$control = $control->_parent;
1193
+		}
1195 1194
 		return $control === $ancestor;
1196 1195
 	}
1197 1196
 
@@ -1227,8 +1226,7 @@  discard block
 block discarded – undo
1227 1226
 				{
1228 1227
 					$state = $this->_rf[self::RF_CHILD_STATE][$control->_id];
1229 1228
 					unset($this->_rf[self::RF_CHILD_STATE][$control->_id]);
1230
-				}
1231
-				else
1229
+				} else
1232 1230
 					$state = null;
1233 1231
 				$control->loadStateRecursive($state, !($this->_flags & self::IS_DISABLE_VIEWSTATE));
1234 1232
 				if($this->_stage >= self::CS_LOADED)
@@ -1367,9 +1365,10 @@  discard block
 block discarded – undo
1367 1365
 			$this->_id = '';
1368 1366
 		if($this->getHasControls())
1369 1367
 		{
1370
-			foreach($this->_rf[self::RF_CONTROLS] as $control)
1371
-				if($control instanceof TControl)
1368
+			foreach($this->_rf[self::RF_CONTROLS] as $control) {
1369
+							if($control instanceof TControl)
1372 1370
 					$control->unloadRecursive();
1371
+			}
1373 1372
 		}
1374 1373
 		if(isset($this->_rf[self::RF_ADAPTER]))
1375 1374
 			$this->_rf[self::RF_ADAPTER]->onUnload(null);
@@ -1633,8 +1632,7 @@  discard block
 block discarded – undo
1633 1632
 			{
1634 1633
 				$this->_rf[self::RF_CONTROLSTATE] = &$state[1];
1635 1634
 				unset($state[1]);
1636
-			}
1637
-			else
1635
+			} else
1638 1636
 				unset($this->_rf[self::RF_CONTROLSTATE]);
1639 1637
 			if($needViewState)
1640 1638
 			{
@@ -1711,8 +1709,7 @@  discard block
 block discarded – undo
1711 1709
 		{
1712 1710
 			$page->applyControlStyleSheet($this);
1713 1711
 			$this->_flags |= self::IS_STYLESHEET_APPLIED;
1714
-		}
1715
-		elseif($this->_flags & self::IS_STYLESHEET_APPLIED)
1712
+		} elseif($this->_flags & self::IS_STYLESHEET_APPLIED)
1716 1713
 			throw new TInvalidOperationException('control_stylesheet_applied', get_class($this));
1717 1714
 	}
1718 1715
 
@@ -1725,9 +1722,10 @@  discard block
 block discarded – undo
1725 1722
 	{
1726 1723
 		if($recursive && $this->_uid !== null && isset($this->_rf[self::RF_CONTROLS]))
1727 1724
 		{
1728
-			foreach($this->_rf[self::RF_CONTROLS] as $control)
1729
-				if($control instanceof TControl)
1725
+			foreach($this->_rf[self::RF_CONTROLS] as $control) {
1726
+							if($control instanceof TControl)
1730 1727
 					$control->clearCachedUniqueID($recursive);
1728
+			}
1731 1729
 		}
1732 1730
 		$this->_uid = null;
1733 1731
 	}
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -114,17 +114,17 @@  discard block
 block discarded – undo
114 114
 	 * Indexes for the rare fields.
115 115
 	 * In order to save memory, rare fields will only be created if they are needed.
116 116
 	 */
117
-	const RF_CONTROLS = 0;			// child controls
118
-	const RF_CHILD_STATE = 1;			// child state field
119
-	const RF_NAMED_CONTROLS = 2;		// list of controls whose namingcontainer is this control
120
-	const RF_NAMED_CONTROLS_ID = 3;	// counter for automatic id
121
-	const RF_SKIN_ID = 4;				// skin ID
122
-	const RF_DATA_BINDINGS = 5;		// data bindings
123
-	const RF_EVENTS = 6;				// event handlers
124
-	const RF_CONTROLSTATE = 7;		// controlstate
125
-	const RF_NAMED_OBJECTS = 8;		// controls declared with ID on template
126
-	const RF_ADAPTER = 9;				// adapter
127
-	const RF_AUTO_BINDINGS = 10;		// auto data bindings
117
+	const RF_CONTROLS = 0; // child controls
118
+	const RF_CHILD_STATE = 1; // child state field
119
+	const RF_NAMED_CONTROLS = 2; // list of controls whose namingcontainer is this control
120
+	const RF_NAMED_CONTROLS_ID = 3; // counter for automatic id
121
+	const RF_SKIN_ID = 4; // skin ID
122
+	const RF_DATA_BINDINGS = 5; // data bindings
123
+	const RF_EVENTS = 6; // event handlers
124
+	const RF_CONTROLSTATE = 7; // controlstate
125
+	const RF_NAMED_OBJECTS = 8; // controls declared with ID on template
126
+	const RF_ADAPTER = 9; // adapter
127
+	const RF_AUTO_BINDINGS = 10; // auto data bindings
128 128
 
129 129
 	/**
130 130
 	 * @var string control ID
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 */
238 238
 	public function getAdapter()
239 239
 	{
240
-		return isset($this->_rf[self::RF_ADAPTER])?$this->_rf[self::RF_ADAPTER]:null;
240
+		return isset($this->_rf[self::RF_ADAPTER]) ? $this->_rf[self::RF_ADAPTER] : null;
241 241
 	}
242 242
 
243 243
 	/**
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 	{
398 398
 		if($this->_uid === '' || $this->_uid === null)	// need to build the UniqueID
399 399
 		{
400
-			$this->_uid = '';  // set to not-null, so that clearCachedUniqueID() may take action
400
+			$this->_uid = ''; // set to not-null, so that clearCachedUniqueID() may take action
401 401
 			if($namingContainer = $this->getNamingContainer())
402 402
 			{
403 403
 				if($this->getPage() === $namingContainer)
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 	 */
450 450
 	public function getSkinID()
451 451
 	{
452
-		return isset($this->_rf[self::RF_SKIN_ID])?$this->_rf[self::RF_SKIN_ID]:'';
452
+		return isset($this->_rf[self::RF_SKIN_ID]) ? $this->_rf[self::RF_SKIN_ID] : '';
453 453
 	}
454 454
 
455 455
 	/**
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 		if($this->_flags & self::IS_DISABLE_THEMING)
483 483
 			return false;
484 484
 		else
485
-			return $this->_parent?$this->_parent->getEnableTheming():true;
485
+			return $this->_parent ? $this->_parent->getEnableTheming() : true;
486 486
 	}
487 487
 
488 488
 	/**
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 	 */
547 547
 	protected function createControlCollection()
548 548
 	{
549
-		return $this->getAllowChildControls()?new TControlCollection($this):new TEmptyControlCollection($this);
549
+		return $this->getAllowChildControls() ? new TControlCollection($this) : new TEmptyControlCollection($this);
550 550
 	}
551 551
 
552 552
 	/**
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
 	{
561 561
 		if($checkParents)
562 562
 		{
563
-			for($control = $this;$control;$control = $control->_parent)
563
+			for($control = $this; $control; $control = $control->_parent)
564 564
 				if(!$control->getVisible(false))
565 565
 					return false;
566 566
 			return true;
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 	{
592 592
 		if($checkParents)
593 593
 		{
594
-			for($control = $this;$control;$control = $control->_parent)
594
+			for($control = $this; $control; $control = $control->_parent)
595 595
 				if(!$control->getViewState('Enabled', true))
596 596
 					return false;
597 597
 			return true;
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
 	{
690 690
 		if($checkParents)
691 691
 		{
692
-			for($control = $this;$control !== null;$control = $control->getParent())
692
+			for($control = $this; $control !== null; $control = $control->getParent())
693 693
 				if($control->_flags & self::IS_DISABLE_VIEWSTATE)
694 694
 					return false;
695 695
 			return true;
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 	 */
721 721
 	protected function getControlState($key, $defaultValue = null)
722 722
 	{
723
-		return isset($this->_rf[self::RF_CONTROLSTATE][$key])?$this->_rf[self::RF_CONTROLSTATE][$key]:$defaultValue;
723
+		return isset($this->_rf[self::RF_CONTROLSTATE][$key]) ? $this->_rf[self::RF_CONTROLSTATE][$key] : $defaultValue;
724 724
 	}
725 725
 
726 726
 	/**
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
 	public function getViewState($key, $defaultValue = null)
774 774
 	{
775 775
 		if(isset($this->_viewState[$key]))
776
-			return $this->_viewState[$key] !== null?$this->_viewState[$key]:$defaultValue;
776
+			return $this->_viewState[$key] !== null ? $this->_viewState[$key] : $defaultValue;
777 777
 		elseif(isset($this->_tempState[$key]))
778 778
 		{
779 779
 			if(is_object($this->_tempState[$key]) && $this->_trackViewState)
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
 				$this->_flags &= ~self::IS_CREATING_CHILD;
952 952
 				$this->_flags |= self::IS_CHILD_CREATED;
953 953
 			}
954
-			catch(Exception $e)
954
+			catch (Exception $e)
955 955
 			{
956 956
 				$this->_flags &= ~self::IS_CREATING_CHILD;
957 957
 				$this->_flags |= self::IS_CHILD_CREATED;
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
 	public function findControl($id)
985 985
 	{
986 986
 		$id = strtr($id, '.', self::ID_SEPARATOR);
987
-		$container = ($this instanceof INamingContainer)?$this:$this->getNamingContainer();
987
+		$container = ($this instanceof INamingContainer) ? $this : $this->getNamingContainer();
988 988
 		if(!$container || !$container->getHasControls())
989 989
 			return null;
990 990
 		if(!isset($container->_rf[self::RF_NAMED_CONTROLS]))
@@ -993,7 +993,7 @@  discard block
 block discarded – undo
993 993
 			$container->fillNameTable($container, $container->_rf[self::RF_CONTROLS]);
994 994
 		}
995 995
 		if(($pos = strpos($id, self::ID_SEPARATOR)) === false)
996
-			return isset($container->_rf[self::RF_NAMED_CONTROLS][$id])?$container->_rf[self::RF_NAMED_CONTROLS][$id]:null;
996
+			return isset($container->_rf[self::RF_NAMED_CONTROLS][$id]) ? $container->_rf[self::RF_NAMED_CONTROLS][$id] : null;
997 997
 		else
998 998
 		{
999 999
 			$cid = substr($id, 0, $pos);
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 	 */
1148 1148
 	public function getRegisteredObject($name)
1149 1149
 	{
1150
-		return isset($this->_rf[self::RF_NAMED_OBJECTS][$name])?$this->_rf[self::RF_NAMED_OBJECTS][$name]:null;
1150
+		return isset($this->_rf[self::RF_NAMED_OBJECTS][$name]) ? $this->_rf[self::RF_NAMED_OBJECTS][$name] : null;
1151 1151
 	}
1152 1152
 
1153 1153
 	/**
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
 			$control->_parent->getControls()->remove($control);
1208 1208
 		$control->_parent = $this;
1209 1209
 		$control->_page = $this->getPage();
1210
-		$namingContainer = ($this instanceof INamingContainer)?$this:$this->_namingContainer;
1210
+		$namingContainer = ($this instanceof INamingContainer) ? $this : $this->_namingContainer;
1211 1211
 		if($namingContainer)
1212 1212
 		{
1213 1213
 			$control->_namingContainer = $namingContainer;
@@ -1486,7 +1486,7 @@  discard block
 block discarded – undo
1486 1486
 	 */
1487 1487
 	public function broadcastEvent($name, $sender, $param)
1488 1488
 	{
1489
-		$rootControl = (($page = $this->getPage()) === null)?$this:$page;
1489
+		$rootControl = (($page = $this->getPage()) === null) ? $this : $page;
1490 1490
 		$rootControl->broadcastEventInternal($name, $sender, new TBroadcastEventParameter($name, $param));
1491 1491
 	}
1492 1492
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRatingList.php 2 patches
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -268,8 +268,7 @@  discard block
 block discarded – undo
268 268
 			{
269 269
 				if($control->getVisible(true))
270 270
 					return $control->getClientID();
271
-			}
272
-			else
271
+			} else
273 272
 				return $id;
274 273
 		}
275 274
 		return '';
@@ -308,8 +307,9 @@  discard block
 block discarded – undo
308 307
 	{
309 308
 		$types = ['blank', 'selected', 'half', 'combined'];
310 309
 		$files = [];
311
-		foreach($types as $type)
312
-			$files[$type] = $this->getAssetUrl("{$style}_{$type}{$fileExt}");
310
+		foreach($types as $type) {
311
+					$files[$type] = $this->getAssetUrl("{$style}_{$type}{$fileExt}");
312
+		}
313 313
 		return $files;
314 314
 	}
315 315
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 	public function getRating()
108 108
 	{
109 109
 		$rating = $this->getViewState('Rating', null);
110
-		if ($rating === null)
110
+		if($rating === null)
111 111
 			return $this->getSelectedIndex() + 1;
112 112
 		else
113 113
 			return $rating;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBaseValidator.php 2 patches
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -190,9 +190,10 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	private function getClientControlClass($control)
192 192
 	{
193
-		foreach(self::$_clientClass as $type)
194
-			if($control instanceof $type)
193
+		foreach(self::$_clientClass as $type) {
194
+					if($control instanceof $type)
195 195
 				return $type;
196
+		}
196 197
 		$reflectionClass = new \ReflectionClass($control);
197 198
 		return $reflectionClass->getShortName();
198 199
 	}
@@ -523,16 +524,14 @@  discard block
 block discarded – undo
523 524
 				{
524 525
 					$this->setIsValid(true);
525 526
 					$this->onValidationSuccess();
526
-				}
527
-				else
527
+				} else
528 528
 				{
529 529
 					if($target)
530 530
 						$target->setIsValid(false);
531 531
 					$this->setIsValid(false);
532 532
 					$this->onValidationError();
533 533
 				}
534
-			}
535
-			else
534
+			} else
536 535
 			{
537 536
 				$this->evaluateIsValid();
538 537
 				$this->setIsValid(true);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	public function renderClientControlScript($writer)
238 238
 	{
239 239
 		$scripts = $this->getPage()->getClientScript();
240
-		if ($this->getEnableClientScript())
240
+		if($this->getEnableClientScript())
241 241
 			$scripts->registerPradoScript('validator');
242 242
 		$formID = $this->getPage()->getForm()->getClientID();
243 243
 		$scriptKey = "TBaseValidator:$formID";
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * Override parent implementation to update the control CSS Class before
256 256
 	 * the validated control is rendered
257 257
 	 */
258
-	public function onPreRender ($param)
258
+	public function onPreRender($param)
259 259
 	{
260 260
 		parent::onPreRender($param);
261 261
 		$this->updateControlCssClass();
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 				{
279 279
 					$class .= ' ' . $cssClass;
280 280
 					$control->setCssClass($class);
281
-				} elseif ($control->getIsValid())
281
+				} elseif($control->getIsValid())
282 282
 					$control->setCssClass($class);
283 283
 			}
284 284
 		}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function getImageUrl()
92 92
 	{
93
-		return $this->_imageUrl === null?'':$this->_imageUrl;
93
+		return $this->_imageUrl === null ? '' : $this->_imageUrl;
94 94
 	}
95 95
 
96 96
 	/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function getButtonText()
108 108
 	{
109
-		return $this->_buttonText === null?'':$this->_buttonText;
109
+		return $this->_buttonText === null ? '' : $this->_buttonText;
110 110
 	}
111 111
 
112 112
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function getButtonType()
124 124
 	{
125
-		return $this->_buttonType === null? TWizardNavigationButtonType::Button :$this->_buttonType;
125
+		return $this->_buttonType === null ? TWizardNavigationButtonType::Button : $this->_buttonType;
126 126
 	}
127 127
 
128 128
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TInlineFrame.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -247,16 +247,16 @@
 block discarded – undo
247 247
 		elseif($scrollBars === TInlineFrameScrollBars::Both)
248 248
 			$writer->addAttribute('scrolling', 'yes');
249 249
 
250
-		if (!$this->getShowBorder())
250
+		if(!$this->getShowBorder())
251 251
 			$writer->addAttribute('frameborder', '0');
252 252
 
253 253
 		if(($longdesc = $this->getDescriptionUrl()) !== '')
254 254
 			$writer->addAttribute('longdesc', $longdesc);
255 255
 		
256
-		if (($width = $this->getWidth()) !== -1)
256
+		if(($width = $this->getWidth()) !== -1)
257 257
 		  $writer->addAttribute('width', $width);
258 258
 		
259
-		if (($height = $this->getHeight()) !== -1)
259
+		if(($height = $this->getHeight()) !== -1)
260 260
 		  $writer->addAttribute('height', $height);
261 261
 
262 262
 		if(($marginheight = $this->getMarginHeight()) !== -1)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TFileUpload.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function getFileName($index = 0)
148 148
 	{
149
-	  return isset($this->_files[$index])?$this->_files[$index]->getFileName():'';
149
+	  return isset($this->_files[$index]) ? $this->_files[$index]->getFileName() : '';
150 150
 	}
151 151
 
152 152
 	/**
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	public function getFileSize($index = 0)
158 158
 	{
159
-	  return isset($this->_files[$index])?$this->_files[$index]->getFileSize():0;
159
+	  return isset($this->_files[$index]) ? $this->_files[$index]->getFileSize() : 0;
160 160
 	}
161 161
 
162 162
 	/**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	public function getFileType($index = 0)
169 169
 	{
170
-	  return isset($this->_files[$index])?$this->_files[$index]->getFileType():'';
170
+	  return isset($this->_files[$index]) ? $this->_files[$index]->getFileType() : '';
171 171
 	}
172 172
 
173 173
 	/**
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	public function getLocalName($index = 0)
180 180
 	{
181
-	  return isset($this->_files[$index])?$this->_files[$index]->getLocalName():'';
181
+	  return isset($this->_files[$index]) ? $this->_files[$index]->getLocalName() : '';
182 182
 	}
183 183
 
184 184
 	/**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	public function getErrorCode($index = 0)
192 192
 	{
193
-		return isset($this->_files[$index])?$this->_files[$index]->getErrorCode():UPLOAD_ERR_NO_FILE;
193
+		return isset($this->_files[$index]) ? $this->_files[$index]->getErrorCode() : UPLOAD_ERR_NO_FILE;
194 194
 	}
195 195
 
196 196
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function getHasFile($index = 0)
202 202
 	{
203
-	  return isset($this->_files[$index])?$this->_files[$index]->getHasFile():false;
203
+	  return isset($this->_files[$index]) ? $this->_files[$index]->getHasFile() : false;
204 204
 	}
205 205
 
206 206
 	/**
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	 */
227 227
 	public function saveAs($fileName, $deleteTempFile = true, $index = 0)
228 228
 	{
229
-	  return isset($this->_files[$index])?$this->_files[$index]->saveAs($fileName, $deleteTempFile):false;
229
+	  return isset($this->_files[$index]) ? $this->_files[$index]->saveAs($fileName, $deleteTempFile) : false;
230 230
 	}
231 231
 
232 232
 	/**
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	 */
293 293
 	public function getValidationPropertyValue()
294 294
 	{
295
-		return implode(',', array_map(function($file){return $file->getFileName();}, $this->_files));
295
+		return implode(',', array_map(function($file) {return $file->getFileName(); }, $this->_files));
296 296
 	}
297 297
 
298 298
 	/**
Please login to merge, or discard this patch.
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -208,9 +208,10 @@  discard block
 block discarded – undo
208 208
 	 * @return boolean whether all files are uploaded successfully
209 209
 	 */
210 210
 	public function getHasAllFiles() {
211
-	  foreach($this->_files as $file)
212
-		if(!$file->getHasFile())
211
+	  foreach($this->_files as $file) {
212
+	  		if(!$file->getHasFile())
213 213
 		  return false;
214
+	  }
214 215
 	  return true;
215 216
 	}
216 217
 
@@ -242,14 +243,13 @@  discard block
 block discarded – undo
242 243
 		{
243 244
 		  if($this->getMultiple() || is_array($_FILES[$key]['name']))
244 245
 		  {
245
-		foreach($_FILES[$key]['name'] as $index => $name)
246
-		  $this->_files[$index] = new TFileUploadItem($name, $_FILES[$key]['size'][$index], $_FILES[$key]['type'][$index], $_FILES[$key]['error'][$index], $_FILES[$key]['tmp_name'][$index]);
247
-		  }
248
-		  else
246
+		foreach($_FILES[$key]['name'] as $index => $name) {
247
+				  $this->_files[$index] = new TFileUploadItem($name, $_FILES[$key]['size'][$index], $_FILES[$key]['type'][$index], $_FILES[$key]['error'][$index], $_FILES[$key]['tmp_name'][$index]);
248
+		}
249
+		  } else
249 250
 			$this->_files[0] = new TFileUploadItem($_FILES[$key]['name'], $_FILES[$key]['size'], $_FILES[$key]['type'], $_FILES[$key]['error'], $_FILES[$key]['tmp_name']);
250 251
 			return $this->_dataChanged = true;
251
-		}
252
-		else
252
+		} else
253 253
 			return false;
254 254
 	}
255 255
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataGridPagerStyle.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -44,23 +44,23 @@  discard block
 block discarded – undo
44 44
 	protected function _getZappableSleepProps(&$exprops)
45 45
 	{
46 46
 		parent::_getZappableSleepProps($exprops);
47
-		if ($this->_mode === null)
47
+		if($this->_mode === null)
48 48
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_mode";
49
-		if ($this->_nextText === null)
49
+		if($this->_nextText === null)
50 50
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_nextText";
51
-		if ($this->_prevText === null)
51
+		if($this->_prevText === null)
52 52
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_prevText";
53
-		if ($this->_firstText === null)
53
+		if($this->_firstText === null)
54 54
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_firstText";
55
-		if ($this->_lastText === null)
55
+		if($this->_lastText === null)
56 56
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_lastText";
57
-		if ($this->_buttonCount === null)
57
+		if($this->_buttonCount === null)
58 58
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_buttonCount";
59
-		if ($this->_position === null)
59
+		if($this->_position === null)
60 60
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_position";
61
-		if ($this->_visible === null)
61
+		if($this->_visible === null)
62 62
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_visible";
63
-		if ($this->_buttonType === null)
63
+		if($this->_buttonType === null)
64 64
 			$exprops[] = "\0Prado\Web\UI\WebControls\TDataGridPagerStyle\0_buttonType";
65 65
 	}
66 66
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public function getMode()
71 71
 	{
72
-		return $this->_mode === null?TDataGridPagerMode::NextPrev : $this->_mode;
72
+		return $this->_mode === null ?TDataGridPagerMode::NextPrev : $this->_mode;
73 73
 	}
74 74
 
75 75
 	/**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function getButtonType()
87 87
 	{
88
-		return $this->_buttonType === null?TDataGridPagerButtonType::LinkButton:$this->_buttonType;
88
+		return $this->_buttonType === null ?TDataGridPagerButtonType::LinkButton : $this->_buttonType;
89 89
 	}
90 90
 
91 91
 	/**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function getNextPageText()
103 103
 	{
104
-		return $this->_nextText === null?'>':$this->_nextText;
104
+		return $this->_nextText === null ? '>' : $this->_nextText;
105 105
 	}
106 106
 
107 107
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	public function getPrevPageText()
119 119
 	{
120
-		return $this->_prevText === null?'<':$this->_prevText;
120
+		return $this->_prevText === null ? '<' : $this->_prevText;
121 121
 	}
122 122
 
123 123
 	/**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	public function getFirstPageText()
135 135
 	{
136
-		return $this->_firstText === null?'<<':$this->_firstText;
136
+		return $this->_firstText === null ? '<<' : $this->_firstText;
137 137
 	}
138 138
 
139 139
 	/**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public function getLastPageText()
151 151
 	{
152
-		return $this->_lastText === null?'>>':$this->_lastText;
152
+		return $this->_lastText === null ? '>>' : $this->_lastText;
153 153
 	}
154 154
 
155 155
 	/**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	public function getPageButtonCount()
167 167
 	{
168
-		return $this->_buttonCount === null?10:$this->_buttonCount;
168
+		return $this->_buttonCount === null ? 10 : $this->_buttonCount;
169 169
 	}
170 170
 
171 171
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function getPosition()
186 186
 	{
187
-		return $this->_position === null?TDataGridPagerPosition::Bottom:$this->_position;
187
+		return $this->_position === null ?TDataGridPagerPosition::Bottom : $this->_position;
188 188
 	}
189 189
 
190 190
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function getVisible()
202 202
 	{
203
-		return $this->_visible === null?true:$this->_visible;
203
+		return $this->_visible === null ?true:$this->_visible;
204 204
 	}
205 205
 
206 206
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTableItemStyle.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 	protected function _getZappableSleepProps(&$exprops)
46 46
 	{
47 47
 		parent::_getZappableSleepProps($exprops);
48
-		if ($this->_horizontalAlign === null)
48
+		if($this->_horizontalAlign === null)
49 49
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableItemStyle\0_horizontalAlign";
50
-		if ($this->_verticalAlign === null)
50
+		if($this->_verticalAlign === null)
51 51
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableItemStyle\0_verticalAlign";
52
-		if ($this->_wrap === null)
52
+		if($this->_wrap === null)
53 53
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableItemStyle\0_wrap";
54 54
 	}
55 55
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public function getHorizontalAlign()
132 132
 	{
133
-		return $this->_horizontalAlign === null?THorizontalAlign::NotSet:$this->_horizontalAlign;
133
+		return $this->_horizontalAlign === null ?THorizontalAlign::NotSet : $this->_horizontalAlign;
134 134
 	}
135 135
 
136 136
 	/**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	public function getVerticalAlign()
149 149
 	{
150
-		return $this->_verticalAlign === null?TVerticalAlign::NotSet:$this->_verticalAlign;
150
+		return $this->_verticalAlign === null ?TVerticalAlign::NotSet : $this->_verticalAlign;
151 151
 	}
152 152
 
153 153
 	/**
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 */
165 165
 	public function getWrap()
166 166
 	{
167
-		return $this->_wrap === null?true:$this->_wrap;
167
+		return $this->_wrap === null ?true:$this->_wrap;
168 168
 	}
169 169
 
170 170
 	/**
Please login to merge, or discard this patch.