Passed
Push — release-2.1 ( 39d094...686a12 )
by Mathias
08:03 queued 11s
created
Sources/Register.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@
 block discarded – undo
315 315
 
316 316
 	array_walk_recursive(
317 317
 		$_POST,
318
-		function (&$value, $key) use ($context, $smcFunc)
318
+		function(&$value, $key) use ($context, $smcFunc)
319 319
 		{
320 320
 			// Normalize Unicode characters. (Does nothing if not in UTF-8 mode.)
321 321
 			$value = $smcFunc['normalize']($value);
Please login to merge, or discard this patch.
Sources/ManageMaintenance.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2060,7 +2060,7 @@
 block discarded – undo
2060 2060
 		new RecursiveIteratorIterator(
2061 2061
 			new RecursiveCallbackFilterIterator(
2062 2062
 				new RecursiveDirectoryIterator($dirname, FilesystemIterator::UNIX_PATHS),
2063
-				function ($fileInfo, $currentFile, $iterator)
2063
+				function($fileInfo, $currentFile, $iterator)
2064 2064
 				{
2065 2065
 					// Allow recursion
2066 2066
 					if ($iterator->hasChildren())
Please login to merge, or discard this patch.
Sources/Mentions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@
 block discarded – undo
256 256
 			return array();
257 257
 
258 258
 		// preparse code does a few things which might mess with our parsing
259
-		$body = htmlspecialchars_decode(preg_replace('~<br\s*/?'.'>~', "\n", str_replace('&nbsp;', ' ', $body)), ENT_QUOTES);
259
+		$body = htmlspecialchars_decode(preg_replace('~<br\s*/?' . '>~', "\n", str_replace('&nbsp;', ' ', $body)), ENT_QUOTES);
260 260
 
261 261
 		if (empty(self::$excluded_bbc_regex))
262 262
 			self::setExcludedBbcRegex();
Please login to merge, or discard this patch.
Sources/Cache/APIs/Sqlite.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 		$class_name = $this->getImplementationClassKeyName();
132 132
 		$class_name_txt_key = strtolower($class_name);
133 133
 
134
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
134
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
135 135
 		$config_vars[] = array(
136
-			'cachedir_'. $class_name_txt_key,
137
-			$txt['cachedir_'. $class_name_txt_key],
136
+			'cachedir_' . $class_name_txt_key,
137
+			$txt['cachedir_' . $class_name_txt_key],
138 138
 			'file',
139 139
 			'text',
140 140
 			36,
141
-			'cache_'. $class_name_txt_key .'_cachedir',
141
+			'cache_' . $class_name_txt_key . '_cachedir',
142 142
 		);
143 143
 
144 144
 		if (!isset($context['settings_post_javascript']))
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		$context['settings_post_javascript'] .= '
148 148
 			$("#cache_accelerator").change(function (e) {
149 149
 				var cache_type = e.currentTarget.value;
150
-				$("#cachedir_'. $class_name_txt_key .'").prop("disabled", cache_type != "'. $class_name .'");
150
+				$("#cachedir_'. $class_name_txt_key . '").prop("disabled", cache_type != "' . $class_name . '");
151 151
 			});';
152 152
 	}
153 153
 
Please login to merge, or discard this patch.
Sources/Subs-Charset.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	$combining_classes = utf8_combining_classes();
266 266
 
267 267
 	// Replace characters with decomposed forms.
268
-	for ($i=0; $i < count($chars); $i++)
268
+	for ($i = 0; $i < count($chars); $i++)
269 269
 	{
270 270
 		// Hangul characters.
271 271
 		if ($chars[$i] >= "\xEA\xB0\x80" && $chars[$i] <= "\xED\x9E\xA3")
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 		{
300 300
 			$temp = $chars[$i];
301 301
 			$chars[$i] = $chars[$i - 1];
302
-			$chars[$i -1] = $temp;
302
+			$chars[$i - 1] = $temp;
303 303
 
304 304
 			// Backtrack and check again.
305 305
 			if ($i > 1)
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 
544 544
 	// Use placeholders to preserve known emoji from further processing.
545 545
 	// Regex source is https://unicode.org/reports/tr51/#EBNF_and_Regex
546
-	$string  = preg_replace_callback(
546
+	$string = preg_replace_callback(
547 547
 		'/' .
548 548
 		// Flag emojis
549 549
 		'[' . $prop_classes['Regional_Indicator'] . ']{2}' .
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 			')?' .
573 573
 		')*' .
574 574
 		'/u',
575
-		function ($matches) use (&$placeholders)
575
+		function($matches) use (&$placeholders)
576 576
 		{
577 577
 			// Skip lone ASCII characters that are not actully part of an emoji sequence.
578 578
 			// This can happen because the digits 0-9 and the '*' and '#' characters are
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 		// Use placeholders for sanctioned variation selectors.
604 604
 		$string = preg_replace_callback(
605 605
 			$patterns,
606
-			function ($matches) use (&$placeholders)
606
+			function($matches) use (&$placeholders)
607 607
 			{
608 608
 				$placeholders[$matches[0]] = "\xEE\xB3\x9B" . md5($matches[0]) . "\xEE\xB3\x9C";
609 609
 				return $placeholders[$matches[0]];
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
 			// Do the thing.
684 684
 			$string = preg_replace_callback(
685 685
 				'/' . $pattern . '/u',
686
-				function ($matches) use ($placeholders)
686
+				function($matches) use ($placeholders)
687 687
 				{
688 688
 					return strtr($matches[0], $placeholders);
689 689
 				},
Please login to merge, or discard this patch.
other/update_unicode_data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 	}
753 753
 }
754 754
 // This sort works decently well to ensure widely used scripts are ranked before rare scripts.
755
-uasort($funcs['utf8_regex_joining_type']['data'], function ($a, $b)
755
+uasort($funcs['utf8_regex_joining_type']['data'], function($a, $b)
756 756
 {
757 757
 	if ($a['stats']['age'] == $b['stats']['age'])
758 758
 	{
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
 	}
829 829
 }
830 830
 // Again, sort commonly used scripts before rare scripts.
831
-uasort($funcs['utf8_regex_indic']['data'], function ($a, $b)
831
+uasort($funcs['utf8_regex_indic']['data'], function($a, $b)
832 832
 {
833 833
 	if ($a['stats']['age'] == $b['stats']['age'])
834 834
 	{
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 			{
380 380
 				$val = 'CASE ';
381 381
 				foreach ($members as $k => $v)
382
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' ';
382
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' ';
383 383
 
384 384
 				$val = $val . ' END';
385 385
 				$type = 'raw';
@@ -871,11 +871,11 @@  discard block
 block discarded – undo
871 871
 			// Anything that isn't a specification, punctuation mark, or whitespace.
872 872
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
873 873
 			// A series of punctuation marks (except %), possibly separated by whitespace.
874
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
874
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
875 875
 			// Unwanted trailing punctuation and whitespace.
876
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
876
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
877 877
 			// Unwanted opening punctuation and whitespace.
878
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
878
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
879 879
 		),
880 880
 		array(
881 881
 			'',
@@ -1178,7 +1178,7 @@  discard block
 block discarded – undo
1178 1178
 	{
1179 1179
 		$dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback(
1180 1180
 			'/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/',
1181
-			function ($matches)
1181
+			function($matches)
1182 1182
 			{
1183 1183
 				switch ($matches[2])
1184 1184
 				{
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
 	elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity'))
1313 1313
 	{
1314 1314
 		// Get whatever the default replacement character is for this encoding.
1315
-		$substitute = mb_decode_numericentity('&#xFFFD;', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']);
1315
+		$substitute = mb_decode_numericentity('&#xFFFD;', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']);
1316 1316
 	}
1317 1317
 	else
1318 1318
 		$substitute = '?';
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
 								$returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">';
1788 1788
 							else
1789 1789
 							{
1790
-								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': '';
1790
+								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1791 1791
 								$height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : '';
1792 1792
 								$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>';
1793 1793
 							}
@@ -1798,7 +1798,7 @@  discard block
 block discarded – undo
1798 1798
 							$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1799 1799
 							$height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : '';
1800 1800
 
1801
-							$returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1801
+							$returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1802 1802
 						}
1803 1803
 						// Audio.
1804 1804
 						elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0)
@@ -1806,7 +1806,7 @@  discard block
 block discarded – undo
1806 1806
 							$width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;';
1807 1807
 							$height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : '';
1808 1808
 
1809
-							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1809
+							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1810 1810
 						}
1811 1811
 						// Anything else.
1812 1812
 						else
@@ -1975,7 +1975,7 @@  discard block
 block discarded – undo
1975 1975
 				'type' => 'unparsed_commas_content',
1976 1976
 				'test' => '\d+,\d+\]',
1977 1977
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1978
-				'validate' => function (&$tag, &$data, $disabled)
1978
+				'validate' => function(&$tag, &$data, $disabled)
1979 1979
 				{
1980 1980
 					$data[0] = normalize_iri($data[0]);
1981 1981
 
@@ -2101,8 +2101,8 @@  discard block
 block discarded – undo
2101 2101
 					else
2102 2102
 						$url = get_proxied_url($url);
2103 2103
 
2104
-					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""';
2105
-					$title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : '';
2104
+					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""';
2105
+					$title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : '';
2106 2106
 
2107 2107
 					$data = isset($disabled[$tag['tag']]) ? $url : '<img src="' . $url . '"' . $alt . $title . $params['{width}'] . $params['{height}'] . ' class="bbc_img' . (!empty($params['{width}']) || !empty($params['{height}']) ? ' resized' : '') . '" loading="lazy">';
2108 2108
 				},
@@ -2533,12 +2533,12 @@  discard block
 block discarded – undo
2533 2533
 		$codes[] = array(
2534 2534
 			'tag' => 'cowsay',
2535 2535
 			'parameters' => array(
2536
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2536
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2537 2537
 					{
2538 2538
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2539 2539
 					},
2540 2540
 				),
2541
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2541
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2542 2542
 					{
2543 2543
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2544 2544
 					},
@@ -4243,7 +4243,7 @@  discard block
 block discarded – undo
4243 4243
 		if ($fp != false)
4244 4244
 		{
4245 4245
 			// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.)
4246
-			fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: '. SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n");
4246
+			fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: ' . SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n");
4247 4247
 
4248 4248
 			// Read in the HTTP/1.1 or whatever.
4249 4249
 			$test = substr(fgets($fp, 11), -1);
@@ -4839,7 +4839,7 @@  discard block
 block discarded – undo
4839 4839
 
4840 4840
 	uasort(
4841 4841
 		$context['css_files'],
4842
-		function ($a, $b)
4842
+		function($a, $b)
4843 4843
 		{
4844 4844
 			return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4845 4845
 		}
@@ -6136,7 +6136,7 @@  discard block
 block discarded – undo
6136 6136
 			{
6137 6137
 				fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n");
6138 6138
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
6139
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
6139
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
6140 6140
 				if ($keep_alive)
6141 6141
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n");
6142 6142
 				else
@@ -6146,7 +6146,7 @@  discard block
 block discarded – undo
6146 6146
 			{
6147 6147
 				fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n");
6148 6148
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
6149
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
6149
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
6150 6150
 				if ($keep_alive)
6151 6151
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n");
6152 6152
 				else
@@ -6395,13 +6395,13 @@  discard block
 block discarded – undo
6395 6395
 
6396 6396
 	// UTF-8 occurences of MS special characters
6397 6397
 	$findchars_utf8 = array(
6398
-		"\xe2\x80\x9a",	// single low-9 quotation mark
6399
-		"\xe2\x80\x9e",	// double low-9 quotation mark
6400
-		"\xe2\x80\xa6",	// horizontal ellipsis
6401
-		"\xe2\x80\x98",	// left single curly quote
6402
-		"\xe2\x80\x99",	// right single curly quote
6403
-		"\xe2\x80\x9c",	// left double curly quote
6404
-		"\xe2\x80\x9d",	// right double curly quote
6398
+		"\xe2\x80\x9a", // single low-9 quotation mark
6399
+		"\xe2\x80\x9e", // double low-9 quotation mark
6400
+		"\xe2\x80\xa6", // horizontal ellipsis
6401
+		"\xe2\x80\x98", // left single curly quote
6402
+		"\xe2\x80\x99", // right single curly quote
6403
+		"\xe2\x80\x9c", // left double curly quote
6404
+		"\xe2\x80\x9d", // right double curly quote
6405 6405
 	);
6406 6406
 
6407 6407
 	// windows 1252 / iso equivalents
@@ -6417,13 +6417,13 @@  discard block
 block discarded – undo
6417 6417
 
6418 6418
 	// safe replacements
6419 6419
 	$replacechars = array(
6420
-		',',	// &sbquo;
6421
-		',,',	// &bdquo;
6422
-		'...',	// &hellip;
6423
-		"'",	// &lsquo;
6424
-		"'",	// &rsquo;
6425
-		'"',	// &ldquo;
6426
-		'"',	// &rdquo;
6420
+		',', // &sbquo;
6421
+		',,', // &bdquo;
6422
+		'...', // &hellip;
6423
+		"'", // &lsquo;
6424
+		"'", // &rsquo;
6425
+		'"', // &ldquo;
6426
+		'"', // &rdquo;
6427 6427
 	);
6428 6428
 
6429 6429
 	if ($context['utf8'])
@@ -6786,7 +6786,7 @@  discard block
 block discarded – undo
6786 6786
 		// We don't want abbreviations like '+03' or '-11'.
6787 6787
 		$abbrs = array_filter(
6788 6788
 			$tzvalue['abbrs'],
6789
-			function ($abbr)
6789
+			function($abbr)
6790 6790
 			{
6791 6791
 				return !strspn($abbr, '+-');
6792 6792
 			}
@@ -7776,7 +7776,7 @@  discard block
 block discarded – undo
7776 7776
 			EXISTS (
7777 7777
 				SELECT bpv.id_board
7778 7778
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7779
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
7779
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
7780 7780
 					AND bpv.deny = 0
7781 7781
 					AND bpv.id_board = b.id_board
7782 7782
 			)';
@@ -7786,7 +7786,7 @@  discard block
 block discarded – undo
7786 7786
 			AND NOT EXISTS (
7787 7787
 				SELECT bpv.id_board
7788 7788
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7789
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
7789
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
7790 7790
 					AND bpv.deny = 1
7791 7791
 					AND bpv.id_board = b.id_board
7792 7792
 			)';
@@ -8193,8 +8193,8 @@  discard block
 block discarded – undo
8193 8193
 	$i = 0;
8194 8194
 	while (empty($done))
8195 8195
 	{
8196
-		if (strpos($format, '{'. --$i . '}') !== false)
8197
-			$replacements['{'. $i . '}'] = array_pop($list);
8196
+		if (strpos($format, '{' . --$i . '}') !== false)
8197
+			$replacements['{' . $i . '}'] = array_pop($list);
8198 8198
 		else
8199 8199
 			$done = true;
8200 8200
 	}
@@ -8204,8 +8204,8 @@  discard block
 block discarded – undo
8204 8204
 	$i = 0;
8205 8205
 	while (empty($done))
8206 8206
 	{
8207
-		if (strpos($format, '{'. ++$i . '}') !== false)
8208
-			$replacements['{'. $i . '}'] = array_shift($list);
8207
+		if (strpos($format, '{' . ++$i . '}') !== false)
8208
+			$replacements['{' . $i . '}'] = array_shift($list);
8209 8209
 		else
8210 8210
 			$done = true;
8211 8211
 	}
@@ -8383,7 +8383,7 @@  discard block
 block discarded – undo
8383 8383
 	if (empty($stringSubject))
8384 8384
 		return '';
8385 8385
 
8386
-	$translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches);
8386
+	$translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches);
8387 8387
 	$toFind = array();
8388 8388
 	$replaceWith = array();
8389 8389
 
Please login to merge, or discard this patch.
other/install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 				return false;
93 93
 		},
94 94
 		'utf8_version' => '8.0',
95
-		'utf8_version_check' => function (){
95
+		'utf8_version_check' => function() {
96 96
 			global $db_connection;
97 97
 			$request = pg_query($db_connection, 'SELECT version()');
98 98
 			list ($version) = pg_fetch_row($request);
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
 	$incontext['continue'] = 1;
988 988
 
989 989
 	// Check Postgres setting
990
-	if ( $db_type === 'postgresql')
990
+	if ($db_type === 'postgresql')
991 991
 	{
992 992
 		load_database();
993 993
 		$result = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 			'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'],
854 854
 			'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1,
855 855
 			'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0,
856
-			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0,
856
+			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0,
857 857
 			'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0,
858 858
 		),
859 859
 		'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '',
@@ -2539,7 +2539,7 @@  discard block
 block discarded – undo
2539 2539
 	);
2540 2540
 
2541 2541
 	// Add the JQuery library to the list of files to load.
2542
-	$jQueryUrls = array ('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/'. JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-'. JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-'. JQUERY_VERSION . '.min.js');
2542
+	$jQueryUrls = array('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/' . JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-' . JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-' . JQUERY_VERSION . '.min.js');
2543 2543
 
2544 2544
 	if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls))
2545 2545
 		loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery');
@@ -2780,8 +2780,7 @@  discard block
 block discarded – undo
2780 2780
 		$context['css_files_order'] = array();
2781 2781
 
2782 2782
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2783
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2784
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2783
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2785 2784
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2786 2785
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2787 2786
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2896,8 +2895,7 @@  discard block
 block discarded – undo
2896 2895
 	global $settings, $context, $modSettings;
2897 2896
 
2898 2897
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2899
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2900
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2898
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2901 2899
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2902 2900
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2903 2901
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -3687,8 +3685,7 @@  discard block
 block discarded – undo
3687 3685
 
3688 3686
 	// What accelerator we are going to try.
3689 3687
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3690
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3691
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3688
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3692 3689
 
3693 3690
 	// Do some basic tests.
3694 3691
 	if (class_exists($fully_qualified_class_name))
@@ -3992,7 +3989,7 @@  discard block
 block discarded – undo
3992 3989
 			$auth_secret = hash_file('sha256', $boarddir . '/Settings.php');
3993 3990
 
3994 3991
 			// Set the last error to now, but only every 15 minutes.  Don't need to flood the logs.
3995
-			if (empty($db_last_error) || ($db_last_error + 60*15) <= time())
3992
+			if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time())
3996 3993
 			{
3997 3994
 				updateDbLastError(time());
3998 3995
 				loadLanguage('Errors');
Please login to merge, or discard this patch.