Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
framework/Web/UI/WebControls/TMetaTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 			$writer->addAttribute('scheme', $this->_scheme);
164 164
 		if($this->_charset !== '')
165 165
 			$writer->addAttribute('charset', $this->_charset);
166
-		if ($this->_charset === '')
166
+		if($this->_charset === '')
167 167
 			$writer->addAttribute('content', $this->_content);
168 168
 		$writer->renderBeginTag('meta');
169 169
 		$writer->renderEndTag();
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataList.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	 */
199 199
 	public function getItemCount()
200 200
 	{
201
-		return $this->_items?$this->_items->getCount():0;
201
+		return $this->_items ? $this->_items->getCount() : 0;
202 202
 	}
203 203
 
204 204
 	/**
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 			{
691 691
 				$item = $items->itemAt($current);
692 692
 				if(($item instanceof IItemDataRenderer) && $item->getItemType() !== TListItemType::EditItem)
693
-					$item->setItemType($current % 2?TListItemType::AlternatingItem : TListItemType::Item);
693
+					$item->setItemType($current % 2 ?TListItemType::AlternatingItem : TListItemType::Item);
694 694
 			}
695 695
 			if($value >= 0 && $value < $itemCount)
696 696
 			{
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 			$items = $this->getItems();
756 756
 			$itemCount = $items->getCount();
757 757
 			if($current >= 0 && $current < $itemCount)
758
-				$items->itemAt($current)->setItemType($current % 2?TListItemType::AlternatingItem : TListItemType::Item);
758
+				$items->itemAt($current)->setItemType($current % 2 ?TListItemType::AlternatingItem : TListItemType::Item);
759 759
 			if($value >= 0 && $value < $itemCount)
760 760
 				$items->itemAt($value)->setItemType(TListItemType::EditItem);
761 761
 		}
@@ -1174,9 +1174,9 @@  discard block
 block discarded – undo
1174 1174
 	private function getAlternatingItemDisplay()
1175 1175
 	{
1176 1176
 		if(($classPath = $this->getAlternatingItemRenderer()) === '' && $this->_alternatingItemTemplate === null)
1177
-			return [$this->getItemRenderer(),$this->_itemTemplate];
1177
+			return [$this->getItemRenderer(), $this->_itemTemplate];
1178 1178
 		else
1179
-			return [$classPath,$this->_alternatingItemTemplate];
1179
+			return [$classPath, $this->_alternatingItemTemplate];
1180 1180
 	}
1181 1181
 
1182 1182
 	private function getSelectedItemDisplay($itemIndex)
@@ -1184,12 +1184,12 @@  discard block
 block discarded – undo
1184 1184
 		if(($classPath = $this->getSelectedItemRenderer()) === '' && $this->_selectedItemTemplate === null)
1185 1185
 		{
1186 1186
 			if($itemIndex % 2 === 0)
1187
-				return [$this->getItemRenderer(),$this->_itemTemplate];
1187
+				return [$this->getItemRenderer(), $this->_itemTemplate];
1188 1188
 			else
1189 1189
 				return $this->getAlternatingItemDisplay();
1190 1190
 		}
1191 1191
 		else
1192
-			return [$classPath,$this->_selectedItemTemplate];
1192
+			return [$classPath, $this->_selectedItemTemplate];
1193 1193
 	}
1194 1194
 
1195 1195
 	private function getEditItemDisplay($itemIndex)
@@ -1197,7 +1197,7 @@  discard block
 block discarded – undo
1197 1197
 		if(($classPath = $this->getEditItemRenderer()) === '' && $this->_editItemTemplate === null)
1198 1198
 			return $this->getSelectedItemDisplay($itemIndex);
1199 1199
 		else
1200
-			return [$classPath,$this->_editItemTemplate];
1200
+			return [$classPath, $this->_editItemTemplate];
1201 1201
 	}
1202 1202
 
1203 1203
 	/**
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
 		{
1346 1346
 			$controls = $this->getControls();
1347 1347
 			$count = $controls->getCount();
1348
-			for($i = $this->_header?2:1;$i < $count;$i += 2)
1348
+			for($i = $this->_header ? 2 : 1; $i < $count; $i += 2)
1349 1349
 			{
1350 1350
 				if(($separator = $controls->itemAt($i)) instanceof IStyleable)
1351 1351
 					$separator->getStyle()->mergeWith($separatorStyle);
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
 			$editIndex = $this->getEditItemIndex();
1403 1403
 			$hasSeparator = $this->_separatorTemplate !== null || $this->getSeparatorRenderer() !== '';
1404 1404
 			$this->_header = $this->createItemInternal(-1, TListItemType::Header);
1405
-			for($i = 0;$i < $itemCount;++$i)
1405
+			for($i = 0; $i < $itemCount; ++$i)
1406 1406
 			{
1407 1407
 				if($hasSeparator && $i > 0)
1408 1408
 					$this->createItemInternal($i - 1, TListItemType::Separator);
@@ -1411,7 +1411,7 @@  discard block
 block discarded – undo
1411 1411
 				elseif($i === $selectedIndex)
1412 1412
 					$itemType = TListItemType::SelectedItem;
1413 1413
 				else
1414
-					$itemType = $i % 2?TListItemType::AlternatingItem : TListItemType::Item;
1414
+					$itemType = $i % 2 ?TListItemType::AlternatingItem : TListItemType::Item;
1415 1415
 				$items->add($this->createItemInternal($i, $itemType));
1416 1416
 			}
1417 1417
 			$this->_footer = $this->createItemInternal(-1, TListItemType::Footer);
@@ -1453,7 +1453,7 @@  discard block
 block discarded – undo
1453 1453
 			elseif($itemIndex === $selectedIndex)
1454 1454
 				$itemType = TListItemType::SelectedItem;
1455 1455
 			else
1456
-				$itemType = $itemIndex % 2?TListItemType::AlternatingItem : TListItemType::Item;
1456
+				$itemType = $itemIndex % 2 ?TListItemType::AlternatingItem : TListItemType::Item;
1457 1457
 			$items->add($this->createItemWithDataInternal($itemIndex, $itemType, $dataItem));
1458 1458
 			$itemIndex++;
1459 1459
 		}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TStyle.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
 	protected function _getZappableSleepProps(&$exprops)
55 55
 	{
56 56
 		parent::_getZappableSleepProps($exprops);
57
-		if ($this->_fields === [])
57
+		if($this->_fields === [])
58 58
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_fields";
59 59
 		if($this->_font === null)
60 60
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_font";
61 61
 		if($this->_class === null)
62 62
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_class";
63
-		if ($this->_customStyle === null)
63
+		if($this->_customStyle === null)
64 64
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_customStyle";
65
-		if ($this->_displayStyle === 'Fixed')
65
+		if($this->_displayStyle === 'Fixed')
66 66
 			$exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_displayStyle";
67 67
 	}
68 68
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function getBackColor()
93 93
 	{
94
-		return isset($this->_fields['background-color'])?$this->_fields['background-color']:'';
94
+		return isset($this->_fields['background-color']) ? $this->_fields['background-color'] : '';
95 95
 	}
96 96
 
97 97
 	/**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 */
111 111
 	public function getBorderColor()
112 112
 	{
113
-		return isset($this->_fields['border-color'])?$this->_fields['border-color']:'';
113
+		return isset($this->_fields['border-color']) ? $this->_fields['border-color'] : '';
114 114
 	}
115 115
 
116 116
 	/**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function getBorderStyle()
131 131
 	{
132
-		return isset($this->_fields['border-style'])?$this->_fields['border-style']:'';
132
+		return isset($this->_fields['border-style']) ? $this->_fields['border-style'] : '';
133 133
 	}
134 134
 
135 135
 	/**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public function getBorderWidth()
151 151
 	{
152
-		return isset($this->_fields['border-width'])?$this->_fields['border-width']:'';
152
+		return isset($this->_fields['border-width']) ? $this->_fields['border-width'] : '';
153 153
 	}
154 154
 
155 155
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getCssClass()
170 170
 	{
171
-		return $this->_class === null?'':$this->_class;
171
+		return $this->_class === null ? '' : $this->_class;
172 172
 	}
173 173
 
174 174
 	/**
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 */
242 242
 	public function getForeColor()
243 243
 	{
244
-		return isset($this->_fields['color'])?$this->_fields['color']:'';
244
+		return isset($this->_fields['color']) ? $this->_fields['color'] : '';
245 245
 	}
246 246
 
247 247
 	/**
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	public function getHeight()
262 262
 	{
263
-		return isset($this->_fields['height'])?$this->_fields['height']:'';
263
+		return isset($this->_fields['height']) ? $this->_fields['height'] : '';
264 264
 	}
265 265
 
266 266
 	/**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 */
280 280
 	public function getCustomStyle()
281 281
 	{
282
-		return $this->_customStyle === null?'':$this->_customStyle;
282
+		return $this->_customStyle === null ? '' : $this->_customStyle;
283 283
 	}
284 284
 
285 285
 	/**
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	 */
298 298
 	public function getStyleField($name)
299 299
 	{
300
-		return isset($this->_fields[$name])?$this->_fields[$name]:'';
300
+		return isset($this->_fields[$name]) ? $this->_fields[$name] : '';
301 301
 	}
302 302
 
303 303
 	/**
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	 */
334 334
 	public function getWidth()
335 335
 	{
336
-		return isset($this->_fields['width'])?$this->_fields['width']:'';
336
+		return isset($this->_fields['width']) ? $this->_fields['width'] : '';
337 337
 	}
338 338
 
339 339
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBoundColumn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 				}
182 182
 				else
183 183
 					$control = $cell;
184
-				$control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
184
+				$control->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
185 185
 				break;
186 186
 			case TListItemType::EditItem:
187 187
 				if(!$this->getReadOnly())
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 					else
220 220
 						$control = $cell;
221 221
 				}
222
-				$control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
222
+				$control->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
223 223
 				break;
224 224
 			default:
225 225
 				parent::initializeCell($cell, $columnIndex, $itemType);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDropDownList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 		if(!$this->getEnabled(true))
79 79
 			return false;
80 80
 		$this->ensureDataBound();
81
-		$selection = isset($values[$key])?$values[$key]:null;
81
+		$selection = isset($values[$key]) ? $values[$key] : null;
82 82
 		if($selection !== null)
83 83
 		{
84 84
 			$index = $this->getItems()->findIndexByValue($selection, false);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TClientScript.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
 	 */
127 127
 	public function render($writer)
128 128
 	{
129
-		if ($this->getFlushScriptFiles())
129
+		if($this->getFlushScriptFiles())
130 130
 			$this->getPage()->getClientScript()->flushScriptFiles($writer, $this);
131 131
 		$this->renderCustomScriptFile($writer);
132 132
 		$this->renderCustomScript($writer);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLiteralColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 		{
111 111
 			if($this->getDataField() !== '')
112 112
 			{
113
-				$cell->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
113
+				$cell->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
114 114
 			} else {
115 115
 				$text = $this->getText();
116 116
 				if($this->getEncode())
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TEmailAddressValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	public function getRegularExpression()
50 50
 	{
51 51
 		$regex = parent::getRegularExpression();
52
-		return $regex === ''?self::EMAIL_REGEXP:$regex;
52
+		return $regex === '' ?self::EMAIL_REGEXP : $regex;
53 53
 	}
54 54
 
55 55
 	/**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 				if(($pos = strpos($value, '@')) !== false)
69 69
 				{
70 70
 					$domain = substr($value, $pos + 1);
71
-					return $domain === ''?false:checkdnsrr($domain, 'MX');
71
+					return $domain === '' ?false:checkdnsrr($domain, 'MX');
72 72
 				}
73 73
 				else
74 74
 					return false;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRepeater.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -627,11 +627,11 @@  discard block
 block discarded – undo
627 627
 			$items = $this->getItems();
628 628
 			$hasSeparator = $this->_separatorTemplate !== null || $this->getSeparatorRenderer() !== '';
629 629
 			$this->_header = $this->createItemInternal(-1, TListItemType::Header);
630
-			for($i = 0;$i < $itemCount;++$i)
630
+			for($i = 0; $i < $itemCount; ++$i)
631 631
 			{
632 632
 				if($hasSeparator && $i > 0)
633 633
 					$this->createItemInternal($i - 1, TListItemType::Separator);
634
-				$itemType = $i % 2 == 0?TListItemType::Item : TListItemType::AlternatingItem;
634
+				$itemType = $i % 2 == 0 ?TListItemType::Item : TListItemType::AlternatingItem;
635 635
 				$items->add($this->createItemInternal($i, $itemType, false, null));
636 636
 			}
637 637
 			$this->_footer = $this->createItemInternal(-1, TListItemType::Footer);
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 				$this->_header = $this->createItemWithDataInternal(-1, TListItemType::Header, null);
669 669
 			if($hasSeparator && $itemIndex > 0)
670 670
 				$this->createItemWithDataInternal($itemIndex - 1, TListItemType::Separator, null);
671
-			$itemType = $itemIndex % 2 == 0?TListItemType::Item : TListItemType::AlternatingItem;
671
+			$itemType = $itemIndex % 2 == 0 ?TListItemType::Item : TListItemType::AlternatingItem;
672 672
 			$items->add($this->createItemWithDataInternal($itemIndex, $itemType, $dataItem));
673 673
 			$itemIndex++;
674 674
 		}
Please login to merge, or discard this patch.