Passed
Push — release-2.1 ( b7b9b9...450da8 )
by Mathias
07:12
created
Sources/Subs-Post.php 1 patch
Braces   +5 added lines, -4 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" => '
', '  ' => '  ', '[' => '[', ']' => ']')) . '[/html]';
121 122
 			}, $message);
122 123
 
@@ -626,9 +627,10 @@  discard block
 block discarded – undo
626 627
 		foreach ($to_array as $to)
627 628
 		{
628 629
 			set_error_handler(function($errno, $errstr, $errfile, $errline)
629
-				{
630
+			{
630 631
 					// error was suppressed with the @-operator
631
-					if (0 === error_reporting()) {
632
+					if (0 === error_reporting())
633
+					{
632 634
 						return false;
633 635
 					}
634 636
 
@@ -1241,7 +1243,6 @@  discard block
 block discarded – undo
1241 1243
 
1242 1244
 		return array($charset, $string, 'base64');
1243 1245
 	}
1244
-
1245 1246
 	else
1246 1247
 		return array($charset, $string, '7bit');
1247 1248
 }
Please login to merge, or discard this patch.
Sources/Attachments.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,6 @@
 block discarded – undo
199 199
 			list ($context['attachments']['quantity'], $context['attachments']['total_size']) = $smcFunc['db_fetch_row']($request);
200 200
 			$smcFunc['db_free_result']($request);
201 201
 		}
202
-
203 202
 		else
204 203
 			$context['attachments'] = array(
205 204
 				'quantity' => 0,
Please login to merge, or discard this patch.
Sources/Subs-Editor.php 1 patch
Braces   +3 added lines, -5 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.
@@ -1112,7 +1109,8 @@  discard block
 block discarded – undo
1112 1109
 		$lastlen = strlen($text = preg_replace($backToBackPattern, '', $text));
1113 1110
 
1114 1111
 	// Need to sort the tags by name length.
1115
-	uksort($valid_tags, function ($a, $b) {
1112
+	uksort($valid_tags, function ($a, $b)
1113
+	{
1116 1114
 		return strlen($a) < strlen($b) ? 1 : -1;
1117 1115
 	});
1118 1116
 
@@ -1980,7 +1978,7 @@  discard block
 block discarded – undo
1980 1978
 
1981 1979
 		// Set proper extensions; do this post caching so cache doesn't become extension-specific
1982 1980
 		array_walk_recursive($context['smileys'], function (&$filename, $key)
1983
-			{
1981
+		{
1984 1982
 				global $context, $user_info, $modSettings;
1985 1983
 				if ($key == 'filename')
1986 1984
 					// Need to use the default if user selection is disabled
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Braces   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	// Set a list of common functions.
79 79
 	$ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);';
80 80
 	$ent_check = empty($modSettings['disableEntityCheck']) ? function($string)
81
-		{
81
+	{
82 82
 			$string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);
83 83
 			return $string;
84 84
 		} : function($string)
@@ -2140,7 +2140,6 @@  discard block
 block discarded – undo
2140 2140
 		loadLanguage('index+Modifications');
2141 2141
 		$context['template_layers'] = array();
2142 2142
 	}
2143
-
2144 2143
 	else
2145 2144
 	{
2146 2145
 		// Custom templates to load, or just default?
@@ -2519,14 +2518,12 @@  discard block
 block discarded – undo
2519 2518
 				$fileUrl = $settings['default_theme_url'] . '/css/' . $fileName . ($has_seed ? '' : $params['seed']);
2520 2519
 				$filePath = $settings['default_theme_dir'] . '/css/' . $fileName . ($has_seed ? '' : $params['seed']);
2521 2520
 			}
2522
-
2523 2521
 			else
2524 2522
 			{
2525 2523
 				$fileUrl = false;
2526 2524
 				$filePath = false;
2527 2525
 			}
2528 2526
 		}
2529
-
2530 2527
 		else
2531 2528
 		{
2532 2529
 			$fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName . ($has_seed ? '' : $params['seed']);
@@ -2627,14 +2624,12 @@  discard block
 block discarded – undo
2627 2624
 				$fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName . ($has_seed ? '' : $params['seed']);
2628 2625
 				$filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName . ($has_seed ? '' : $params['seed']);
2629 2626
 			}
2630
-
2631 2627
 			else
2632 2628
 			{
2633 2629
 				$fileUrl = false;
2634 2630
 				$filePath = false;
2635 2631
 			}
2636 2632
 		}
2637
-
2638 2633
 		else
2639 2634
 		{
2640 2635
 			$fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName . ($has_seed ? '' : $params['seed']);
Please login to merge, or discard this patch.
Sources/Likes.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,6 @@
 block discarded – undo
222 222
 
223 223
 			$this->_validLikes['can_like'] = ($this->_user['id'] == $topicOwner ? 'cannot_like_content' : (allowedTo('likes_like') ? true : 'cannot_like_content'));
224 224
 		}
225
-
226 225
 		else
227 226
 		{
228 227
 			// Modders: This will give you whatever the user offers up in terms of liking, e.g. $this->_type=msg, $this->_content=1
Please login to merge, or discard this patch.
Sources/Recent.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -1252,7 +1252,6 @@
 block discarded – undo
1252 1252
 			if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])
1253 1253
 				$pages .= ' &nbsp;<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0;all">' . $txt['all'] . '</a>';
1254 1254
 		}
1255
-
1256 1255
 		else
1257 1256
 			$pages = '';
1258 1257
 
Please login to merge, or discard this patch.
Sources/News.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -389,7 +389,9 @@  discard block
 block discarded – undo
389 389
 
390 390
 		foreach ($xml_data as $item)
391 391
 		{
392
-			$link = array_filter($item['content'], function ($e) { return ($e['tag'] == 'link'); });
392
+			$link = array_filter($item['content'], function ($e)
393
+			{
394
+return ($e['tag'] == 'link'); });
393 395
 			$link = array_pop($link);
394 396
 
395 397
 			echo '
@@ -446,7 +448,7 @@  discard block
 block discarded – undo
446 448
 		return $val;
447 449
 
448 450
 	$val = preg_replace_callback('~\b' . preg_quote($scripturl, '~') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$~', function($m) use ($scripturl)
449
-		{
451
+	{
450 452
 			return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? $m[2] : "");
451 453
 		}, $val);
452 454
 	return $val;
@@ -867,7 +869,8 @@  discard block
 block discarded – undo
867 869
 			// Sort the attachments by size to make things easier below
868 870
 			if (!empty($loaded_attachments))
869 871
 			{
870
-				uasort($loaded_attachments, function($a, $b) {
872
+				uasort($loaded_attachments, function($a, $b)
873
+				{
871 874
 					if ($a['filesize'] == $b['filesize'])
872 875
 					        return 0;
873 876
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
@@ -1283,7 +1286,8 @@  discard block
 block discarded – undo
1283 1286
 			// Sort the attachments by size to make things easier below
1284 1287
 			if (!empty($loaded_attachments))
1285 1288
 			{
1286
-				uasort($loaded_attachments, function($a, $b) {
1289
+				uasort($loaded_attachments, function($a, $b)
1290
+				{
1287 1291
 					if ($a['filesize'] == $b['filesize'])
1288 1292
 					        return 0;
1289 1293
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
Please login to merge, or discard this patch.
Sources/Subs-MembersOnline.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,6 @@
 block discarded – undo
93 93
 
94 94
 			continue;
95 95
 		}
96
-
97 96
 		elseif (empty($row['show_online']) && empty($membersOnlineOptions['show_hidden']))
98 97
 		{
99 98
 			// Just increase the stats and don't add this hidden user to any list.
Please login to merge, or discard this patch.
Sources/DbSearch-postgresql.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,8 @@
 block discarded – undo
99 99
 	if (preg_match('~^\s*INSERT\sIGNORE~i', $db_string) != 0)
100 100
 	{
101 101
 		$db_string = preg_replace('~^\s*INSERT\sIGNORE~i', 'INSERT', $db_string);
102
-		if ($smcFunc['db_support_ignore']){
102
+		if ($smcFunc['db_support_ignore'])
103
+		{
103 104
 			//pg style "INSERT INTO.... ON CONFLICT DO NOTHING"
104 105
 			$db_string = $db_string.' ON CONFLICT DO NOTHING';
105 106
 		}
Please login to merge, or discard this patch.