Passed
Push — release-2.1 ( 9dd952...c714e3 )
by Jon
04:21
created
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/Class-Graphics.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@
 block discarded – undo
280 280
 			$ret .=
281 281
 				chr(($this->m_arColors[$i] & 0x000000FF)) . // R
282 282
 				chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
283
-				chr(($this->m_arColors[$i] & 0x00FF0000) >> 16);  // B
283
+				chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B
284 284
 		}
285 285
 
286 286
 		return $ret;
Please login to merge, or discard this patch.
Sources/Class-Punycode.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 				}
146 146
 				if ($c === $n) {
147 147
 					$q = $delta;
148
-					for ($k = static::BASE;; $k += static::BASE) {
148
+					for ($k = static::BASE; ; $k += static::BASE) {
149 149
 						$t = $this->calculateThreshold($k, $bias);
150 150
 						if ($q < $t) {
151 151
 							break;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			$oldi = $i;
228 228
 			$w = 1;
229 229
 
230
-			for ($k = static::BASE;; $k += static::BASE)
230
+			for ($k = static::BASE; ; $k += static::BASE)
231 231
 			{
232 232
 				$digit = static::$decodeTable[$input[$pos++]];
233 233
 				$i = $i + ($digit * $w);
Please login to merge, or discard this patch.
Braces   +20 added lines, -10 removed lines patch added patch discarded remove patch
@@ -94,7 +94,8 @@  discard block
 block discarded – undo
94 94
 	{
95 95
 		$input = mb_strtolower($input, $this->encoding);
96 96
 		$parts = explode('.', $input);
97
-		foreach ($parts as &$part) {
97
+		foreach ($parts as &$part)
98
+		{
98 99
 			$part = $this->encodePart($part);
99 100
 		}
100 101
 		$output = implode('.', $parts);
@@ -119,13 +120,16 @@  discard block
 block discarded – undo
119 120
 		$h = $b = count($codePoints['basic']);
120 121
 
121 122
 		$output = '';
122
-		foreach ($codePoints['basic'] as $code) {
123
+		foreach ($codePoints['basic'] as $code)
124
+		{
123 125
 			$output .= $this->codePointToChar($code);
124 126
 		}
125
-		if ($input === $output) {
127
+		if ($input === $output)
128
+		{
126 129
 			return $output;
127 130
 		}
128
-		if ($b > 0) {
131
+		if ($b > 0)
132
+		{
129 133
 			$output .= static::DELIMITER;
130 134
 		}
131 135
 
@@ -134,20 +138,26 @@  discard block
 block discarded – undo
134 138
 
135 139
 		$i = 0;
136 140
 		$length = mb_strlen($input, $this->encoding);
137
-		while ($h < $length) {
141
+		while ($h < $length)
142
+		{
138 143
 			$m = $codePoints['nonBasic'][$i++];
139 144
 			$delta = $delta + ($m - $n) * ($h + 1);
140 145
 			$n = $m;
141 146
 
142
-			foreach ($codePoints['all'] as $c) {
143
-				if ($c < $n || $c < static::INITIAL_N) {
147
+			foreach ($codePoints['all'] as $c)
148
+			{
149
+				if ($c < $n || $c < static::INITIAL_N)
150
+				{
144 151
 					$delta++;
145 152
 				}
146
-				if ($c === $n) {
153
+				if ($c === $n)
154
+				{
147 155
 					$q = $delta;
148
-					for ($k = static::BASE;; $k += static::BASE) {
156
+					for ($k = static::BASE;; $k += static::BASE)
157
+					{
149 158
 						$t = $this->calculateThreshold($k, $bias);
150
-						if ($q < $t) {
159
+						if ($q < $t)
160
+						{
151 161
 							break;
152 162
 						}
153 163
 
Please login to merge, or discard this patch.
Sources/Subs-Db-postgresql.php 3 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -979,7 +979,8 @@  discard block
 block discarded – undo
979 979
 		$error_array[2] = null;
980 980
 
981 981
 	if(empty($db_persist))
982
-	{ // without pooling
982
+	{
983
+// without pooling
983 984
 		if (empty($pg_error_data_prep))
984 985
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
985 986
 				'INSERT INTO ' . $db_prefix . 'log_errors
@@ -990,7 +991,8 @@  discard block
 block discarded – undo
990 991
 		pg_execute($db_connection, 'smf_log_errors', $error_array);
991 992
 	}
992 993
 	else
993
-	{ //with pooling
994
+	{
995
+//with pooling
994 996
 		$pg_error_data_prep = pg_prepare($db_connection, '',
995 997
 			'INSERT INTO ' . $db_prefix . 'log_errors
996 998
 				(id_member, log_time, ip, url, message, session, error_type, file, line, backtrace)
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -670,7 +670,7 @@
 block discarded – undo
670 670
 		foreach ($columns as $columnName => $type)
671 671
 		{
672 672
 			//check pk fiel
673
-			IF (in_array($columnName, $keys))
673
+			if (in_array($columnName, $keys))
674 674
 			{
675 675
 				$key_str .= ($count_pk > 0 ? ',' : '');
676 676
 				$key_str .= $columnName;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		display_db_error();
76 76
 
77 77
 	// We need to escape ' and \
78
-	$db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd);
78
+	$db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd);
79 79
 
80 80
 	// Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch.
81 81
 	set_error_handler(
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
 	if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false)
911 911
 		$error_array[2] = null;
912 912
 
913
-	if(empty($db_persist))
913
+	if (empty($db_persist))
914 914
 	{ // without pooling
915 915
 		if (empty($pg_error_data_prep))
916 916
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
Please login to merge, or discard this patch.
Sources/ManageMembers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -738,7 +738,7 @@
 block discarded – undo
738 738
 			);
739 739
 		else
740 740
 			$context['allowed_actions'] = array(
741
-				'ok' => $txt['admin_browse_w_approve'] .' '. $txt['admin_browse_no_email'],
741
+				'ok' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_no_email'],
742 742
 				'okemail' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_w_email'],
743 743
 				'require_activation' => $txt['admin_browse_w_approve_require_activate'],
744 744
 				'reject' => $txt['admin_browse_w_reject'],
Please login to merge, or discard this patch.
Sources/ManageSmileys.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1965,7 +1965,7 @@
 block discarded – undo
1965 1965
 	// Remove anything that isn't actually new from our list of files
1966 1966
 	foreach ($to_unset as $key => $ids)
1967 1967
 	{
1968
-		if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true)
1968
+		if (array_reduce($ids, function($carry, $item) { return $carry * $item; }, true) == true)
1969 1969
 			unset($smiley_files[$key]);
1970 1970
 	}
1971 1971
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1965,7 +1965,9 @@
 block discarded – undo
1965 1965
 	// Remove anything that isn't actually new from our list of files
1966 1966
 	foreach ($to_unset as $key => $ids)
1967 1967
 	{
1968
-		if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true)
1968
+		if (array_reduce($ids, function ($carry, $item)
1969
+		{
1970
+return $carry * $item; }, true) == true)
1969 1971
 			unset($smiley_files[$key]);
1970 1972
 	}
1971 1973
 
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.
Sources/Subs-Db-mysql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -975,7 +975,7 @@
 block discarded – undo
975 975
 	else
976 976
 	{
977 977
 		$return = array();
978
-		while($row = mysqli_fetch_assoc($request))
978
+		while ($row = mysqli_fetch_assoc($request))
979 979
 			$return[] = $row;
980 980
 	}
981 981
 	return !empty($return) ? $return : array();
Please login to merge, or discard this patch.
Themes/default/ManageMembergroups.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 	<script>
389 389
 		function swapPostGroup(isChecked)
390 390
 		{
391
-			var is_moderator_group = ', (int)$context['is_moderator_group'], ';
391
+			var is_moderator_group = ', (int) $context['is_moderator_group'], ';
392 392
 			var group_type = ', $context['group']['type'], ';
393 393
 			var min_posts_text = document.getElementById(\'min_posts_text\');
394 394
 			var group_desc_text = document.getElementById(\'group_desc_text\');
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 		if (empty($modSettings['deny_boards_access']))
454 454
 			echo '
455 455
 									<li class="category">
456
-										<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \''.$form_id.'\'); return false;"><strong>', $category['name'], '</strong></a>
456
+										<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'' . $form_id . '\'); return false;"><strong>', $category['name'], '</strong></a>
457 457
 										<ul>';
458 458
 		else
459 459
 			echo '
Please login to merge, or discard this patch.