Passed
Pull Request — release-2.1 (#5765)
by Mathias
08:14
created
Sources/Subs-Db-postgresql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 		display_db_error();
74 74
 
75 75
 	// We need to escape ' and \
76
-	$db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd);
76
+	$db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd);
77 77
 
78 78
 	if (!empty($db_options['persist']))
79 79
 		$connection = @pg_pconnect((empty($db_server) ? '' : 'host=' . $db_server . ' ') . 'dbname=' . $db_name . ' user=\'' . $db_user . '\' password=\'' . $db_passwd . '\'' . (empty($db_options['port']) ? '' : ' port=\'' . $db_options['port'] . '\''));
Please login to merge, or discard this patch.
Themes/default/Admin.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -741,7 +741,7 @@
 block discarded – undo
741 741
 							<div class="information noup">', $context['settings_message'], '</div>';
742 742
 
743 743
 	// Filter out any redundant separators before we start the loop
744
-	$context['config_vars'] = array_filter($context['config_vars'], function ($v) use ($context)
744
+	$context['config_vars'] = array_filter($context['config_vars'], function($v) use ($context)
745 745
 		{
746 746
 			static $config_vars, $prev;
747 747
 
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1707,7 +1707,7 @@
 block discarded – undo
1707 1707
 		{
1708 1708
 			// Avoid double separators and empty titled sections
1709 1709
 			$empty_section = true;
1710
-			for ($j=$i+1; $j < count($context['theme_options']); $j++)
1710
+			for ($j = $i + 1; $j < count($context['theme_options']); $j++)
1711 1711
 			{
1712 1712
 				// Found another separator, so we're done
1713 1713
 				if (!is_array($context['theme_options'][$j]))
Please login to merge, or discard this patch.
Sources/Profile-View.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 			AND a.is_read = 0' : '') . (!empty($alertIDs) ? '
263 263
 			AND a.id_alert IN ({array_int:alertIDs})' : '') . '
264 264
 		ORDER BY id_alert DESC' . (!empty($limit) ? '
265
-		LIMIT {int:limit}' : '') . (!empty($offset) ?'
265
+		LIMIT {int:limit}' : '') . (!empty($offset) ? '
266 266
 		OFFSET {int:offset}' : ''),
267 267
 		array(
268 268
 			'id_member' => $memID,
@@ -1101,20 +1101,20 @@  discard block
 block discarded – undo
1101 1101
 		$context['posts'][$key]['quickbuttons'] = array(
1102 1102
 			'reply' => array(
1103 1103
 				'label' => $txt['reply'],
1104
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
1104
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
1105 1105
 				'icon' => 'reply_button',
1106 1106
 				'show' => $post['can_reply']
1107 1107
 			),
1108 1108
 			'quote' => array(
1109 1109
 				'label' => $txt['quote_action'],
1110
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
1110
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
1111 1111
 				'icon' => 'quote',
1112 1112
 				'show' => $post['can_quote']
1113 1113
 			),
1114 1114
 			'remove' => array(
1115 1115
 				'label' => $txt['remove'],
1116
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1117
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"',
1116
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1117
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"',
1118 1118
 				'icon' => 'remove_button',
1119 1119
 				'show' => $post['can_delete']
1120 1120
 			)
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 			{
396 396
 				$val = 'CASE ';
397 397
 				foreach ($members as $k => $v)
398
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' ';
398
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' ';
399 399
 				$val = $val . ' END';
400 400
 				$type = 'raw';
401 401
 			}
@@ -1055,11 +1055,11 @@  discard block
 block discarded – undo
1055 1055
 			// Anything that isn't a specification, punctuation mark, or whitespace.
1056 1056
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
1057 1057
 			// A series of punctuation marks (except %), possibly separated by whitespace.
1058
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
1058
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
1059 1059
 			// Unwanted trailing punctuation and whitespace.
1060
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1060
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1061 1061
 			// Unwanted opening punctuation and whitespace.
1062
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1062
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1063 1063
 		),
1064 1064
 		array(
1065 1065
 			'',
@@ -1599,7 +1599,7 @@  discard block
 block discarded – undo
1599 1599
 				'type' => 'unparsed_commas_content',
1600 1600
 				'test' => '\d+,\d+\]',
1601 1601
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1602
-				'validate' => function (&$tag, &$data, $disabled)
1602
+				'validate' => function(&$tag, &$data, $disabled)
1603 1603
 				{
1604 1604
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1605 1605
 					if (empty($scheme))
@@ -2159,7 +2159,7 @@  discard block
 block discarded – undo
2159 2159
 		$codes[] = array(
2160 2160
 			'tag' => 'cowsay',
2161 2161
 			'parameters' => array(
2162
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2162
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2163 2163
 					{
2164 2164
 						static $css_added;
2165 2165
 
@@ -2176,7 +2176,7 @@  discard block
 block discarded – undo
2176 2176
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2177 2177
 					},
2178 2178
 				),
2179
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2179
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2180 2180
 					{
2181 2181
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2182 2182
 					},
@@ -4140,7 +4140,7 @@  discard block
 block discarded – undo
4140 4140
 	$toMinify = array();
4141 4141
 	$normal = array();
4142 4142
 
4143
-	usort($context['css_files'], function ($a, $b)
4143
+	usort($context['css_files'], function($a, $b)
4144 4144
 	{
4145 4145
 		return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4146 4146
 	});
@@ -5605,13 +5605,13 @@  discard block
 block discarded – undo
5605 5605
 
5606 5606
 	// UTF-8 occurences of MS special characters
5607 5607
 	$findchars_utf8 = array(
5608
-		"\xe2\x80\x9a",	// single low-9 quotation mark
5609
-		"\xe2\x80\x9e",	// double low-9 quotation mark
5610
-		"\xe2\x80\xa6",	// horizontal ellipsis
5611
-		"\xe2\x80\x98",	// left single curly quote
5612
-		"\xe2\x80\x99",	// right single curly quote
5613
-		"\xe2\x80\x9c",	// left double curly quote
5614
-		"\xe2\x80\x9d",	// right double curly quote
5608
+		"\xe2\x80\x9a", // single low-9 quotation mark
5609
+		"\xe2\x80\x9e", // double low-9 quotation mark
5610
+		"\xe2\x80\xa6", // horizontal ellipsis
5611
+		"\xe2\x80\x98", // left single curly quote
5612
+		"\xe2\x80\x99", // right single curly quote
5613
+		"\xe2\x80\x9c", // left double curly quote
5614
+		"\xe2\x80\x9d", // right double curly quote
5615 5615
 	);
5616 5616
 
5617 5617
 	// windows 1252 / iso equivalents
@@ -5627,13 +5627,13 @@  discard block
 block discarded – undo
5627 5627
 
5628 5628
 	// safe replacements
5629 5629
 	$replacechars = array(
5630
-		',',	// &sbquo;
5631
-		',,',	// &bdquo;
5632
-		'...',	// &hellip;
5633
-		"'",	// &lsquo;
5634
-		"'",	// &rsquo;
5635
-		'"',	// &ldquo;
5636
-		'"',	// &rdquo;
5630
+		',', // &sbquo;
5631
+		',,', // &bdquo;
5632
+		'...', // &hellip;
5633
+		"'", // &lsquo;
5634
+		"'", // &rsquo;
5635
+		'"', // &ldquo;
5636
+		'"', // &rdquo;
5637 5637
 	);
5638 5638
 
5639 5639
 	if ($context['utf8'])
@@ -6800,7 +6800,7 @@  discard block
 block discarded – undo
6800 6800
 			EXISTS (
6801 6801
 				SELECT bpv.id_board
6802 6802
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6803
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
6803
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
6804 6804
 					AND bpv.deny = 0
6805 6805
 					AND bpv.id_board = b.id_board
6806 6806
 			)';
@@ -6810,7 +6810,7 @@  discard block
 block discarded – undo
6810 6810
 			AND NOT EXISTS (
6811 6811
 				SELECT bpv.id_board
6812 6812
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6813
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
6813
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
6814 6814
 					AND bpv.deny = 1
6815 6815
 					AND bpv.id_board = b.id_board
6816 6816
 			)';
@@ -7081,8 +7081,8 @@  discard block
 block discarded – undo
7081 7081
 	$i = 0;
7082 7082
 	while (empty($done))
7083 7083
 	{
7084
-		if (strpos($format, '{'. --$i . '}') !== false)
7085
-			$replacements['{'. $i . '}'] = array_pop($list);
7084
+		if (strpos($format, '{' . --$i . '}') !== false)
7085
+			$replacements['{' . $i . '}'] = array_pop($list);
7086 7086
 		else
7087 7087
 			$done = true;
7088 7088
 	}
@@ -7092,8 +7092,8 @@  discard block
 block discarded – undo
7092 7092
 	$i = 0;
7093 7093
 	while (empty($done))
7094 7094
 	{
7095
-		if (strpos($format, '{'. ++$i . '}') !== false)
7096
-			$replacements['{'. $i . '}'] = array_shift($list);
7095
+		if (strpos($format, '{' . ++$i . '}') !== false)
7096
+			$replacements['{' . $i . '}'] = array_shift($list);
7097 7097
 		else
7098 7098
 			$done = true;
7099 7099
 	}
Please login to merge, or discard this patch.
other/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -959,7 +959,7 @@
 block discarded – undo
959 959
 	$incontext['continue'] = 1;
960 960
 
961 961
 	// Check Postgres setting
962
-	if ( $db_type === 'postgresql')
962
+	if ($db_type === 'postgresql')
963 963
 	{
964 964
 		load_database();
965 965
 		$result = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.