Passed
Push — release-2.1 ( 0e5bfc...908430 )
by Mathias
07:53 queued 12s
created
Sources/Subs-Db-postgresql.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -926,7 +926,8 @@  discard block
 block discarded – undo
926 926
 		$error_array[2] = null;
927 927
 
928 928
 	if(empty($db_persist))
929
-	{ // without pooling
929
+	{
930
+// without pooling
930 931
 		if (empty($pg_error_data_prep))
931 932
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
932 933
 				'INSERT INTO ' . $db_prefix . 'log_errors
@@ -937,7 +938,8 @@  discard block
 block discarded – undo
937 938
 		pg_execute($db_connection, 'smf_log_errors', $error_array);
938 939
 	}
939 940
 	else
940
-	{ //with pooling
941
+	{
942
+//with pooling
941 943
 		$pg_error_data_prep = pg_prepare($db_connection, '',
942 944
 			'INSERT INTO ' . $db_prefix . 'log_errors
943 945
 				(id_member, log_time, ip, url, message, session, error_type, file, line, backtrace)
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/Post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1283,7 +1283,7 @@
 block discarded – undo
1283 1283
 	if ($context['can_post_attachment'])
1284 1284
 	{
1285 1285
 		$acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(
1286
-			function ($val) use ($smcFunc)
1286
+			function($val) use ($smcFunc)
1287 1287
 			{
1288 1288
 				return !empty($val) ? ('.' . $smcFunc['htmltrim']($val)) : '';
1289 1289
 			},
Please login to merge, or discard this patch.
Sources/News.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2205,7 +2205,7 @@
 block discarded – undo
2205 2205
 					function($a, $b)
2206 2206
 					{
2207 2207
 						if ($a['filesize'] == $b['filesize'])
2208
-					        return 0;
2208
+							return 0;
2209 2209
 
2210 2210
 						return ($a['filesize'] < $b['filesize']) ? -1 : 1;
2211 2211
 					}
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	);
92 92
 	foreach (array('action', 'sa', 'type', 'board', 'boards', 'c', 'u', 'limit', 'offset') as $var)
93 93
 		if (isset($_GET[$var]))
94
-			$feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';' ) . $var . '=' . $_GET[$var];
94
+			$feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';') . $var . '=' . $_GET[$var];
95 95
 
96 96
 	// Handle the cases where a board, boards, or category is asked for.
97 97
 	$query_this_board = 1;
@@ -303,17 +303,17 @@  discard block
 block discarded – undo
303 303
 	 * namespaces, which could cause it to mangle the XML horrifically
304 304
 	 * during processing.
305 305
 	 */
306
-	$smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/' . $subaction;
306
+	$smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/' . $subaction;
307 307
 
308 308
 	// Allow mods to add extra namespaces and tags to the feed/channel
309 309
 	$namespaces = array(
310 310
 		'rss' => array(),
311
-		'rss2' => array('atom' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'),
312
-		'atom' => array('' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'),
311
+		'rss2' => array('atom' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'),
312
+		'atom' => array('' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'),
313 313
 		'rdf' => array(
314
-			'' => 'htt'.'p:/'.'/purl.o'.'rg/rss/1.0/',
315
-			'rdf' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/02/22-rdf-syntax-ns#',
316
-			'dc' => 'htt'.'p:/'.'/purl.o'.'rg/dc/elements/1.1/',
314
+			'' => 'htt' . 'p:/' . '/purl.o' . 'rg/rss/1.0/',
315
+			'rdf' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/02/22-rdf-syntax-ns#',
316
+			'dc' => 'htt' . 'p:/' . '/purl.o' . 'rg/dc/elements/1.1/',
317 317
 		),
318 318
 		'smf' => array(
319 319
 			'smf' => $smf_ns,
@@ -2141,7 +2141,7 @@  discard block
 block discarded – undo
2141 2141
 			m.id_msg, m.id_topic, m.id_board, m.id_member, m.poster_email, m.poster_ip,
2142 2142
 			m.poster_time, m.subject, m.modified_time, m.modified_name, m.modified_reason, m.body,
2143 2143
 			m.likes, m.approved, m.smileys_enabled
2144
-		FROM {db_prefix}messages AS m' . ($modSettings['postmod_active'] && !$show_all ?'
2144
+		FROM {db_prefix}messages AS m' . ($modSettings['postmod_active'] && !$show_all ? '
2145 2145
 			INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)' : '') . '
2146 2146
 		WHERE m.id_member = {int:uid}
2147 2147
 			AND m.id_msg > {int:start_after}
Please login to merge, or discard this patch.
Sources/ManagePermissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1840,7 +1840,7 @@
 block discarded – undo
1840 1840
 		// Make sure this is an array of integers
1841 1841
 		$excluded_groups = array_filter(
1842 1842
 			(array) $excluded_groups,
1843
-			function ($v)
1843
+			function($v)
1844 1844
 			{
1845 1845
 				return is_int($v) || is_string($v) && (string) intval($v) === $v;
1846 1846
 			}
Please login to merge, or discard this patch.
Sources/Profile-View.php 1 patch
Spacing   +6 added lines, -6 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,
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
 	// Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.)
363 363
 	$formats = array_map(
364
-		function ($format) use ($scripturl)
364
+		function($format) use ($scripturl)
365 365
 		{
366 366
 			$format['link'] = str_replace('{scripturl}', $scripturl, $format['link']);
367 367
 			$format['text'] = str_replace('{scripturl}', $scripturl, $format['text']);
@@ -1176,20 +1176,20 @@  discard block
 block discarded – undo
1176 1176
 		$context['posts'][$key]['quickbuttons'] = array(
1177 1177
 			'reply' => array(
1178 1178
 				'label' => $txt['reply'],
1179
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
1179
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
1180 1180
 				'icon' => 'reply_button',
1181 1181
 				'show' => $post['can_reply']
1182 1182
 			),
1183 1183
 			'quote' => array(
1184 1184
 				'label' => $txt['quote_action'],
1185
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
1185
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
1186 1186
 				'icon' => 'quote',
1187 1187
 				'show' => $post['can_quote']
1188 1188
 			),
1189 1189
 			'remove' => array(
1190 1190
 				'label' => $txt['remove'],
1191
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1192
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'"',
1191
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1192
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '"',
1193 1193
 				'class' => 'you_sure',
1194 1194
 				'icon' => 'remove_button',
1195 1195
 				'show' => $post['can_delete']
Please login to merge, or discard this patch.
Sources/Mentions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@
 block discarded – undo
251 251
 			return array();
252 252
 
253 253
 		// preparse code does a few things which might mess with our parsing
254
-		$body = htmlspecialchars_decode(preg_replace('~<br\s*/?'.'>~', "\n", str_replace('&nbsp;', ' ', $body)), ENT_QUOTES);
254
+		$body = htmlspecialchars_decode(preg_replace('~<br\s*/?' . '>~', "\n", str_replace('&nbsp;', ' ', $body)), ENT_QUOTES);
255 255
 
256 256
 		// Remove quotes, we don't want to get double mentions.
257 257
 		$body = preg_replace('~\[quote[^\]]*\](?' . '>(?' . '>[^\[]|\[(?!/?quote[^\]]*\]))|(?0))*\[/quote\]~', '', $body);
Please login to merge, or discard this patch.
Sources/tasks/CreatePost-Notify.php 2 patches
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 			}
175 175
 		}
176 176
 
177
-		$unnotified = array_filter($this->members['watching'], function ($member) {
177
+		$unnotified = array_filter($this->members['watching'], function($member) {
178 178
 			return empty($member['sent']);
179 179
 		});
180 180
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 			$this->members['mentioned'] = array_intersect_key($this->members['mentioned'], $unnotified);
188 188
 
189 189
 			// Notifications about modified posts only go to members who were mentioned or quoted
190
-			$this->members['watching'] = $type == 'edit' ? array(): $unnotified;
190
+			$this->members['watching'] = $type == 'edit' ? array() : $unnotified;
191 191
 
192 192
 			// If this post has no quotes or mentions, just delete any obsolete alerts and bail out.
193 193
 			if (empty($this->members['quoted']) && empty($this->members['mentioned']))
@@ -500,8 +500,7 @@  discard block
 block discarded – undo
500 500
 			if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($this->prefs[$member_id]))
501 501
 			{
502 502
 				$pref = !empty($this->prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ?
503
-					$this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] :
504
-					(!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0);
503
+					$this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0);
505 504
 
506 505
 				$message_type = 'notification_' . $type;
507 506
 
@@ -520,8 +519,7 @@  discard block
 block discarded – undo
520 519
 			elseif ($type == 'topic')
521 520
 			{
522 521
 				$pref = !empty($this->prefs[$member_id]['board_notify_' . $topicOptions['board']]) ?
523
-					$this->prefs[$member_id]['board_notify_' . $topicOptions['board']] :
524
-					(!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0);
522
+					$this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0);
525 523
 
526 524
 				$content_type = 'board';
527 525
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,8 @@
 block discarded – undo
174 174
 			}
175 175
 		}
176 176
 
177
-		$unnotified = array_filter($this->members['watching'], function ($member) {
177
+		$unnotified = array_filter($this->members['watching'], function ($member)
178
+		{
178 179
 			return empty($member['sent']);
179 180
 		});
180 181
 
Please login to merge, or discard this patch.
Sources/tasks/ExportProfileData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 		$feed_meta = array(
205 205
 			'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']),
206 206
 			'desc' => sentence_list(array_map(
207
-				function ($datatype) use ($txt)
207
+				function($datatype) use ($txt)
208 208
 				{
209 209
 					return $txt[$datatype];
210 210
 				},
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
 					'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"',
727 727
 				),
728 728
 				$returnContext
729
-			) . $hidden_orig_link . '</span>' ;
729
+			) . $hidden_orig_link . '</span>';
730 730
 		}
731 731
 		elseif (strpos($currentAttachment['mime_type'], 'video/') === 0)
732 732
 		{
Please login to merge, or discard this patch.
Sources/Subs-Timezones.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1716,7 +1716,7 @@
 block discarded – undo
1716 1716
 		{
1717 1717
 			usort(
1718 1718
 				$fallbacks[$tzid],
1719
-				function ($a, $b)
1719
+				function($a, $b)
1720 1720
 				{
1721 1721
 					return $a['ts'] > $b['ts'];
1722 1722
 				}
Please login to merge, or discard this patch.