Passed
Push — php-cs-fixer ( b7e6c1...b932d3 )
by Fabio
31:05 queued 15:54
created
framework/Web/UI/TCachePageStatePersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
 	 */
183 183
 	public function save($data)
184 184
 	{
185
-		$timestamp = (string)microtime(true);
185
+		$timestamp = (string) microtime(true);
186 186
 		$key = $this->calculateKey($timestamp);
187 187
 		$this->getCache()->add($key, $data, $this->_timeout);
188 188
 		$this->_page->setClientState(TPageStateFormatter::serialize($this->_page, $timestamp));
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TReCaptchaValidator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	protected function getCaptchaControl()
53 53
 	{
54 54
 		$control = $this->getValidationTarget();
55
-		if (!$control)
55
+		if(!$control)
56 56
 			throw new Exception('No target control specified for TReCaptchaValidator');
57
-		if (!($control instanceof TReCaptcha))
57
+		if(!($control instanceof TReCaptcha))
58 58
 			throw new Exception('TReCaptchaValidator only works with TReCaptcha controls');
59 59
 		return $control;
60 60
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	protected function evaluateIsValid()
77 77
 	{
78 78
 		// check validity only once (if trying to evaulate multiple times, all redundant checks would fail)
79
-		if (null === $this->_isvalid)
79
+		if(null === $this->_isvalid)
80 80
 		{
81 81
 			$control = $this->getCaptchaControl();
82 82
 			$this->_isvalid = $control->validate();
@@ -96,15 +96,15 @@  discard block
 block discarded – undo
96 96
 		$cs->registerHiddenField($this->getClientID() . '_1', $value);
97 97
 		
98 98
 		// update validator display
99
-		if ($control = $this->getValidationTarget())
99
+		if($control = $this->getValidationTarget())
100 100
 		{
101 101
 			$fn = 'captchaUpdateValidatorStatus_' . $this->getClientID();
102 102
 
103 103
 			// check if we need to request a new captcha too
104
-			if ($this->Page->IsCallback)
104
+			if($this->Page->IsCallback)
105 105
 			{
106
-				if ($control->getVisible(true))
107
-					if (null !== $this->_isvalid)
106
+				if($control->getVisible(true))
107
+					if(null !== $this->_isvalid)
108 108
 					{
109 109
 						// if the response has been tested and we reach the pre-render phase
110 110
 						// then we need to regenerate the token, because it won't test positive
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTabView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
 		{
154 154
 			$writer->addAttribute('id', $this->getClientID() . '_0');
155 155
 
156
-			$style = $this->getActive()?$this->getParent()->getActiveTabStyle():$this->getParent()->getTabStyle();
156
+			$style = $this->getActive() ? $this->getParent()->getActiveTabStyle() : $this->getParent()->getTabStyle();
157 157
 			$style->addAttributesToRender($writer);
158 158
 
159 159
 			$writer->renderBeginTag($this->getTagName());
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TPanelStyle.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
 	protected function _getZappableSleepProps(&$exprops)
54 54
 	{
55 55
 		parent::_getZappableSleepProps($exprops);
56
-		if ($this->_backImageUrl === null)
56
+		if($this->_backImageUrl === null)
57 57
 			$exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_backImageUrl";
58
-		if ($this->_direction === null)
58
+		if($this->_direction === null)
59 59
 			$exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_direction";
60
-		if ($this->_horizontalAlign === null)
60
+		if($this->_horizontalAlign === null)
61 61
 			$exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_horizontalAlign";
62
-		if ($this->_scrollBars === null)
62
+		if($this->_scrollBars === null)
63 63
 			$exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_scrollBars";
64
-		if ($this->_wrap === null)
64
+		if($this->_wrap === null)
65 65
 			$exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_wrap";
66 66
 	}
67 67
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function getBackImageUrl()
107 107
 	{
108
-		return $this->_backImageUrl === null?'':$this->_backImageUrl;
108
+		return $this->_backImageUrl === null ? '' : $this->_backImageUrl;
109 109
 	}
110 110
 
111 111
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function getDirection()
124 124
 	{
125
-		return $this->_direction === null?TContentDirection::NotSet:$this->_direction;
125
+		return $this->_direction === null ?TContentDirection::NotSet : $this->_direction;
126 126
 	}
127 127
 
128 128
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function getWrap()
140 140
 	{
141
-		return $this->_wrap === null?true:$this->_wrap;
141
+		return $this->_wrap === null ?true:$this->_wrap;
142 142
 	}
143 143
 
144 144
 	/**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public function getHorizontalAlign()
157 157
 	{
158
-		return $this->_horizontalAlign === null?THorizontalAlign::NotSet:$this->_horizontalAlign;
158
+		return $this->_horizontalAlign === null ?THorizontalAlign::NotSet : $this->_horizontalAlign;
159 159
 	}
160 160
 
161 161
 	/**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 */
173 173
 	public function getScrollBars()
174 174
 	{
175
-		return $this->_scrollBars === null?TScrollBars::None:$this->_scrollBars;
175
+		return $this->_scrollBars === null ?TScrollBars::None : $this->_scrollBars;
176 176
 	}
177 177
 
178 178
 	/**
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/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/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/TTableStyle.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -58,17 +58,17 @@  discard block
 block discarded – undo
58 58
 	protected function _getZappableSleepProps(&$exprops)
59 59
 	{
60 60
 		parent::_getZappableSleepProps($exprops);
61
-		if ($this->_backImageUrl === null)
61
+		if($this->_backImageUrl === null)
62 62
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableStyle\0_backImageUrl";
63
-		if ($this->_horizontalAlign === null)
63
+		if($this->_horizontalAlign === null)
64 64
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableStyle\0_horizontalAlign";
65
-		if ($this->_cellPadding === null)
65
+		if($this->_cellPadding === null)
66 66
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableStyle\0_cellPadding";
67
-		if ($this->_cellSpacing === null)
67
+		if($this->_cellSpacing === null)
68 68
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableStyle\0_cellSpacing";
69
-		if ($this->_gridLines === null)
69
+		if($this->_gridLines === null)
70 70
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableStyle\0_gridLines";
71
-		if ($this->_borderCollapse === null)
71
+		if($this->_borderCollapse === null)
72 72
 			$exprops[] = "\0Prado\Web\UI\WebControls\TTableStyle\0_borderCollapse";
73 73
 	}
74 74
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	public function getBackImageUrl()
179 179
 	{
180
-		return $this->_backImageUrl === null?'':$this->_backImageUrl;
180
+		return $this->_backImageUrl === null ? '' : $this->_backImageUrl;
181 181
 	}
182 182
 
183 183
 	/**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	 */
195 195
 	public function getHorizontalAlign()
196 196
 	{
197
-		return $this->_horizontalAlign === null?THorizontalAlign::NotSet:$this->_horizontalAlign;
197
+		return $this->_horizontalAlign === null ?THorizontalAlign::NotSet : $this->_horizontalAlign;
198 198
 	}
199 199
 
200 200
 	/**
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 */
212 212
 	public function getCellPadding()
213 213
 	{
214
-		return $this->_cellPadding === null?-1:$this->_cellPadding;
214
+		return $this->_cellPadding === null ?-1 : $this->_cellPadding;
215 215
 	}
216 216
 
217 217
 	/**
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	 */
230 230
 	public function getCellSpacing()
231 231
 	{
232
-		return $this->_cellSpacing === null?-1:$this->_cellSpacing;
232
+		return $this->_cellSpacing === null ?-1 : $this->_cellSpacing;
233 233
 	}
234 234
 
235 235
 	/**
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 */
248 248
 	public function getGridLines()
249 249
 	{
250
-		return $this->_gridLines === null?TTableGridLines::None:$this->_gridLines;
250
+		return $this->_gridLines === null ?TTableGridLines::None : $this->_gridLines;
251 251
 	}
252 252
 
253 253
 	/**
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	public function getBorderCollapse()
267 267
 	{
268
-		return $this->_borderCollapse === null?false:$this->_borderCollapse;
268
+		return $this->_borderCollapse === null ?false:$this->_borderCollapse;
269 269
 	}
270 270
 
271 271
 	/**
Please login to merge, or discard this patch.