Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
framework/Web/UI/WebControls/TConditional.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 		{
81 81
 			$result = $this->getTemplateControl()->evaluateExpression($this->_condition);
82 82
 		}
83
-		catch(\Exception $e)
83
+		catch (\Exception $e)
84 84
 		{
85 85
 			throw new TInvalidDataValueException('conditional_condition_invalid', $this->_condition, $e->getMessage());
86 86
 		}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBulletedList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 	{
63 63
 		if($this->getCausesValidation())
64 64
 			$this->getPage()->validate($this->getValidationGroup());
65
-		$this->onClick(new TBulletedListEventParameter((int)$param));
65
+		$this->onClick(new TBulletedListEventParameter((int) $param));
66 66
 	}
67 67
 
68 68
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRadioButton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
 	public function loadPostData($key, $values)
113 113
 	{
114 114
 		$uniqueGroupName = $this->getUniqueGroupName();
115
-		$value = isset($values[$uniqueGroupName])?$values[$uniqueGroupName]:null;
115
+		$value = isset($values[$uniqueGroupName]) ? $values[$uniqueGroupName] : null;
116 116
 		if($value !== null && $value === $this->getValueAttribute())
117 117
 		{
118 118
 			if(!$this->getChecked())
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCaptcha.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 			$this->regenerateToken();
341 341
 			return false;
342 342
 		}
343
-		return ($this->getToken() === ($this->getCaseSensitive()?$input:strtoupper($input)));
343
+		return ($this->getToken() === ($this->getCaseSensitive() ? $input : strtoupper($input)));
344 344
 	}
345 345
 
346 346
 	/**
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	 */
384 384
 	protected function getTokenImageOptions()
385 385
 	{
386
-		$privateKey = $this->getPrivateKey();  // call this method to ensure private key is generated
386
+		$privateKey = $this->getPrivateKey(); // call this method to ensure private key is generated
387 387
 		$token = $this->getToken();
388 388
 		$options = [];
389 389
 		$options['publicKey'] = $this->getPublicKey();
@@ -394,10 +394,10 @@  discard block
 block discarded – undo
394 394
 		$options['theme'] = $this->getTokenImageTheme();
395 395
 		if(($randomSeed = $this->getViewState('RandomSeed', 0)) === 0)
396 396
 		{
397
-			$randomSeed = (int)(microtime(true) * 1000000);
397
+			$randomSeed = (int) (microtime(true) * 1000000);
398 398
 			$this->setViewState('RandomSeed', $randomSeed);
399 399
 		}
400
-		$options['randomSeed'] = $this->getChangingTokenBackground()?0:$randomSeed;
400
+		$options['randomSeed'] = $this->getChangingTokenBackground() ? 0 : $randomSeed;
401 401
 		$str = serialize($options);
402 402
 		return base64_encode(md5($privateKey . $str) . $str);
403 403
 	}
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 	protected function generateToken($publicKey, $privateKey, $alphabet, $tokenLength, $caseSensitive)
456 456
 	{
457 457
 		$token = substr($this->hash2string(md5($publicKey . $privateKey), $alphabet) . $this->hash2string(md5($privateKey . $publicKey), $alphabet), 0, $tokenLength);
458
-		return $caseSensitive?$token:strtoupper($token);
458
+		return $caseSensitive ? $token : strtoupper($token);
459 459
 	}
460 460
 
461 461
 	/**
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 		$hexLength = strlen($hex);
472 472
 		$base = strlen($alphabet);
473 473
 		$result = '';
474
-		for($i = 0;$i < $hexLength;$i += 6)
474
+		for($i = 0; $i < $hexLength; $i += 6)
475 475
 		{
476 476
 			$number = hexdec(substr($hex, $i, 6));
477 477
 			while($number)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCheckBoxList.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function findControl($id, $real = false)
78 78
 	{
79
-		if ($real === true)
79
+		if($real === true)
80 80
 			return parent::findControl($id);
81 81
 		return $this;
82 82
 	}
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	{
321 321
 		if($this->getEnabled(true))
322 322
 		{
323
-			$index = (int)substr($key, strlen($this->getUniqueID()) + 2);
323
+			$index = (int) substr($key, strlen($this->getUniqueID()) + 2);
324 324
 			$this->ensureDataBound();
325 325
 			if($index >= 0 && $index < $this->getItemCount())
326 326
 			{
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 		$this->_repeatedControl->setValidationGroup($this->getValidationGroup());
371 371
 		$page = $this->getPage();
372 372
 		$n = $this->getItemCount();
373
-		for($i = 0;$i < $n;++$i)
373
+		for($i = 0; $i < $n; ++$i)
374 374
 		{
375 375
 			$this->_repeatedControl->setID("c$i");
376 376
 			$page->registerRequiresPostData($this->_repeatedControl);
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	 *
383 383
 	 *@return boolean true if we need a span
384 384
 	 */
385
-	protected function getSpanNeeded ()
385
+	protected function getSpanNeeded()
386 386
 	{
387 387
 		return $this->getRepeatLayout() === TRepeatLayout::Raw;
388 388
 	}
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 	 */
395 395
 	public function render($writer)
396 396
 	{
397
-	  if ($needSpan = $this->getSpanNeeded())
397
+	  if($needSpan = $this->getSpanNeeded())
398 398
 	  {
399 399
 		$writer->addAttribute('id', $this->getClientId());
400 400
 		$writer->renderBeginTag('span');
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 			$this->setAccessKey($accessKey);
416 416
 			$this->setTabIndex($tabIndex);
417 417
 		}
418
-		if ($needSpan)
418
+		if($needSpan)
419 419
 		  $writer->renderEndTag();
420 420
 
421 421
 		//checkbox skipped the client control script in addAttributesToRender
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTabPanel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	public function getCssClass()
219 219
 	{
220 220
 		$cssClass = parent::getCssClass();
221
-		return $cssClass === ''?'tab-panel':$cssClass;
221
+		return $cssClass === '' ? 'tab-panel' : $cssClass;
222 222
 	}
223 223
 
224 224
 	/**
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 	{
345 345
 		if(($index = $values[$this->getClientID() . '_1']) !== null)
346 346
 		{
347
-			$index = (int)$index;
347
+			$index = (int) $index;
348 348
 			$currentIndex = $this->getActiveViewIndex();
349 349
 			if($currentIndex !== $index)
350 350
 			{
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 	public function onPreRender($param)
398 398
 	{
399 399
 		parent::onPreRender($param);
400
-		$this->getActiveView();  // determine the active view
400
+		$this->getActiveView(); // determine the active view
401 401
 		$this->registerStyleSheet();
402 402
 
403 403
 		$page = $this->getPage();
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THtmlArea4.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -394,9 +394,9 @@
 block discarded – undo
394 394
 			if(count($option) == 2)
395 395
 			{
396 396
 				$value = trim(trim($option[1]), "'\"");
397
-				if (($s = strtolower($value)) === 'false')
397
+				if(($s = strtolower($value)) === 'false')
398 398
 					$value = false;
399
-				elseif ($s === 'true')
399
+				elseif($s === 'true')
400 400
 					$value = true;
401 401
 				$options[trim($option[0])] = $value;
402 402
 			}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THtmlArea.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -440,9 +440,9 @@
 block discarded – undo
440 440
 			if(count($option) == 2)
441 441
 			{
442 442
 				$value = trim(trim($option[1]), "'\"");
443
-				if (($s = strtolower($value)) === 'false')
443
+				if(($s = strtolower($value)) === 'false')
444 444
 					$value = false;
445
-				elseif ($s === 'true')
445
+				elseif($s === 'true')
446 446
 					$value = true;
447 447
 				$options[trim($option[0])] = $value;
448 448
 			}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TListControl.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 	 */
442 442
 	public function getItemCount()
443 443
 	{
444
-		return $this->_items?$this->_items->getCount():0;
444
+		return $this->_items ? $this->_items->getCount() : 0;
445 445
 	}
446 446
 
447 447
 	/**
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 		if($this->_items)
471 471
 		{
472 472
 			$n = $this->_items->getCount();
473
-			for($i = 0;$i < $n;++$i)
473
+			for($i = 0; $i < $n; ++$i)
474 474
 				if($this->_items->itemAt($i)->getSelected())
475 475
 					return $i;
476 476
 		}
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 		if($this->_items)
505 505
 		{
506 506
 			$n = $this->_items->getCount();
507
-			for($i = 0;$i < $n;++$i)
507
+			for($i = 0; $i < $n; ++$i)
508 508
 				if($this->_items->itemAt($i)->getSelected())
509 509
 					$selections[] = $i;
510 510
 		}
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 	public function getSelectedValue()
581 581
 	{
582 582
 		$index = $this->getSelectedIndex();
583
-		return $index >= 0?$this->getItems()->itemAt($index)->getValue():'';
583
+		return $index >= 0 ? $this->getItems()->itemAt($index)->getValue() : '';
584 584
 	}
585 585
 
586 586
 	/**
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
 	 */
737 737
 	public function setPromptValue($value)
738 738
 	{
739
-		$this->setViewState('PromptValue', (string)$value, '');
739
+		$this->setViewState('PromptValue', (string) $value, '');
740 740
 	}
741 741
 
742 742
 	/**
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
 					throw new Exception('');
871 871
 				return $result;
872 872
 			}
873
-			catch(Exception $e)
873
+			catch (Exception $e)
874 874
 			{
875 875
 				throw new TInvalidDataValueException('listcontrol_expression_invalid', get_class($this), $expression, $e->getMessage());
876 876
 			}
Please login to merge, or discard this patch.