Passed
Push — php-cs-fixer ( b7e6c1...b932d3 )
by Fabio
31:05 queued 15:54
created
framework/Web/UI/TControlAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 	 */
49 49
 	public function getPage()
50 50
 	{
51
-		return $this->_control?$this->_control->getPage():null;
51
+		return $this->_control ? $this->_control->getPage() : null;
52 52
 	}
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.
framework/Web/TSessionIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 	 */
70 70
 	public function current()
71 71
 	{
72
-		return isset($_SESSION[$this->_key])?$_SESSION[$this->_key]:null;
72
+		return isset($_SESSION[$this->_key]) ? $_SESSION[$this->_key] : null;
73 73
 	}
74 74
 
75 75
 	/**
Please login to merge, or discard this patch.
framework/PradoBase.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
 if(!defined('PRADO_DIR'))
29 29
 	define('PRADO_DIR', __DIR__);
30 30
 /**
31
- * Defines the default permission for writable directories and files
32
- */
31
+	 * Defines the default permission for writable directories and files
32
+	 */
33 33
 if(!defined('PRADO_CHMOD'))
34 34
 	define('PRADO_CHMOD', 0777);
35 35
 /**
36
- * Defines the Composer's vendor/ path.
37
- */
36
+	 * Defines the Composer's vendor/ path.
37
+	 */
38 38
 if(!defined('PRADO_VENDORDIR'))
39 39
 {
40 40
 	$reflector = new \ReflectionClass('\Composer\Autoload\ClassLoader');
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -124,15 +124,15 @@  discard block
 block discarded – undo
124 124
 		/**
125 125
 		 * Sets error handler to be Prado::phpErrorHandler
126 126
 		 */
127
-		set_error_handler(['\Prado\PradoBase','phpErrorHandler']);
127
+		set_error_handler(['\Prado\PradoBase', 'phpErrorHandler']);
128 128
 		/**
129 129
 		 * Sets shutdown function to be Prado::phpFatalErrorHandler
130 130
 		 */
131
-		register_shutdown_function(['PradoBase','phpFatalErrorHandler']);
131
+		register_shutdown_function(['PradoBase', 'phpFatalErrorHandler']);
132 132
 		/**
133 133
 		 * Sets exception handler to be Prado::exceptionHandler
134 134
 		 */
135
-		set_exception_handler(['\Prado\PradoBase','exceptionHandler']);
135
+		set_exception_handler(['\Prado\PradoBase', 'exceptionHandler']);
136 136
 		/**
137 137
 		 * Disable php's builtin error reporting to avoid duplicated reports
138 138
 		 */
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public static function poweredByPrado($logoType = 0)
157 157
 	{
158
-		$logoName = $logoType == 1?'powered2':'powered';
158
+		$logoName = $logoType == 1 ? 'powered2' : 'powered';
159 159
 		if(self::$_application !== null)
160 160
 		{
161 161
 			$am = self::$_application->getAssetManager();
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 				break;
323 323
 				default:
324 324
 					$s = '$args[1]';
325
-					for($i = 2;$i < $n;++$i)
325
+					for($i = 2; $i < $n; ++$i)
326 326
 						$s .= ",\$args[$i]";
327 327
 					eval("\$component=new $type($s);");
328 328
 					return $component;
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 						if(class_exists($namespace, false) || interface_exists($namespace, false))
396 396
 							class_alias($namespace, $className);
397 397
 					}
398
-					catch(\Exception $e)
398
+					catch (\Exception $e)
399 399
 					{
400 400
 						if($checkClassExistence && !class_exists($className, false))
401 401
 							throw new TInvalidOperationException('prado_component_unknown', $className, $e->getMessage());
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 	 */
448 448
 	public static function getPathOfAlias($alias)
449 449
 	{
450
-		return isset(self::$_aliases[$alias])?self::$_aliases[$alias]:null;
450
+		return isset(self::$_aliases[$alias]) ?self::$_aliases[$alias] : null;
451 451
 	}
452 452
 
453 453
 	protected static function getPathAliases()
@@ -513,25 +513,25 @@  discard block
 block discarded – undo
513 513
 					if(is_string($item))
514 514
 					{
515 515
 						$str = htmlentities(str_replace("\r\n", "", $item), ENT_QUOTES);
516
-						if (strlen($item) > 70)
516
+						if(strlen($item) > 70)
517 517
 							echo "'" . substr($str, 0, 70) . "...'";
518 518
 						else
519 519
 							echo "'" . $str . "'";
520 520
 					}
521
-					elseif (is_int($item) || is_float($item))
521
+					elseif(is_int($item) || is_float($item))
522 522
 						echo $item;
523
-					elseif (is_object($item))
523
+					elseif(is_object($item))
524 524
 						echo get_class($item);
525
-					elseif (is_array($item))
525
+					elseif(is_array($item))
526 526
 						echo 'array(' . count($item) . ')';
527
-					elseif (is_bool($item))
527
+					elseif(is_bool($item))
528 528
 						echo $item ? 'true' : 'false';
529
-					elseif ($item === null)
529
+					elseif($item === null)
530 530
 						echo 'NULL';
531
-					elseif (is_resource($item))
531
+					elseif(is_resource($item))
532 532
 						echo get_resource_type($item);
533 533
 					$count++;
534
-					if (count($t['args']) > $count)
534
+					if(count($t['args']) > $count)
535 535
 						echo ', ';
536 536
 				}
537 537
 			}
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 				foreach(explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language)
562 562
 				{
563 563
 					$array = explode(';q=', trim($language));
564
-					$languages[trim($array[0])] = isset($array[1])?(float)$array[1]:1.0;
564
+					$languages[trim($array[0])] = isset($array[1]) ? (float) $array[1] : 1.0;
565 565
 				}
566 566
 				arsort($languages);
567 567
 				$languages = array_keys($languages);
@@ -684,8 +684,8 @@  discard block
 block discarded – undo
684 684
 		if($app === null || ($config = $app->getTranslationConfiguration()) === null)
685 685
 			return strtr($text, $params);
686 686
 
687
-		if ($catalogue === null)
688
-			$catalogue = isset($config['catalogue'])?$config['catalogue']:'messages';
687
+		if($catalogue === null)
688
+			$catalogue = isset($config['catalogue']) ? $config['catalogue'] : 'messages';
689 689
 
690 690
 		Translation::init($catalogue);
691 691
 
Please login to merge, or discard this patch.
framework/Web/Javascripts/TJavaScriptString.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
 {
27 27
 	public function toJavaScriptLiteral()
28 28
 	{
29
-		return TJavaScript::jsonEncode((string)$this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG);
29
+		return TJavaScript::jsonEncode((string) $this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG);
30 30
 	}
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/TEmptyControlCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,6 +41,6 @@
 block discarded – undo
41 41
 	public function insertAt($index, $item)
42 42
 	{
43 43
 		if(!is_string($item))  // string is possible if property tag is used. we simply ignore it in this case
44
-			parent::insertAt($index, $item);  // this will generate an exception in parent implementation
44
+			parent::insertAt($index, $item); // this will generate an exception in parent implementation
45 45
 	}
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActivePanel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,12 +86,12 @@
 block discarded – undo
86 86
 		else
87 87
 		{
88 88
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
89
-			if ($this->getHasControls())
89
+			if($this->getHasControls())
90 90
 			{
91 91
 				// If we update a TActivePanel on callback,
92 92
 				// We shouldn't update all childs, because the whole content will be replaced by
93 93
 				// the parent
94
-				foreach ($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control)
94
+				foreach($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control)
95 95
 				{
96 96
 						$control->getActiveControl()->setEnableUpdate(false);
97 97
 				}
Please login to merge, or discard this patch.
framework/Caching/TRedisCache.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
    */
114 114
   public function __destruct()
115 115
   {
116
-	if ($this->_cache instanceof \Redis)
116
+	if($this->_cache instanceof \Redis)
117 117
 	  $this->_cache->close();
118 118
   }
119 119
 
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
    */
127 127
   public function init($config)
128 128
   {
129
-	if (!extension_loaded('redis') || !class_exists('\Redis', false))
129
+	if(!extension_loaded('redis') || !class_exists('\Redis', false))
130 130
 	  throw new TConfigurationException('rediscache_extension_required');
131 131
 	$this->_cache = new \Redis();
132
-	if ($this->_socket !== null)
132
+	if($this->_socket !== null)
133 133
 	  $this->_cache->connect($this->_socket);
134 134
 	else
135 135
 	  $this->_cache->connect($this->_host, $this->_port);
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
    */
158 158
   public function setHost($value)
159 159
   {
160
-	if ($this->_initialized)
160
+	if($this->_initialized)
161 161
 	  throw new TInvalidOperationException('rediscache_host_unchangeable');
162 162
 	else
163 163
 	  $this->_host = $value;
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
    */
178 178
   public function setPort($value)
179 179
   {
180
-	if ($this->_initialized)
180
+	if($this->_initialized)
181 181
 	  throw new TInvalidOperationException('rediscache_port_unchangeable');
182 182
 	else
183 183
 	  $this->_port = TPropertyValue::ensureInteger($value);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
    */
218 218
   public function setIndex($value)
219 219
   {
220
-	if ($this->_initialized)
220
+	if($this->_initialized)
221 221
 	  throw new TInvalidOperationException('rediscache_index_unchangeable');
222 222
 	else
223 223
 	  $this->_index = TPropertyValue::ensureInteger($value);
Please login to merge, or discard this patch.
framework/Caching/TXCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@
 block discarded – undo
56 56
 		if(!function_exists('xcache_isset'))
57 57
 			throw new TConfigurationException('xcache_extension_required');
58 58
 
59
-		$enabled = (int)ini_get('xcache.cacher') !== 0;
60
-		$var_size = (int)ini_get('xcache.var_size');
59
+		$enabled = (int) ini_get('xcache.cacher') !== 0;
60
+		$var_size = (int) ini_get('xcache.var_size');
61 61
 
62 62
 		if(!($enabled && $var_size > 0))
63 63
 			throw new TConfigurationException('xcache_extension_not_enabled');
Please login to merge, or discard this patch.
framework/Exceptions/TPhpErrorException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 			E_USER_NOTICE => "User Notice",
47 47
 			E_STRICT => "Runtime Notice"
48 48
 		];
49
-		$errorType = isset($errorTypes[$errno])?$errorTypes[$errno]:'Unknown Error';
49
+		$errorType = isset($errorTypes[$errno]) ? $errorTypes[$errno] : 'Unknown Error';
50 50
 		parent::__construct("[$errorType] $errstr (@line $errline in file $errfile).");
51 51
 	}
52 52
 
Please login to merge, or discard this patch.