Passed
Push — release-2.1 ( a8f78b...0e5bfc )
by Mathias
07:11
created
Sources/LogInOut.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@  discard block
 block discarded – undo
64 64
 			&& !empty($_SERVER['HTTP_X_SMF_AJAX'])
65 65
 			&& isset($_REQUEST['ajax'])
66 66
 		)
67
-	)
68
-	{
67
+	) {
69 68
 		$context['from_ajax'] = true;
70 69
 		$context['template_layers'] = array();
71 70
 	}
@@ -137,8 +136,7 @@  discard block
 block discarded – undo
137 136
 			&& !empty($_SERVER['HTTP_X_SMF_AJAX'])
138 137
 			&& isset($_REQUEST['ajax'])
139 138
 		)
140
-	)
141
-	{
139
+	) {
142 140
 		$context['from_ajax'] = true;
143 141
 		$context['template_layers'] = array();
144 142
 	}
@@ -517,8 +515,7 @@  discard block
 block discarded – undo
517 515
 			&& !empty($_SERVER['HTTP_X_SMF_AJAX'])
518 516
 			&& isset($_REQUEST['ajax'])
519 517
 		)
520
-	)
521
-	{
518
+	) {
522 519
 		$context['from_ajax'] = true;
523 520
 		$context['template_layers'] = array();
524 521
 	}
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Braces   +9 added lines, -11 removed lines patch added patch discarded remove patch
@@ -280,7 +280,6 @@  discard block
 block discarded – undo
280 280
 		$condition = 'id_member IN ({array_int:members})';
281 281
 		$parameters['members'] = $members;
282 282
 	}
283
-
284 283
 	elseif ($members === null)
285 284
 		$condition = '1=1';
286 285
 
@@ -383,11 +382,9 @@  discard block
 block discarded – undo
383 382
 				$val = $val . ' END';
384 383
 				$type = 'raw';
385 384
 			}
386
-
387 385
 			else
388 386
 				$val = alert_count($members, true);
389 387
 		}
390
-
391 388
 		elseif ($type == 'int' && ($val === '+' || $val === '-'))
392 389
 		{
393 390
 			$val = $var . ' ' . $val . ' 1';
@@ -2160,12 +2157,12 @@  discard block
 block discarded – undo
2160 2157
 			'tag' => 'cowsay',
2161 2158
 			'parameters' => array(
2162 2159
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2163
-					{
2160
+				{
2164 2161
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2165 2162
 					},
2166 2163
 				),
2167 2164
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2168
-					{
2165
+				{
2169 2166
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2170 2167
 					},
2171 2168
 				),
@@ -2494,7 +2491,8 @@  discard block
 block discarded – undo
2494 2491
 
2495 2492
 							foreach (array('path', 'query', 'fragment') as $part)
2496 2493
 							{
2497
-								switch ($part) {
2494
+								switch ($part)
2495
+								{
2498 2496
 									case 'path':
2499 2497
 										$part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&';
2500 2498
 										$part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars);
@@ -3541,7 +3539,7 @@  discard block
 block discarded – undo
3541 3539
 
3542 3540
 	// Replace away!
3543 3541
 	$message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements)
3544
-		{
3542
+	{
3545 3543
 			return $smileyPregReplacements[$matches[1]];
3546 3544
 		}, $message);
3547 3545
 }
@@ -4352,7 +4350,6 @@  discard block
 block discarded – undo
4352 4350
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4353 4351
 					$minSeed = $js_file['options']['seed'];
4354 4352
 			}
4355
-
4356 4353
 			else
4357 4354
 			{
4358 4355
 				echo '
@@ -6275,7 +6272,8 @@  discard block
 block discarded – undo
6275 6272
 			$zones[$tzkey]['tzid'] = $tzid;
6276 6273
 			$zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0);
6277 6274
 
6278
-			foreach ($tzinfo as $transition) {
6275
+			foreach ($tzinfo as $transition)
6276
+			{
6279 6277
 				$zones[$tzkey]['abbrs'][] = $transition['abbr'];
6280 6278
 			}
6281 6279
 
@@ -6360,7 +6358,8 @@  discard block
 block discarded – undo
6360 6358
 			$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : '');
6361 6359
 
6362 6360
 		// We don't want abbreviations like '+03' or '-11'.
6363
-		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr) {
6361
+		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr)
6362
+		{
6364 6363
 			return !strspn($abbr, '+-');
6365 6364
 		});
6366 6365
 		$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array();
@@ -6761,7 +6760,6 @@  discard block
 block discarded – undo
6761 6760
 			$isWritable = true;
6762 6761
 			break;
6763 6762
 		}
6764
-
6765 6763
 		else
6766 6764
 			@chmod($file, $val);
6767 6765
 	}
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
@@ -1232,7 +1232,8 @@  discard block
 block discarded – undo
1232 1232
 	}
1233 1233
 
1234 1234
 	// It's important to do the numbered ones before the named ones, or messes happen.
1235
-	uksort($substitutions, function($a, $b) {
1235
+	uksort($substitutions, function($a, $b)
1236
+	{
1236 1237
 		if (is_int($a) && is_int($b))
1237 1238
 			return $a > $b ? 1 : ($a < $b ? -1 : 0);
1238 1239
 		elseif (is_int($a))
@@ -1771,8 +1772,12 @@  discard block
 block discarded – undo
1771 1772
 		unset($mtime, $settingsFile, $settingsText);
1772 1773
 		$defined_vars = get_defined_vars();
1773 1774
 	}
1774
-	catch (Throwable $e) {}
1775
-	catch (ErrorException $e) {}
1775
+	catch (Throwable $e)
1776
+	{
1777
+}
1778
+	catch (ErrorException $e)
1779
+	{
1780
+}
1776 1781
 	if (isset($e))
1777 1782
 		return false;
1778 1783
 
@@ -1928,7 +1933,8 @@  discard block
 block discarded – undo
1928 1933
 	// For the same reason, replace literal returns and newlines with "\r" and "\n"
1929 1934
 	elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false))
1930 1935
 	{
1931
-		return strtr(preg_replace_callback('/[\r\n]+/', function($m) {
1936
+		return strtr(preg_replace_callback('/[\r\n]+/', function($m)
1937
+		{
1932 1938
 			return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \'';
1933 1939
 		}, var_export($var, true)), array("'' . " => '', " . ''" => ''));
1934 1940
 	}
Please login to merge, or discard this patch.