Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
framework/Web/UI/WebControls/TFont.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 	protected function _getZappableSleepProps(&$exprops)
67 67
 	{
68 68
 		parent::_getZappableSleepProps($exprops);
69
-		if ($this->_flags === 0)
69
+		if($this->_flags === 0)
70 70
 			$exprops[] = "\0Prado\Web\UI\WebControls\TFont\0_flags";
71
-		if ($this->_name === '')
71
+		if($this->_name === '')
72 72
 			$exprops[] = "\0Prado\Web\UI\WebControls\TFont\0_name";
73
-		if ($this->_size === '')
73
+		if($this->_size === '')
74 74
 			$exprops[] = "\0Prado\Web\UI\WebControls\TFont\0_size";
75 75
 	}
76 76
 
@@ -287,9 +287,9 @@  discard block
 block discarded – undo
287 287
 			return '';
288 288
 		$str = '';
289 289
 		if($this->_flags & self::IS_SET_BOLD)
290
-			$str .= 'font-weight:' . (($this->_flags & self::IS_BOLD)?'bold;':'normal;');
290
+			$str .= 'font-weight:' . (($this->_flags & self::IS_BOLD) ? 'bold;' : 'normal;');
291 291
 		if($this->_flags & self::IS_SET_ITALIC)
292
-			$str .= 'font-style:' . (($this->_flags & self::IS_ITALIC)?'italic;':'normal;');
292
+			$str .= 'font-style:' . (($this->_flags & self::IS_ITALIC) ? 'italic;' : 'normal;');
293 293
 		$textDec = '';
294 294
 		if($this->_flags & self::IS_UNDERLINE)
295 295
 			$textDec .= 'underline';
@@ -316,9 +316,9 @@  discard block
 block discarded – undo
316 316
 		if($this->_flags === 0)
317 317
 			return;
318 318
 		if($this->_flags & self::IS_SET_BOLD)
319
-			$writer->addStyleAttribute('font-weight', (($this->_flags & self::IS_BOLD)?'bold':'normal'));
319
+			$writer->addStyleAttribute('font-weight', (($this->_flags & self::IS_BOLD) ? 'bold' : 'normal'));
320 320
 		if($this->_flags & self::IS_SET_ITALIC)
321
-			$writer->addStyleAttribute('font-style', (($this->_flags & self::IS_ITALIC)?'italic':'normal'));
321
+			$writer->addStyleAttribute('font-style', (($this->_flags & self::IS_ITALIC) ? 'italic' : 'normal'));
322 322
 		$textDec = '';
323 323
 		if($this->_flags & self::IS_UNDERLINE)
324 324
 			$textDec .= 'underline';
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TAccordionView.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		{
146 146
 			$writer->addAttribute('id', $this->getClientID() . '_0');
147 147
 
148
-			$style = $this->getActive()?$this->getParent()->getActiveHeaderStyle():$this->getParent()->getHeaderStyle();
148
+			$style = $this->getActive() ? $this->getParent()->getActiveHeaderStyle() : $this->getParent()->getHeaderStyle();
149 149
 
150 150
 			$style->addAttributesToRender($writer);
151 151
 
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
 		if(($caption = $this->getCaption()) === '')
169 169
 			$caption = ' ';
170 170
 
171
-		if ($url != '')
171
+		if($url != '')
172 172
 			$writer->write("<a href=\"{$url}\">");
173 173
 		$writer->write("{$caption}");
174
-		if ($url != '')
174
+		if($url != '')
175 175
 			$writer->write("</a>");
176 176
 	}
177 177
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCheckBoxColumn.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
 			$cell->getControls()->add($checkBox);
55 55
 			$cell->registerObject('CheckBox', $checkBox);
56 56
 			if($this->getDataField() !== '')
57
-				$checkBox->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
57
+				$checkBox->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
58 58
 		}
59 59
 		else
60 60
 			parent::initializeCell($cell, $columnIndex, $itemType);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataGridColumn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	 */
292 292
 	protected function getViewState($key, $defaultValue = null)
293 293
 	{
294
-		return isset($this->_viewState[$key])?$this->_viewState[$key]:$defaultValue;
294
+		return isset($this->_viewState[$key]) ? $this->_viewState[$key] : $defaultValue;
295 295
 	}
296 296
 
297 297
 	/**
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 					throw new Exception('');
537 537
 				return $result;
538 538
 			}
539
-			catch(Exception $e)
539
+			catch (Exception $e)
540 540
 			{
541 541
 				throw new TInvalidDataValueException('datagridcolumn_expression_invalid', get_class($this), $expression, $e->getMessage());
542 542
 			}
Please login to merge, or discard this patch.
framework/Web/UI/TSessionPageStatePersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 		$session = $this->_page->getSession();
100 100
 		$session->open();
101 101
 		$data = serialize($state);
102
-		$timestamp = (string)microtime(true);
102
+		$timestamp = (string) microtime(true);
103 103
 		$key = self::STATE_SESSION_KEY . $timestamp;
104 104
 		$session->add($key, $data);
105 105
 		if(($queue = $session->itemAt(self::QUEUE_SESSION_KEY)) === null)
Please login to merge, or discard this patch.
framework/Web/TUrlMappingPattern.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	{
201 201
 		$params = [];
202 202
 		$values = [];
203
-		if ($this->_parameters)
203
+		if($this->_parameters)
204 204
 		{
205 205
 			foreach($this->_parameters as $key => $value)
206 206
 			{
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 				$values[] = '(?P<' . $key . '>' . $value . ')';
209 209
 			}
210 210
 		}
211
-		if ($this->getIsWildCardPattern())
211
+		if($this->getIsWildCardPattern())
212 212
 		{
213 213
 				$params[] = '{*}';
214 214
 				// service parameter must not contain '=' and '/'
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 		$params[] = '/';
218 218
 		$values[] = '\\/';
219 219
 		$regexp = str_replace($params, $values, trim($this->getPattern(), '/') . '/');
220
-		if ($this->_urlFormat === THttpRequestUrlFormat::Get)
220
+		if($this->_urlFormat === THttpRequestUrlFormat::Get)
221 221
 				$regexp = '/^' . $regexp . '$/u';
222 222
 		else
223 223
 				$regexp = '/^' . $regexp . '(?P<urlparams>.*)$/u';
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 	 */
313 313
 	public function getParameters()
314 314
 	{
315
-		if (!$this->_parameters)
315
+		if(!$this->_parameters)
316 316
 		{
317 317
 			$this->_parameters = new TAttributeCollection;
318 318
 			$this->_parameters->setCaseSensitive(true);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 	 */
335 335
 	public function getConstants()
336 336
 	{
337
-		if (!$this->_constants)
337
+		if(!$this->_constants)
338 338
 		{
339 339
 			$this->_constants = new TAttributeCollection;
340 340
 			$this->_constants->setCaseSensitive(true);
@@ -359,10 +359,10 @@  discard block
 block discarded – undo
359 359
 		if($this->getIsWildCardPattern() && isset($matches[$this->_serviceID]))
360 360
 			$matches[$this->_serviceID] = str_replace('*', $matches[$this->_serviceID], $this->_serviceParameter);
361 361
 
362
-		if (isset($matches['urlparams']))
362
+		if(isset($matches['urlparams']))
363 363
 		{
364 364
 			$params = explode('/', $matches['urlparams']);
365
-			if ($this->_separator === '/')
365
+			if($this->_separator === '/')
366 366
 			{
367 367
 				while($key = array_shift($params))
368 368
 					$matches[$key] = ($value = array_shift($params)) ? $value : '';
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 	{
487 487
 		if(!$this->_customUrl || $this->getPattern() === null)
488 488
 			return false;
489
-		if ($this->_parameters)
489
+		if($this->_parameters)
490 490
 		{
491 491
 			foreach($this->_parameters as $key => $value)
492 492
 			{
@@ -495,13 +495,13 @@  discard block
 block discarded – undo
495 495
 			}
496 496
 		}
497 497
 
498
-		if ($this->_constants)
498
+		if($this->_constants)
499 499
 		{
500 500
 			foreach($this->_constants->toArray() as $key => $value)
501 501
 			{
502
-				if (!isset($getItems[$key]))
502
+				if(!isset($getItems[$key]))
503 503
 					return false;
504
-				if ($getItems[$key] != $value)
504
+				if($getItems[$key] != $value)
505 505
 					return false;
506 506
 			}
507 507
 		}
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 	 */
519 519
 	public function constructUrl($getItems, $encodeAmpersand, $encodeGetItems)
520 520
 	{
521
-		if ($this->_constants)
521
+		if($this->_constants)
522 522
 		{
523 523
 			foreach($this->_constants->toArray() as $key => $value)
524 524
 			{
@@ -542,14 +542,14 @@  discard block
 block discarded – undo
542 542
 		// for the rest of the GET variables, put them in the query string
543 543
 		if(count($extra) > 0)
544 544
 		{
545
-			if ($this->_urlFormat === THttpRequestUrlFormat::Path && $this->getIsWildCardPattern()) {
546
-				foreach ($extra as $name => $value)
547
-					$url .= '/' . $name . $this->_separator . ($encodeGetItems?rawurlencode($value):$value);
545
+			if($this->_urlFormat === THttpRequestUrlFormat::Path && $this->getIsWildCardPattern()) {
546
+				foreach($extra as $name => $value)
547
+					$url .= '/' . $name . $this->_separator . ($encodeGetItems ?rawurlencode($value) : $value);
548 548
 				return $url;
549 549
 			}
550 550
 
551 551
 			$url2 = '';
552
-			$amp = $encodeAmpersand?'&amp;':'&';
552
+			$amp = $encodeAmpersand ? '&amp;' : '&';
553 553
 			if($encodeGetItems)
554 554
 			{
555 555
 				foreach($extra as $name => $value)
Please login to merge, or discard this patch.
framework/Web/Services/TPageService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 						if($fileName === 0) // application config file
257 257
 						{
258 258
 							$appConfigFile = $application->getConfigurationFile();
259
-							$currentTimestamp[0] = $appConfigFile === null?0:@filemtime($appConfigFile);
259
+							$currentTimestamp[0] = $appConfigFile === null ? 0 : @filemtime($appConfigFile);
260 260
 							if($currentTimestamp[0] > $timestamp || ($timestamp > 0 && !$currentTimestamp[0]))
261 261
 								$configCached = false;
262 262
 						}
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 					$configPath .= DIRECTORY_SEPARATOR . $path;
285 285
 				}
286 286
 				$appConfigFile = $application->getConfigurationFile();
287
-				$currentTimestamp[0] = $appConfigFile === null?0:@filemtime($appConfigFile);
287
+				$currentTimestamp[0] = $appConfigFile === null ? 0 : @filemtime($appConfigFile);
288 288
 			}
289 289
 			if(!$configCached)
290 290
 			{
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 						$pageConfig->loadPageConfigurationFromXml($config, $application->getBasePath(), '');
298 298
 				}
299 299
 				$pageConfig->loadFromFiles($this->getBasePath());
300
-				$cache->set(self::CONFIG_CACHE_PREFIX . $this->getID() . $pagePath, [$pageConfig,$currentTimestamp]);
300
+				$cache->set(self::CONFIG_CACHE_PREFIX . $this->getID() . $pagePath, [$pageConfig, $currentTimestamp]);
301 301
 			}
302 302
 		}
303 303
 		return $pageConfig;
Please login to merge, or discard this patch.
framework/Web/Services/TSoapServer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		if(($provider = $this->getProvider()) !== null)
76 76
 		{
77 77
 			Prado::using($provider);
78
-			$providerClass = ($pos = strrpos($provider, '.')) !== false?substr($provider, $pos + 1):$provider;
78
+			$providerClass = ($pos = strrpos($provider, '.')) !== false ?substr($provider, $pos + 1) : $provider;
79 79
 			$this->guessMethodCallRequested($providerClass);
80 80
 			$server = $this->createServer();
81 81
 			$server->setClass($providerClass, $this);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 		if($this->_wsdlUri === '')
191 191
 		{
192 192
 			$provider = $this->getProvider();
193
-			$providerClass = ($pos = strrpos($provider, '.')) !== false?substr($provider, $pos + 1):$provider;
193
+			$providerClass = ($pos = strrpos($provider, '.')) !== false ?substr($provider, $pos + 1) : $provider;
194 194
 			Prado::using($provider);
195 195
 			if($this->getApplication()->getMode() === TApplicationMode::Performance && ($cache = $this->getApplication()->getCache()) !== null)
196 196
 			{
Please login to merge, or discard this patch.
framework/Web/Services/TJsonRpcProtocol.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,15 +80,15 @@
 block discarded – undo
80 80
 				}
81 81
 			}
82 82
 		}
83
-		catch(TRpcException $e)
83
+		catch (TRpcException $e)
84 84
 		{
85 85
 			return $this->createErrorResponse($e);
86 86
 		}
87
-		catch(THttpException $e)
87
+		catch (THttpException $e)
88 88
 		{
89 89
 			throw $e;
90 90
 		}
91
-		catch(\Exception $e)
91
+		catch (\Exception $e)
92 92
 		{
93 93
 			return $this->createErrorResponse(new TRpcException('An internal error occured', '-32603'));
94 94
 		}
Please login to merge, or discard this patch.