Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
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.
framework/Web/UI/WebControls/TRadioButtonList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 	 */
55 55
 	public function loadPostData($key, $values)
56 56
 	{
57
-		$value = isset($values[$key])?$values[$key]:'';
57
+		$value = isset($values[$key]) ? $values[$key] : '';
58 58
 		$oldSelection = $this->getSelectedIndex();
59 59
 		$this->ensureDataBound();
60 60
 		foreach($this->getItems() as $index => $item)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THotSpot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	 */
41 41
 	protected function getViewState($key, $defaultValue = null)
42 42
 	{
43
-		return isset($this->_viewState[$key])?$this->_viewState[$key]:$defaultValue;
43
+		return isset($this->_viewState[$key]) ? $this->_viewState[$key] : $defaultValue;
44 44
 	}
45 45
 
46 46
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDropDownListColumn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -274,13 +274,13 @@
 block discarded – undo
274 274
 				}
275 275
 				else
276 276
 					$control = $cell;
277
-				$control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
277
+				$control->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
278 278
 				break;
279 279
 			case TListItemType::Item:
280 280
 			case TListItemType::AlternatingItem:
281 281
 			case TListItemType::SelectedItem:
282 282
 				if($this->getDataTextField() !== '' || $this->getDataValueField() !== '')
283
-					$cell->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
283
+					$cell->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
284 284
 				break;
285 285
 			default:
286 286
 				parent::initializeCell($cell, $columnIndex, $itemType);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TWizard.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
 		{
720 720
 			$this->_multiView = new TMultiView;
721 721
 			$this->_multiView->setID('WizardMultiView');
722
-			$this->_multiView->attachEventHandler('OnActiveViewChanged', [$this,'onActiveStepChanged']);
722
+			$this->_multiView->attachEventHandler('OnActiveViewChanged', [$this, 'onActiveStepChanged']);
723 723
 			$this->_multiView->ignoreBubbleEvents();
724 724
 		}
725 725
 		return $this->_multiView;
@@ -1097,8 +1097,8 @@  discard block
 block discarded – undo
1097 1097
 
1098 1098
 			if(($this->_sideBarDataList = $this->_sideBar->findControl(self::ID_SIDEBAR_LIST)) !== null)
1099 1099
 			{
1100
-				$this->_sideBarDataList->attachEventHandler('OnItemCommand', [$this,'dataListItemCommand']);
1101
-				$this->_sideBarDataList->attachEventHandler('OnItemDataBound', [$this,'dataListItemDataBound']);
1100
+				$this->_sideBarDataList->attachEventHandler('OnItemCommand', [$this, 'dataListItemCommand']);
1101
+				$this->_sideBarDataList->attachEventHandler('OnItemDataBound', [$this, 'dataListItemDataBound']);
1102 1102
 				$this->_sideBarDataList->setDataSource($this->getWizardSteps());
1103 1103
 				$this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex());
1104 1104
 				$this->_sideBarDataList->dataBind();
@@ -1388,16 +1388,16 @@  discard block
 block discarded – undo
1388 1388
 				if($this->_cancelNavigation)  // may be set in onSideBarButtonClick
1389 1389
 					$navParam->setCancelNavigation(true);
1390 1390
 				$requestedStep = $param->getCommandParameter();
1391
-				if (!is_numeric($requestedStep))
1391
+				if(!is_numeric($requestedStep))
1392 1392
 				{
1393 1393
 					$requestedIndex = -1;
1394
-					foreach ($this->getWizardSteps() as $index => $step)
1395
-						if ($step->getId() === $requestedStep)
1394
+					foreach($this->getWizardSteps() as $index => $step)
1395
+						if($step->getId() === $requestedStep)
1396 1396
 						{
1397 1397
 							$requestedIndex = $index;
1398 1398
 							break;
1399 1399
 						}
1400
-					if ($requestedIndex < 0)
1400
+					if($requestedIndex < 0)
1401 1401
 						throw new TConfigurationException('wizard_step_invalid');
1402 1402
 				}
1403 1403
 				else
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
 					if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($nextStepIndex))
1415 1415
 					{
1416 1416
 						if($movePrev)
1417
-							$this->getPreviousStepIndex(true);  // pop out the previous move from history
1417
+							$this->getPreviousStepIndex(true); // pop out the previous move from history
1418 1418
 						$this->setActiveStepIndex($nextStepIndex);
1419 1419
 					}
1420 1420
 				}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TListItem.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
 	protected function _getZappableSleepProps(&$exprops)
77 77
 	{
78 78
 		parent::_getZappableSleepProps($exprops);
79
-		if ($this->_attributes === null)
79
+		if($this->_attributes === null)
80 80
 			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_attributes";
81 81
 		if($this->_text === '')
82 82
 			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_text";
83 83
 		if($this->_value === '')
84 84
 			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_value";
85
-		if ($this->_enabled === true)
85
+		if($this->_enabled === true)
86 86
 			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_enabled";
87
-		if ($this->_selected === false)
87
+		if($this->_selected === false)
88 88
 			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_selected";
89 89
 	}
90 90
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 */
126 126
 	public function getText()
127 127
 	{
128
-		return $this->_text === ''?$this->_value:$this->_text;
128
+		return $this->_text === '' ? $this->_value : $this->_text;
129 129
 	}
130 130
 
131 131
 	/**
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	public function getValue()
143 143
 	{
144
-		return $this->_value === ''?$this->_text:$this->_value;
144
+		return $this->_value === '' ? $this->_text : $this->_value;
145 145
 	}
146 146
 
147 147
 	/**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function hasAttribute($name)
178 178
 	{
179
-		return $this->_attributes?$this->_attributes->contains($name):false;
179
+		return $this->_attributes ? $this->_attributes->contains($name) : false;
180 180
 	}
181 181
 
182 182
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function getAttribute($name)
186 186
 	{
187
-		return $this->_attributes?$this->_attributes->itemAt($name):null;
187
+		return $this->_attributes ? $this->_attributes->itemAt($name) : null;
188 188
 	}
189 189
 
190 190
 	/**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	public function removeAttribute($name)
205 205
 	{
206
-		return $this->_attributes?$this->_attributes->remove($name):null;
206
+		return $this->_attributes ? $this->_attributes->remove($name) : null;
207 207
 	}
208 208
 }
209 209
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRepeatInfo.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		// render items
189 189
 		$hasSeparators = $user->getHasSeparators();
190 190
 		$itemCount = $user->getItemCount();
191
-		for($i = 0;$i < $itemCount;++$i)
191
+		for($i = 0; $i < $itemCount; ++$i)
192 192
 		{
193 193
 			$user->renderItem($writer, $this, 'Item', $i);
194 194
 			if($hasSeparators && $i != $itemCount - 1)
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
 		$tableLayout = ($this->_repeatLayout === TRepeatLayout::Table);
209 209
 		$hasSeparators = $user->getHasSeparators();
210 210
 		$itemCount = $user->getItemCount();
211
-		$columns = $this->_repeatColumns === 0?$itemCount:$this->_repeatColumns;
212
-		$totalColumns = $hasSeparators?$columns + $columns:$columns;
211
+		$columns = $this->_repeatColumns === 0 ? $itemCount : $this->_repeatColumns;
212
+		$totalColumns = $hasSeparators ? $columns + $columns : $columns;
213 213
 		$needBreak = $columns < $itemCount;
214 214
 
215 215
 		if($user->getHasHeader())
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		{
221 221
 			$writer->renderBeginTag('tbody');
222 222
 			$column = 0;
223
-			for($i = 0;$i < $itemCount;++$i)
223
+			for($i = 0; $i < $itemCount; ++$i)
224 224
 			{
225 225
 				if($column == 0)
226 226
 					$writer->renderBeginTag('tr');
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
 				{
245 245
 					$restColumns = $columns - $column;
246 246
 					if($hasSeparators)
247
-						$restColumns = $restColumns?$restColumns + $restColumns + 1:1;
248
-					for($j = 0;$j < $restColumns;++$j)
247
+						$restColumns = $restColumns ? $restColumns + $restColumns + 1 : 1;
248
+					for($j = 0; $j < $restColumns; ++$j)
249 249
 						$writer->write("<td></td>\n");
250 250
 				}
251 251
 				if($column == $columns || $i == $itemCount - 1)
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 		else
261 261
 		{
262 262
 			$column = 0;
263
-			for($i = 0;$i < $itemCount;++$i)
263
+			for($i = 0; $i < $itemCount; ++$i)
264 264
 			{
265 265
 				$user->renderItem($writer, $this, 'Item', $i);
266 266
 				if($hasSeparators && $i != $itemCount - 1)
@@ -299,13 +299,13 @@  discard block
 block discarded – undo
299 299
 		else
300 300
 		{
301 301
 			$columns = $this->_repeatColumns;
302
-			$rows = (int)(($itemCount + $columns - 1) / $columns);
302
+			$rows = (int) (($itemCount + $columns - 1) / $columns);
303 303
 			if($rows == 0 && $itemCount > 0)
304 304
 				$rows = 1;
305 305
 			if(($lastColumns = $itemCount % $columns) == 0)
306 306
 				$lastColumns = $columns;
307 307
 		}
308
-		$totalColumns = $hasSeparators?$columns + $columns:$columns;
308
+		$totalColumns = $hasSeparators ? $columns + $columns : $columns;
309 309
 
310 310
 		if($user->getHasHeader())
311 311
 			$this->renderHeader($writer, $user, $tableLayout, $totalColumns, false);
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
 		{
315 315
 			$writer->renderBeginTag('tbody');
316 316
 			$renderedItems = 0;
317
-			for($row = 0;$row < $rows;++$row)
317
+			for($row = 0; $row < $rows; ++$row)
318 318
 			{
319 319
 				$index = $row;
320 320
 				$writer->renderBeginTag('tr');
321
-				for($col = 0;$col < $columns;++$col)
321
+				for($col = 0; $col < $columns; ++$col)
322 322
 				{
323 323
 					if($renderedItems >= $itemCount)
324 324
 						break;
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 					$restColumns = $columns - $lastColumns;
362 362
 					if($hasSeparators)
363 363
 						$restColumns += $restColumns;
364
-					for($col = 0;$col < $restColumns;++$col)
364
+					for($col = 0; $col < $restColumns; ++$col)
365 365
 						$writer->write("<td></td>\n");
366 366
 				}
367 367
 				$writer->renderEndTag();
@@ -372,10 +372,10 @@  discard block
 block discarded – undo
372 372
 		else
373 373
 		{
374 374
 			$renderedItems = 0;
375
-			for($row = 0;$row < $rows;++$row)
375
+			for($row = 0; $row < $rows; ++$row)
376 376
 			{
377 377
 				$index = $row;
378
-				for($col = 0;$col < $columns;++$col)
378
+				for($col = 0; $col < $columns; ++$col)
379 379
 				{
380 380
 					if($renderedItems >= $itemCount)
381 381
 						break;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TPager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -577,12 +577,12 @@  discard block
 block discarded – undo
577 577
 		$pageCount = $this->getPageCount();
578 578
 		$pageIndex = $this->getCurrentPageIndex() + 1;
579 579
 		$maxButtonCount = $this->getPageButtonCount();
580
-		$buttonCount = $maxButtonCount > $pageCount?$pageCount:$maxButtonCount;
580
+		$buttonCount = $maxButtonCount > $pageCount ? $pageCount : $maxButtonCount;
581 581
 		$startPageIndex = 1;
582 582
 		$endPageIndex = $buttonCount;
583 583
 		if($pageIndex > $endPageIndex)
584 584
 		{
585
-			$startPageIndex = ((int)(($pageIndex - 1) / $maxButtonCount)) * $maxButtonCount + 1;
585
+			$startPageIndex = ((int) (($pageIndex - 1) / $maxButtonCount)) * $maxButtonCount + 1;
586 586
 			if(($endPageIndex = $startPageIndex + $maxButtonCount - 1) > $pageCount)
587 587
 				$endPageIndex = $pageCount;
588 588
 			if($endPageIndex - $startPageIndex + 1 < $maxButtonCount)
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 			$controls->add("\n");
607 607
 		}
608 608
 
609
-		for($i = $startPageIndex;$i <= $endPageIndex;++$i)
609
+		for($i = $startPageIndex; $i <= $endPageIndex; ++$i)
610 610
 		{
611 611
 			if($i === $pageIndex)
612 612
 			{
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
 		$list->dataBind();
649 649
 		$list->setSelectedIndex($this->getCurrentPageIndex());
650 650
 		$list->setAutoPostBack(true);
651
-		$list->attachEventHandler('OnSelectedIndexChanged', [$this,'listIndexChanged']);
651
+		$list->attachEventHandler('OnSelectedIndexChanged', [$this, 'listIndexChanged']);
652 652
 	}
653 653
 
654 654
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLabel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	 */
43 43
 	protected function getTagName()
44 44
 	{
45
-		return ($this->getForControl() === '')?'span':'label';
45
+		return ($this->getForControl() === '') ? 'span' : 'label';
46 46
 	}
47 47
 
48 48
 	/**
Please login to merge, or discard this patch.