Passed
Push — release-2.1 ( e31624...391b74 )
by Mathias
26:03 queued 19:58
created
Sources/Themes.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -1364,7 +1364,6 @@
 block discarded – undo
1364 1364
 		// return all the info.
1365 1365
 		return $context['to_install'];
1366 1366
 	}
1367
-
1368 1367
 	else
1369 1368
 		fatal_lang_error('theme_install_error_title', false);
1370 1369
 }
Please login to merge, or discard this patch.
Sources/Register.php 2 patches
Braces   -1 removed lines patch added patch discarded remove patch
@@ -849,7 +849,6 @@
 block discarded – undo
849 849
 			die("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B");
850 850
 		}
851 851
 	}
852
-
853 852
 	elseif ($_REQUEST['format'] === '.wav')
854 853
 	{
855 854
 		require_once($sourcedir . '/Subs-Sound.php');
Please login to merge, or discard this 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/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.
Sources/Subs-Admin.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	{
42 42
 		if (class_exists('Imagick'))
43 43
 		{
44
-			$temp = New Imagick;
44
+			$temp = new Imagick;
45 45
 			$temp2 = $temp->getVersion();
46 46
 			$im_version = $temp2['versionString'];
47 47
 			$extension_version = 'Imagick ' . phpversion('Imagick');
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
 				'if (!is_dir(realpath($cachedir)) && is_dir($boarddir . \'/cache\'))',
860 860
 				'	$cachedir = $boarddir . \'/cache\';',
861 861
 			)),
862
-			'search_pattern' => '~\n?(#[^\n]+)?(?:\n\h*if\s*\((?:\!file_exists\(\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)|\!is_dir\(realpath\(\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)\))[^;]+\n\h*\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)[^\n]+;)+~sm',
862
+			'search_pattern' => '~\n?(#[^\n]+)?(?:\n\h*if\s*\((?:\!file_exists\(\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)|\!is_dir\(realpath\(\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)\))[^;]+\n\h*\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)[^\n]+;)+~sm',
863 863
 		),
864 864
 		'db_character_set' => array(
865 865
 			'text' => implode("\n", array(
@@ -958,8 +958,8 @@  discard block
 block discarded – undo
958 958
 		'boolean' =>  '(?i:TRUE|FALSE|(["\']?)[01]\b\\1)',
959 959
 		'NULL' =>  '(?i:NULL)',
960 960
 		// These use a PCRE subroutine to match nested arrays.
961
-		'array' =>  'array\s*(\((?'.'>[^()]|(?1))*\))',
962
-		'object' =>  '\w+::__set_state\(array\s*(\((?'.'>[^()]|(?1))*\))\)',
961
+		'array' =>  'array\s*(\((?' . '>[^()]|(?1))*\))',
962
+		'object' =>  '\w+::__set_state\(array\s*(\((?' . '>[^()]|(?1))*\))\)',
963 963
 	);
964 964
 
965 965
 	/*
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
 		),
993 993
 		// Remove the code that redirects to the installer.
994 994
 		$neg_index-- => array(
995
-			'search_pattern' => '~^if\s*\(file_exists\(dirname\(__FILE__\)\s*\.\s*\'/install\.php\'\)\)\s*(?:({(?'.'>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m',
995
+			'search_pattern' => '~^if\s*\(file_exists\(dirname\(__FILE__\)\s*\.\s*\'/install\.php\'\)\)\s*(?:({(?' . '>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m',
996 996
 			'placeholder' => '',
997 997
 		),
998 998
 	);
@@ -1758,7 +1758,7 @@  discard block
 block discarded – undo
1758 1758
 	// Prevents warnings about constants that are already defined.
1759 1759
 	$settingsText = preg_replace_callback(
1760 1760
 		'~\bdefine\s*\(\s*(["\'])(\w+)\1~',
1761
-		function ($matches)
1761
+		function($matches)
1762 1762
 		{
1763 1763
 			return 'define(\'' . md5(mt_rand()) . '\'';
1764 1764
 		},
@@ -1768,7 +1768,7 @@  discard block
 block discarded – undo
1768 1768
 	// Handle eval errors gracefully in both PHP 5 and PHP 7
1769 1769
 	try
1770 1770
 	{
1771
-		if($settingsText !== '' && @eval($settingsText) === false)
1771
+		if ($settingsText !== '' && @eval($settingsText) === false)
1772 1772
 			throw new ErrorException('eval error');
1773 1773
 
1774 1774
 		unset($mtime, $settingsFile, $settingsText);
Please login to merge, or discard this 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/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/Subs-Graphics.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@
 block discarded – undo
419 419
 
420 420
 		if (checkImagick())
421 421
 		{
422
-			$imagick = New Imagick($destName);
422
+			$imagick = new Imagick($destName);
423 423
 			$src_width = empty($src_width) ? $imagick->getImageWidth() : $src_width;
424 424
 			$src_height = empty($src_height) ? $imagick->getImageHeight() : $src_height;
425 425
 			$dest_width = empty($max_width) ? $src_width : $max_width;
Please login to merge, or discard this patch.
Sources/Class-Package.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -881,7 +881,6 @@  discard block
 block discarded – undo
881 881
 				$is_writable = true;
882 882
 				break;
883 883
 			}
884
-
885 884
 			else
886 885
 			{
887 886
 				// Convert the chmod value from octal (0777) to text ("777").
@@ -935,8 +934,9 @@  discard block
 block discarded – undo
935 934
 	{
936 935
 		// Wait for a response that isn't continued with -, but don't wait too long.
937 936
 		$time = time();
938
-		do
939
-			$this->last_message = fgets($this->connection, 1024);
937
+		do {
938
+					$this->last_message = fgets($this->connection, 1024);
939
+		}
940 940
 		while ((strlen($this->last_message) < 4 || strpos($this->last_message, ' ') === 0 || strpos($this->last_message, ' ', 3) !== 3) && time() - $time < 5);
941 941
 
942 942
 		// Was the desired response returned?
@@ -957,8 +957,9 @@  discard block
 block discarded – undo
957 957
 		// Request a passive connection - this means, we'll talk to you, you don't talk to us.
958 958
 		@fwrite($this->connection, 'PASV' . "\r\n");
959 959
 		$time = time();
960
-		do
961
-			$response = fgets($this->connection, 1024);
960
+		do {
961
+					$response = fgets($this->connection, 1024);
962
+		}
962 963
 		while (strpos($response, ' ', 3) !== 3 && time() - $time < 5);
963 964
 
964 965
 		// If it's not 227, we weren't given an IP and port, which means it failed.
@@ -1080,8 +1081,9 @@  discard block
 block discarded – undo
1080 1081
 
1081 1082
 		@fwrite($this->connection, 'PWD' . "\r\n");
1082 1083
 		$time = time();
1083
-		do
1084
-			$response = fgets($this->connection, 1024);
1084
+		do {
1085
+					$response = fgets($this->connection, 1024);
1086
+		}
1085 1087
 		while ($response[3] != ' ' && time() - $time < 5);
1086 1088
 
1087 1089
 		// Check for 257!
Please login to merge, or discard this patch.
Sources/Subs-Editor.php 1 patch
Braces   -3 removed lines patch added patch discarded remove patch
@@ -310,7 +310,6 @@  discard block
 block discarded – undo
310 310
 					$replacement .= $precedingStyle . $extra_attr . $afterStyle;
311 311
 			}
312 312
 		}
313
-
314 313
 		elseif (preg_match('~</([A-Za-z]+)>~', $part, $matches) === 1)
315 314
 		{
316 315
 			// Is this the element that we've been waiting for to be closed?
@@ -570,7 +569,6 @@  discard block
 block discarded – undo
570 569
 							$parts[$i + 2] = str_repeat("\t", $listDepth) . '[/list]';
571 570
 							$parts[$i + 3] = '';
572 571
 						}
573
-
574 572
 						else
575 573
 						{
576 574
 							// We're in a list item.
@@ -609,7 +607,6 @@  discard block
 block discarded – undo
609 607
 							$parts[$i + 2] = '';
610 608
 							$parts[$i + 3] = '';
611 609
 						}
612
-
613 610
 						else
614 611
 						{
615 612
 							// Remove the trailing breaks from the list item.
Please login to merge, or discard this patch.
Sources/Subs-Post.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -1254,7 +1254,6 @@
 block discarded – undo
1254 1254
 
1255 1255
 		return array($charset, $string, 'base64');
1256 1256
 	}
1257
-
1258 1257
 	else
1259 1258
 		return array($charset, $string, '7bit');
1260 1259
 }
Please login to merge, or discard this patch.