Passed
Push — release-2.1 ( a8f78b...0e5bfc )
by Mathias
07:11
created
Sources/Subs-Db-postgresql.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,8 @@  discard block
 block discarded – undo
78 78
 	$db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd);
79 79
 
80 80
 	// Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch.
81
-	set_error_handler(function($errno, $errstr) {
81
+	set_error_handler(function($errno, $errstr)
82
+	{
82 83
 		throw new ErrorException($errstr, $errno);});
83 84
 	try
84 85
 	{
@@ -939,7 +940,8 @@  discard block
 block discarded – undo
939 940
 		$error_array[2] = null;
940 941
 
941 942
 	if(empty($db_persist))
942
-	{ // without pooling
943
+	{
944
+// without pooling
943 945
 		if (empty($pg_error_data_prep))
944 946
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
945 947
 				'INSERT INTO ' . $db_prefix . 'log_errors
@@ -950,7 +952,8 @@  discard block
 block discarded – undo
950 952
 		pg_execute($db_connection, 'smf_log_errors', $error_array);
951 953
 	}
952 954
 	else
953
-	{ //with pooling
955
+	{
956
+//with pooling
954 957
 		$pg_error_data_prep = pg_prepare($db_connection, '',
955 958
 			'INSERT INTO ' . $db_prefix . 'log_errors
956 959
 				(id_member, log_time, ip, url, message, session, error_type, file, line, backtrace)
Please login to merge, or discard this patch.
Sources/ManageServer.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -707,7 +707,6 @@
 block discarded – undo
707 707
 		$cache_level = array($txt['cache_off']);
708 708
 		$apis_names['none'] = $txt['cache_off'];
709 709
 	}
710
-
711 710
 	else
712 711
 	{
713 712
 		$txt['cache_settings_message'] = '<strong class="success">' .
Please login to merge, or discard this patch.
Sources/Subs-BoardIndex.php 1 patch
Braces   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -280,7 +280,6 @@  discard block
 block discarded – undo
280 280
 					$this_category[$row_board['id_board']]['board_class'] = 'on';
281 281
 					$this_category[$row_board['id_board']]['board_tooltip'] = $txt['new_posts'];
282 282
 				}
283
-
284 283
 				else
285 284
 				{
286 285
 					$this_category[$row_board['id_board']]['board_tooltip'] = $txt['old_posts'];
@@ -415,7 +414,6 @@  discard block
 block discarded – undo
415 414
 			$this_last_post['href'] = $scripturl . '?topic=' . $row_board['id_topic'] . '.msg' . ($user_info['is_guest'] ? $row_board['id_msg'] : $row_board['new_from']) . (empty($row_board['is_read']) ? ';boardseen' : '') . '#new';
416 415
 			$this_last_post['link'] = '<a href="' . $this_last_post['href'] . '" title="' . $row_board['subject'] . '">' . $row_board['short_subject'] . '</a>';
417 416
 		}
418
-
419 417
 		else
420 418
 		{
421 419
 			$this_last_post['href'] = '';
@@ -510,8 +508,7 @@  discard block
 block discarded – undo
510 508
 					$board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']);
511 509
 			}
512 510
 		}
513
-
514
-	else
511
+		else
515 512
 		foreach ($this_category as &$board)
516 513
 		{
517 514
 			if (isset($boards_parsed_data_by_cat_id[$board['id_cat']][$board['id']]))
Please login to merge, or discard this patch.
Sources/Profile-View.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -359,7 +359,8 @@
 block discarded – undo
359 359
 	call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats));
360 360
 
361 361
 	// Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.)
362
-	$formats = array_map(function ($format) use ($scripturl) {
362
+	$formats = array_map(function ($format) use ($scripturl)
363
+	{
363 364
 		$format['link'] = str_replace('{scripturl}', $scripturl, $format['link']);
364 365
 		$format['text'] = str_replace('{scripturl}', $scripturl, $format['text']);
365 366
 
Please login to merge, or discard this patch.
Sources/Subs-Timezones.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1704,7 +1704,8 @@
 block discarded – undo
1704 1704
 		// Missing, but we have a fallback.
1705 1705
 		else
1706 1706
 		{
1707
-			usort($fallbacks[$tzid], function ($a, $b) {
1707
+			usort($fallbacks[$tzid], function ($a, $b)
1708
+			{
1708 1709
 				return $a['ts'] > $b['ts'];
1709 1710
 			});
1710 1711
 
Please login to merge, or discard this patch.
Sources/ManageSearchEngines.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -807,7 +807,8 @@
 block discarded – undo
807 807
 			{
808 808
 				$context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $txt[$new_url['label']];
809 809
 				$context['spider_logs']['rows'][$k]['data']['viewing']['class'] = $new_url['class'];
810
-			} else
810
+			}
811
+			else
811 812
 				$context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $new_url;
812 813
 		}
813 814
 	}
Please login to merge, or discard this patch.
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.