Passed
Push — release-2.1 ( fa03a5...8f939c )
by Mathias
06:50
created
Sources/Load.php 1 patch
Braces   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	// Set a list of common functions.
99 99
 	$ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);';
100 100
 	$ent_check = empty($modSettings['disableEntityCheck']) ? function($string)
101
-		{
101
+	{
102 102
 			$string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);
103 103
 			return $string;
104 104
 		} : function($string)
@@ -2147,7 +2147,6 @@  discard block
 block discarded – undo
2147 2147
 		loadLanguage('index+Modifications');
2148 2148
 		$context['template_layers'] = array();
2149 2149
 	}
2150
-
2151 2150
 	else
2152 2151
 	{
2153 2152
 		// Custom templates to load, or just default?
@@ -2525,14 +2524,12 @@  discard block
 block discarded – undo
2525 2524
 				$fileUrl = $settings['default_theme_url'] . '/css/' . $fileName;
2526 2525
 				$filePath = $settings['default_theme_dir'] . '/css/' . $fileName;
2527 2526
 			}
2528
-
2529 2527
 			else
2530 2528
 			{
2531 2529
 				$fileUrl = false;
2532 2530
 				$filePath = false;
2533 2531
 			}
2534 2532
 		}
2535
-
2536 2533
 		else
2537 2534
 		{
2538 2535
 			$fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName;
@@ -2639,14 +2636,12 @@  discard block
 block discarded – undo
2639 2636
 				$fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName;
2640 2637
 				$filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName;
2641 2638
 			}
2642
-
2643 2639
 			else
2644 2640
 			{
2645 2641
 				$fileUrl = false;
2646 2642
 				$filePath = false;
2647 2643
 			}
2648 2644
 		}
2649
-
2650 2645
 		else
2651 2646
 		{
2652 2647
 			$fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName;
Please login to merge, or discard this patch.
other/install.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -978,7 +978,7 @@
 block discarded – undo
978 978
 		{
979 979
 			$row = $smcFunc['db_fetch_assoc']($result);
980 980
 			if ($row['standard_conforming_strings'] !== 'on')
981
-				{
981
+			{
982 982
 					$incontext['continue'] = 0;
983 983
 					$incontext['error'] = $txt['error_pg_scs'];
984 984
 				}
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Braces   +3 added lines, -9 removed lines patch added patch discarded remove patch
@@ -279,7 +279,6 @@  discard block
 block discarded – undo
279 279
 		$condition = 'id_member IN ({array_int:members})';
280 280
 		$parameters['members'] = $members;
281 281
 	}
282
-
283 282
 	elseif ($members === null)
284 283
 		$condition = '1=1';
285 284
 
@@ -382,11 +381,9 @@  discard block
 block discarded – undo
382 381
 				$val = $val . ' END';
383 382
 				$type = 'raw';
384 383
 			}
385
-
386 384
 			else
387 385
 				$val = alert_count($members, true);
388 386
 		}
389
-
390 387
 		elseif ($type == 'int' && ($val === '+' || $val === '-'))
391 388
 		{
392 389
 			$val = $var . ' ' . $val . ' 1';
@@ -2162,7 +2159,7 @@  discard block
 block discarded – undo
2162 2159
 			'tag' => 'cowsay',
2163 2160
 			'parameters' => array(
2164 2161
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2165
-					{
2162
+				{
2166 2163
 						static $css_added;
2167 2164
 
2168 2165
 						if (empty($css_added))
@@ -2179,7 +2176,7 @@  discard block
 block discarded – undo
2179 2176
 					},
2180 2177
 				),
2181 2178
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2182
-					{
2179
+				{
2183 2180
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2184 2181
 					},
2185 2182
 				),
@@ -3277,7 +3274,7 @@  discard block
 block discarded – undo
3277 3274
 
3278 3275
 	// Replace away!
3279 3276
 	$message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements)
3280
-		{
3277
+	{
3281 3278
 			return $smileyPregReplacements[$matches[1]];
3282 3279
 		}, $message);
3283 3280
 }
@@ -4073,7 +4070,6 @@  discard block
 block discarded – undo
4073 4070
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4074 4071
 					$minSeed = $js_file['options']['seed'];
4075 4072
 			}
4076
-
4077 4073
 			else
4078 4074
 			{
4079 4075
 				echo '
@@ -6255,7 +6251,6 @@  discard block
 block discarded – undo
6255 6251
 			$isWritable = true;
6256 6252
 			break;
6257 6253
 		}
6258
-
6259 6254
 		else
6260 6255
 			@chmod($file, $val);
6261 6256
 	}
@@ -7187,7 +7182,6 @@  discard block
 block discarded – undo
7187 7182
 
7188 7183
             $length += array_length($value, $deep_count);
7189 7184
         }
7190
-
7191 7185
         else
7192 7186
             $length += strlen($value);
7193 7187
     }
Please login to merge, or discard this patch.
Sources/Subs-Admin.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1213,7 +1213,8 @@  discard block
 block discarded – undo
1213 1213
 	}
1214 1214
 
1215 1215
 	// It's important to do the numbered ones before the named ones, or messes happen.
1216
-	uksort($substitutions, function($a, $b) {
1216
+	uksort($substitutions, function($a, $b)
1217
+	{
1217 1218
 		if (is_int($a) && is_int($b))
1218 1219
 			return $a > $b;
1219 1220
 		elseif (is_int($a))
@@ -1752,8 +1753,12 @@  discard block
 block discarded – undo
1752 1753
 		unset($mtime, $settingsFile, $settingsText);
1753 1754
 		$defined_vars = get_defined_vars();
1754 1755
 	}
1755
-	catch (Throwable $e) {}
1756
-	catch (ErrorException $e) {}
1756
+	catch (Throwable $e)
1757
+	{
1758
+}
1759
+	catch (ErrorException $e)
1760
+	{
1761
+}
1757 1762
 	if (isset($e))
1758 1763
 		return false;
1759 1764
 
@@ -1913,7 +1918,8 @@  discard block
 block discarded – undo
1913 1918
 	// For the same reason, replace literal returns and newlines with "\r" and "\n"
1914 1919
 	elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false))
1915 1920
 	{
1916
-		return strtr(preg_replace_callback('/[\r\n]+/', function($m) {
1921
+		return strtr(preg_replace_callback('/[\r\n]+/', function($m)
1922
+		{
1917 1923
 			return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \'';
1918 1924
 		}, $var), array("'' . " => '', " . ''" => ''));
1919 1925
 	}
Please login to merge, or discard this patch.