Passed
Pull Request — release-2.1 (#5216)
by Michael
05:07
created
Sources/Subs-Membergroups.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -756,7 +756,6 @@
 block discarded – undo
756 756
 				$groups[$row['id_group']]['num_members'] += $row['num_members'];
757 757
 			$smcFunc['db_free_result']($query);
758 758
 		}
759
-
760 759
 		else
761 760
 		{
762 761
 			$query = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.
Themes/default/Calendar.template.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -425,7 +425,8 @@  discard block
 block discarded – undo
425 425
 					if (!empty($day['events']))
426 426
 					{
427 427
 						// Sort events by start time (all day events will be listed first)
428
-						uasort($day['events'], function($a, $b) {
428
+						uasort($day['events'], function($a, $b)
429
+						{
429 430
 							if ($a['start_timestamp'] == $b['start_timestamp'])
430 431
 								return 0;
431 432
 
@@ -619,7 +620,8 @@  discard block
 block discarded – undo
619 620
 			if (!empty($day['events']))
620 621
 			{
621 622
 				// Sort events by start time (all day events will be listed first)
622
-				uasort($day['events'], function($a, $b) {
623
+				uasort($day['events'], function($a, $b)
624
+				{
623 625
 					if ($a['start_timestamp'] == $b['start_timestamp'])
624 626
 						return 0;
625 627
 					return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1;
Please login to merge, or discard this patch.
Sources/tasks/CreatePost-Notify.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 {
20 20
 	/**
21 21
 	 * Constants for reply types.
22
-	*/
22
+	 */
23 23
 	const NOTIFY_TYPE_REPLY_AND_MODIFY = 1;
24 24
 	const NOTIFY_TYPE_REPLY_AND_TOPIC_START_FOLLOWING = 2;
25 25
 	const NOTIFY_TYPE_ONLY_REPLIES = 3;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	/**
29 29
 	 * Constants for frequencies.
30
-	*/
30
+	 */
31 31
 	const FREQUENCY_NOTHING = 0;
32 32
 	const FREQUENCY_EVERYTHING = 1;
33 33
 	const FREQUENCY_FIRST_UNREAD_MSG = 2;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	const FREQUENCY_WEEKLY_DIGEST = 4;
36 36
 
37 37
 	/**
38
-     * This handles notifications when a new post is created - new topic, reply, quotes and mentions.
38
+	 * This handles notifications when a new post is created - new topic, reply, quotes and mentions.
39 39
 	 * @return bool Always returns true
40 40
 	 */
41 41
 	public function execute()
Please login to merge, or discard this patch.
cron.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@
 block discarded – undo
281 281
 {
282 282
 	/**
283 283
 	 * Constants for notfication types.
284
-	*/
284
+	 */
285 285
 	const RECEIVE_NOTIFY_EMAIL = 0x02;
286 286
 	const RECEIVE_NOTIFY_ALERT = 0x01;
287 287
 
Please login to merge, or discard this patch.
Sources/Subs-BoardIndex.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@
 block discarded – undo
419 419
 					$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']);
420 420
 			}
421 421
 		}
422
-	else
422
+		else
423 423
 		foreach ($this_category as &$board)
424 424
 		{
425 425
 			if (!empty($moderators[$board['id']]))
Please login to merge, or discard this patch.
Sources/Subs-Editor.php 1 patch
Braces   -3 removed lines patch added patch discarded remove patch
@@ -332,7 +332,6 @@  discard block
 block discarded – undo
332 332
 					$replacement .= $precedingStyle . $extra_attr . $afterStyle;
333 333
 			}
334 334
 		}
335
-
336 335
 		elseif (preg_match('~</([A-Za-z]+)>~', $part, $matches) === 1)
337 336
 		{
338 337
 			// Is this the element that we've been waiting for to be closed?
@@ -592,7 +591,6 @@  discard block
 block discarded – undo
592 591
 							$parts[$i + 2] = str_repeat("\t", $listDepth) . '[/list]';
593 592
 							$parts[$i + 3] = '';
594 593
 						}
595
-
596 594
 						else
597 595
 						{
598 596
 							// We're in a list item.
@@ -631,7 +629,6 @@  discard block
 block discarded – undo
631 629
 							$parts[$i + 2] = '';
632 630
 							$parts[$i + 3] = '';
633 631
 						}
634
-
635 632
 						else
636 633
 						{
637 634
 							// Remove the trailing breaks from the list item.
Please login to merge, or discard this patch.
Sources/Subs.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2936,7 +2936,7 @@
 block discarded – undo
2936 2936
 		}
2937 2937
 
2938 2938
 		// Set proper extensions; do this post caching so cache doesn't become extension-specific
2939
-		foreach ($smileysto AS $ix => $file)
2939
+		foreach ($smileysto as $ix => $file)
2940 2940
 			// Need to use the default if user selection is disabled
2941 2941
 			if (empty($modSettings['smiley_sets_enable']))
2942 2942
 				$smileysto[$ix] = $file . $context['user']['smiley_set_default_ext'];
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 			{
392 392
 				$val = 'CASE ';
393 393
 				foreach ($members as $k => $v)
394
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, false) . ' ';
394
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, false) . ' ';
395 395
 				$val = $val . ' END';
396 396
 				$type = 'raw';
397 397
 			}
@@ -5272,15 +5272,15 @@  discard block
 block discarded – undo
5272 5272
 
5273 5273
 	// UTF-8 occurences of MS special characters
5274 5274
 	$findchars_utf8 = array(
5275
-		"\xe2\x80\x9a",	// single low-9 quotation mark
5276
-		"\xe2\x80\x9e",	// double low-9 quotation mark
5277
-		"\xe2\x80\xa6",	// horizontal ellipsis
5278
-		"\xe2\x80\x98",	// left single curly quote
5279
-		"\xe2\x80\x99",	// right single curly quote
5280
-		"\xe2\x80\x9c",	// left double curly quote
5281
-		"\xe2\x80\x9d",	// right double curly quote
5282
-		"\xe2\x80\x93",	// en dash
5283
-		"\xe2\x80\x94",	// em dash
5275
+		"\xe2\x80\x9a", // single low-9 quotation mark
5276
+		"\xe2\x80\x9e", // double low-9 quotation mark
5277
+		"\xe2\x80\xa6", // horizontal ellipsis
5278
+		"\xe2\x80\x98", // left single curly quote
5279
+		"\xe2\x80\x99", // right single curly quote
5280
+		"\xe2\x80\x9c", // left double curly quote
5281
+		"\xe2\x80\x9d", // right double curly quote
5282
+		"\xe2\x80\x93", // en dash
5283
+		"\xe2\x80\x94", // em dash
5284 5284
 	);
5285 5285
 
5286 5286
 	// windows 1252 / iso equivalents
@@ -5298,15 +5298,15 @@  discard block
 block discarded – undo
5298 5298
 
5299 5299
 	// safe replacements
5300 5300
 	$replacechars = array(
5301
-		',',	// &sbquo;
5302
-		',,',	// &bdquo;
5303
-		'...',	// &hellip;
5304
-		"'",	// &lsquo;
5305
-		"'",	// &rsquo;
5306
-		'"',	// &ldquo;
5307
-		'"',	// &rdquo;
5308
-		'-',	// &ndash;
5309
-		'--',	// &mdash;
5301
+		',', // &sbquo;
5302
+		',,', // &bdquo;
5303
+		'...', // &hellip;
5304
+		"'", // &lsquo;
5305
+		"'", // &rsquo;
5306
+		'"', // &ldquo;
5307
+		'"', // &rdquo;
5308
+		'-', // &ndash;
5309
+		'--', // &mdash;
5310 5310
 	);
5311 5311
 
5312 5312
 	if ($context['utf8'])
Please login to merge, or discard this patch.
Braces   -3 removed lines patch added patch discarded remove patch
@@ -302,7 +302,6 @@  discard block
 block discarded – undo
302 302
 		$condition = 'id_member IN ({array_int:members})';
303 303
 		$parameters['members'] = $members;
304 304
 	}
305
-
306 305
 	elseif ($members === null)
307 306
 		$condition = '1=1';
308 307
 
@@ -3764,7 +3763,6 @@  discard block
 block discarded – undo
3764 3763
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
3765 3764
 					$minSeed = $js_file['options']['seed'];
3766 3765
 			}
3767
-
3768 3766
 			else
3769 3767
 				echo '
3770 3768
 	<script src="', $js_file['fileUrl'], '"', !empty($js_file['options']['async']) ? ' async' : '', !empty($js_file['options']['defer']) ? ' defer' : '', '></script>';
@@ -5917,7 +5915,6 @@  discard block
 block discarded – undo
5917 5915
 			$isWritable = true;
5918 5916
 			break;
5919 5917
 		}
5920
-
5921 5918
 		else
5922 5919
 			@chmod($file, $val);
5923 5920
 	}
Please login to merge, or discard this patch.
Sources/Subs-Post.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,8 @@  discard block
 block discarded – undo
116 116
 	if (!$previewing && strpos($message, '[html]') !== false)
117 117
 	{
118 118
 		if (allowedTo('admin_forum'))
119
-			$message = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function($m) {
119
+			$message = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function($m)
120
+			{
120 121
 				return '[html]' . strtr(un_htmlspecialchars($m[1]), array("\n" => '&#13;', '  ' => ' &#32;', '[' => '&#91;', ']' => '&#93;')) . '[/html]';
121 122
 			}, $message);
122 123
 
@@ -1242,7 +1243,6 @@  discard block
 block discarded – undo
1242 1243
 
1243 1244
 		return array($charset, $string, 'base64');
1244 1245
 	}
1245
-
1246 1246
 	else
1247 1247
 		return array($charset, $string, '7bit');
1248 1248
 }
Please login to merge, or discard this patch.
other/install.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1702,8 +1702,7 @@
 block discarded – undo
1702 1702
 	updateStats('topic');
1703 1703
 
1704 1704
 	// This function is needed to do the updateStats('subject') call.
1705
-	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' :
1706
-		function($string)
1705
+	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string)
1707 1706
 		{
1708 1707
 			global $sourcedir;
1709 1708
 			if (function_exists('mb_strtolower'))
Please login to merge, or discard this patch.