Passed
Pull Request — release-2.1 (#7424)
by Jeremy
05:28
created
Sources/tasks/CreatePost-Notify.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,8 @@
 block discarded – undo
174 174
 			}
175 175
 		}
176 176
 
177
-		$unnotified = array_filter($this->members['watching'], function ($member) {
177
+		$unnotified = array_filter($this->members['watching'], function ($member)
178
+		{
178 179
 			return empty($member['sent']);
179 180
 		});
180 181
 
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-Admin.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1234,7 +1234,8 @@  discard block
 block discarded – undo
1234 1234
 	// It's important to do the numbered ones before the named ones, or messes happen.
1235 1235
 	uksort(
1236 1236
 		$substitutions,
1237
-		function($a, $b) {
1237
+		function($a, $b)
1238
+		{
1238 1239
 			if (is_int($a) && is_int($b))
1239 1240
 				return $a > $b ? 1 : ($a < $b ? -1 : 0);
1240 1241
 			elseif (is_int($a))
@@ -1774,8 +1775,12 @@  discard block
 block discarded – undo
1774 1775
 		unset($mtime, $settingsFile, $settingsText);
1775 1776
 		$defined_vars = get_defined_vars();
1776 1777
 	}
1777
-	catch (Throwable $e) {}
1778
-	catch (ErrorException $e) {}
1778
+	catch (Throwable $e)
1779
+	{
1780
+}
1781
+	catch (ErrorException $e)
1782
+	{
1783
+}
1779 1784
 	if (isset($e))
1780 1785
 		return false;
1781 1786
 
@@ -1973,7 +1978,8 @@  discard block
 block discarded – undo
1973 1978
 			{
1974 1979
 				list($id, $text) = $token;
1975 1980
 
1976
-				switch ($id) {
1981
+				switch ($id)
1982
+				{
1977 1983
 					case T_COMMENT:
1978 1984
 					case T_DOC_COMMENT:
1979 1985
 						end($parts);
@@ -2310,7 +2316,8 @@  discard block
 block discarded – undo
2310 2316
 	// Search for a working temp directory.
2311 2317
 	foreach ($temp_dir_options as $id_temp => $temp_option)
2312 2318
 	{
2313
-		switch ($temp_option) {
2319
+		switch ($temp_option)
2320
+		{
2314 2321
 			case 'cachedir':
2315 2322
 				$possible_temp = rtrim($cachedir, '/');
2316 2323
 				break;
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Braces   +11 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';
@@ -2167,12 +2164,12 @@  discard block
 block discarded – undo
2167 2164
 			'tag' => 'cowsay',
2168 2165
 			'parameters' => array(
2169 2166
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2170
-					{
2167
+				{
2171 2168
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2172 2169
 					},
2173 2170
 				),
2174 2171
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2175
-					{
2172
+				{
2176 2173
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2177 2174
 					},
2178 2175
 				),
@@ -2500,7 +2497,8 @@  discard block
 block discarded – undo
2500 2497
 
2501 2498
 							foreach (array('path', 'query', 'fragment') as $part)
2502 2499
 							{
2503
-								switch ($part) {
2500
+								switch ($part)
2501
+								{
2504 2502
 									case 'path':
2505 2503
 										$part_disallowed_chars = '\h\v<>' . $bracket_quote_chars . $excluded_trailing_chars . '/#&';
2506 2504
 										$part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars);
@@ -2817,7 +2815,9 @@  discard block
 block discarded – undo
2817 2815
 			$look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2));
2818 2816
 
2819 2817
 			// A closing tag that doesn't match any open tags? Skip it.
2820
-			if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags)))
2818
+			if (!in_array($look_for, array_map(function($code)
2819
+			{
2820
+return $code['tag']; }, $open_tags)))
2821 2821
 				continue;
2822 2822
 
2823 2823
 			$to_close = array();
@@ -4357,7 +4357,6 @@  discard block
 block discarded – undo
4357 4357
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4358 4358
 					$minSeed = $js_file['options']['seed'];
4359 4359
 			}
4360
-
4361 4360
 			else
4362 4361
 			{
4363 4362
 				echo '
@@ -6287,7 +6286,8 @@  discard block
 block discarded – undo
6287 6286
 			$zones[$tzkey]['tzid'] = $tzid;
6288 6287
 			$zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0);
6289 6288
 
6290
-			foreach ($tzinfo as $transition) {
6289
+			foreach ($tzinfo as $transition)
6290
+			{
6291 6291
 				$zones[$tzkey]['abbrs'][] = $transition['abbr'];
6292 6292
 			}
6293 6293
 
@@ -6791,7 +6791,6 @@  discard block
 block discarded – undo
6791 6791
 			$isWritable = true;
6792 6792
 			break;
6793 6793
 		}
6794
-
6795 6794
 		else
6796 6795
 			@chmod($file, $val);
6797 6796
 	}
@@ -7880,7 +7879,8 @@  discard block
 block discarded – undo
7880 7879
 	$replaceWith = array();
7881 7880
 
7882 7881
 	if (!empty($matches[1]))
7883
-		foreach ($matches[1] as $token) {
7882
+		foreach ($matches[1] as $token)
7883
+		{
7884 7884
 			$toFind[] = '{' . $token . '}';
7885 7885
 			$replaceWith[] = isset($txt[$token]) ? $txt[$token] : $token;
7886 7886
 		}
Please login to merge, or discard this patch.
Sources/Recent.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -1289,7 +1289,6 @@
 block discarded – undo
1289 1289
 			if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])
1290 1290
 				$pages .= sprintf(strtr($settings['page_index']['page'], array('{URL}' => $scripturl . '?topic=' . $row['id_topic'] . '.0;all')), '', $txt['all']);
1291 1291
 		}
1292
-
1293 1292
 		else
1294 1293
 			$pages = '';
1295 1294
 
Please login to merge, or discard this patch.
other/upgrade.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
 	'mysql' => array(
42 42
 		'name' => 'MySQL',
43 43
 		'version' => '5.6.0',
44
-		'version_check' => function() {
44
+		'version_check' => function()
45
+		{
45 46
 			global $db_connection;
46 47
 			if (!function_exists('mysqli_fetch_row'))
47 48
 				return false;
@@ -52,7 +53,8 @@  discard block
 block discarded – undo
52 53
 	'postgresql' => array(
53 54
 		'name' => 'PostgreSQL',
54 55
 		'version' => '9.6',
55
-		'version_check' => function() {
56
+		'version_check' => function()
57
+		{
56 58
 			if (!function_exists('pg_version'))
57 59
 				return false;
58 60
 			$version = pg_version();
Please login to merge, or discard this patch.
Sources/ManageMaintenance.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -2214,7 +2214,6 @@
 block discarded – undo
2214 2214
 		$hookData['pureFunc'] = $hookData['method'];
2215 2215
 		$hookData['call'] = $modFunc;
2216 2216
 	}
2217
-
2218 2217
 	else
2219 2218
 		$hookData['call'] = $hookData['pureFunc'] = $modFunc;
2220 2219
 
Please login to merge, or discard this patch.
Sources/Profile-Modify.php 1 patch
Braces   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,6 @@  discard block
 block discarded – undo
156 156
 					$diff = $cur_profile['date_registered'] - strtotime(smf_strftime('%Y-%m-%d', $cur_profile['date_registered']));
157 157
 					$value = $value + $diff;
158 158
 				}
159
-
160 159
 				else
161 160
 					$value = $cur_profile['date_registered'];
162 161
 
@@ -507,7 +506,7 @@  discard block
 block discarded – undo
507 506
 						log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])]));
508 507
 
509 508
 						$context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set)
510
-							{
509
+						{
511 510
 								return $v != $set;
512 511
 							});
513 512
 					}
@@ -3518,7 +3517,6 @@  discard block
 block discarded – undo
3518 3517
 			}
3519 3518
 		}
3520 3519
 	}
3521
-
3522 3520
 	elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar)
3523 3521
 	{
3524 3522
 		if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar)
Please login to merge, or discard this patch.
other/install.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@  discard block
 block discarded – undo
40 40
 	'mysql' => array(
41 41
 		'name' => 'MySQL',
42 42
 		'version' => '5.6.0',
43
-		'version_check' => function() {
43
+		'version_check' => function()
44
+		{
44 45
 			global $db_connection;
45 46
 			if (!function_exists('mysqli_fetch_row'))
46 47
 				return false;
@@ -56,7 +57,8 @@  discard block
 block discarded – undo
56 57
 			return true;
57 58
 		},
58 59
 		'utf8_version' => '5.0.22',
59
-		'utf8_version_check' => function() {
60
+		'utf8_version_check' => function()
61
+		{
60 62
 			global $db_connection;
61 63
 			return mysqli_get_server_info($db_connection);
62 64
 		},
@@ -70,7 +72,8 @@  discard block
 block discarded – undo
70 72
 	'postgresql' => array(
71 73
 		'name' => 'PostgreSQL',
72 74
 		'version' => '9.6',
73
-		'version_check' => function() {
75
+		'version_check' => function()
76
+		{
74 77
 			global $db_connection;
75 78
 			$request = pg_query($db_connection, 'SELECT version()');
76 79
 			list ($version) = pg_fetch_row($request);
@@ -92,7 +95,8 @@  discard block
 block discarded – undo
92 95
 				return false;
93 96
 		},
94 97
 		'utf8_version' => '8.0',
95
-		'utf8_version_check' => function (){
98
+		'utf8_version_check' => function ()
99
+		{
96 100
 			global $db_connection;
97 101
 			$request = pg_query($db_connection, 'SELECT version()');
98 102
 			list ($version) = pg_fetch_row($request);
@@ -1001,7 +1005,7 @@  discard block
 block discarded – undo
1001 1005
 		{
1002 1006
 			$row = $smcFunc['db_fetch_assoc']($result);
1003 1007
 			if ($row['standard_conforming_strings'] !== 'on')
1004
-				{
1008
+			{
1005 1009
 					$incontext['continue'] = 0;
1006 1010
 					$incontext['error'] = $txt['error_pg_scs'];
1007 1011
 				}
Please login to merge, or discard this patch.