Passed
Pull Request — development (#3780)
by Spuds
07:38
created
sources/subs/ProfileHistory.subs.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 			'guest_title' => $txt['guest_title'],
74 74
 		))
75 75
 	)->fetch_callback(
76
-		function ($row) use (&$error_messages) {
76
+		function($row) use (&$error_messages) {
77 77
 			$error_messages[] = array(
78 78
 				'ip' => $row['ip'],
79 79
 				'member_link' => $row['id_member'] > 0 ? '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member']]) . '">' . $row['display_name'] . '</a>' : $row['display_name'],
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 		LIMIT ' . $items_per_page . '  OFFSET ' . $start,
144 144
 		array_merge($where_vars, array())
145 145
 	)->fetch_callback(
146
-		function ($row) use (&$messages) {
146
+		function($row) use (&$messages) {
147 147
 			$messages[] = array(
148 148
 				'ip' => $row['poster_ip'],
149 149
 				'member_link' => empty($row['id_member']) ? $row['display_name'] : '<a href="' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_member']]) . '">' . $row['display_name'] . '</a>',
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 			'current_member' => $where_vars['current_member'],
219 219
 		)
220 220
 	)->fetch_callback(
221
-		function ($row) use (&$logins) {
221
+		function($row) use (&$logins) {
222 222
 			$logins[] = array(
223 223
 				'time' => standardTime($row['time']),
224 224
 				'html_time' => htmlTime($row['time']),
Please login to merge, or discard this patch.
sources/subs/Maintenance.subs.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 			'increment' => $increment - 1,
144 144
 		)
145 145
 	)->fetch_callback(
146
-		function ($row) {
146
+		function($row) {
147 147
 			return $row['id_msg'];
148 148
 		}
149 149
 	);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 			'messages' => $msg,
175 175
 		)
176 176
 	)->fetch_callback(
177
-		function ($row) use ($scripturl) {
177
+		function($row) use ($scripturl) {
178 178
 			return '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'] . '">' . $row['subject'] . '</a>';
179 179
 		}
180 180
 	);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 			'max_id' => $start + $increment,
260 260
 		)
261 261
 	)->fetch_callback(
262
-		function ($row) {
262
+		function($row) {
263 263
 			setTopicAttribute($row['id_topic'], array('num_replies' => $row['real_num_replies']));
264 264
 		}
265 265
 	);
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 			'max_id' => $start + $increment,
294 294
 		)
295 295
 	)->fetch_callback(
296
-		function ($row) {
296
+		function($row) {
297 297
 			setTopicAttribute($row['id_topic'], array('unapproved_posts' => $row['real_unapproved_posts']));
298 298
 		}
299 299
 	);
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 					'is_approved' => 1,
364 364
 				)
365 365
 			)->fetch_callback(
366
-				function ($row) use ($db) {
366
+				function($row) use ($db) {
367 367
 					$db->query('', '
368 368
 					UPDATE {db_prefix}boards
369 369
 					SET 
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 					'id_topic_max' => $start + $increment,
394 394
 				)
395 395
 			)->fetch_callback(
396
-				function ($row) use ($db) {
396
+				function($row) use ($db) {
397 397
 					$db->query('', '
398 398
 					UPDATE {db_prefix}boards
399 399
 					SET 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 					'is_approved' => 0,
424 424
 				)
425 425
 			)->fetch_callback(
426
-				function ($row) use ($db) {
426
+				function($row) use ($db) {
427 427
 					$db->query('', '
428 428
 					UPDATE {db_prefix}boards
429 429
 					SET unapproved_posts = unapproved_posts + {int:unapproved_posts}
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 					'id_topic_max' => $start + $increment,
453 453
 				)
454 454
 			)->fetch_callback(
455
-				function ($row) use ($db) {
455
+				function($row) use ($db) {
456 456
 					$db->query('', '
457 457
 					UPDATE {db_prefix}boards
458 458
 					SET unapproved_topics = unapproved_topics + {int:real_unapproved_topics}
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 			'is_not_deleted' => 0,
495 495
 		)
496 496
 	)->fetch_callback(
497
-		function ($row) {
497
+		function($row) {
498 498
 			updateMemberData($row['id_member'], array('personal_messages' => $row['real_num']));
499 499
 		}
500 500
 	);
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 			'is_not_read' => 0,
513 513
 		)
514 514
 	)->fetch_callback(
515
-		function ($row) {
515
+		function($row) {
516 516
 			updateMemberData($row['id_member'], array('unread_messages' => $row['real_num']));
517 517
 		}
518 518
 	);
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 			'id_msg_max' => $start + $increment,
543 543
 		)
544 544
 	)->fetch_callback(
545
-		function ($row) use (&$boards) {
545
+		function($row) use (&$boards) {
546 546
 			$boards[$row['id_board']][] = $row['id_msg'];
547 547
 		}
548 548
 	);
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 			'is_approved' => 1,
583 583
 		)
584 584
 	)->fetch_callback(
585
-		function ($row) use (&$realBoardCounts) {
585
+		function($row) use (&$realBoardCounts) {
586 586
 			$realBoardCounts[$row['id_board']] = $row['local_last_msg'];
587 587
 		}
588 588
 	);
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 		FROM {db_prefix}boards',
595 595
 		array()
596 596
 	)->fetch_callback(
597
-		function ($row) use (&$resort_me, $realBoardCounts) {
597
+		function($row) use (&$resort_me, $realBoardCounts) {
598 598
 			$row['local_last_msg'] = $realBoardCounts[$row['id_board']] ?? 0;
599 599
 			$resort_me[$row['child_level']][] = $row;
600 600
 		}
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 			'id_board' => $id_board,
694 694
 		)
695 695
 	)->fetch_callback(
696
-		function ($row) {
696
+		function($row) {
697 697
 			return $row['id_topic'];
698 698
 		}
699 699
 	);
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
 			'recycle' => $modSettings['recycle_board']
805 805
 		)
806 806
 	)->fetch_callback(
807
-		function ($row) {
807
+		function($row) {
808 808
 			// Set the post count to zero for any delinquents we may have found
809 809
 			return $row['id_member'];
810 810
 		}
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 		FROM {db_prefix}membergroups',
851 851
 		array()
852 852
 	)->fetch_callback(
853
-		function ($row) use (&$where, &$where_vars, $groups) {
853
+		function($row) use (&$where, &$where_vars, $groups) {
854 854
 			// Avoid this one?
855 855
 			if (!in_array($row['id_group'], $groups))
856 856
 			{
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 		WHERE ' . $where,
887 887
 		$where_vars
888 888
 	)->fetch_callback(
889
-		function ($row) use (&$members, $groups) {
889
+		function($row) use (&$members, $groups) {
890 890
 			if (!$row['is_mod'] || !in_array(3, $groups))
891 891
 			{
892 892
 				$members[] = $row['id_member'];
Please login to merge, or discard this patch.
sources/subs/Poll.subs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 			'not_guest' => 0,
314 314
 		)
315 315
 	)->fetch_callback(
316
-		function ($row) use (&$pollOptions) {
316
+		function($row) use (&$pollOptions) {
317 317
 			$row['label'] = censor($row['label']);
318 318
 			$pollOptions[$row['id_choice']] = $row;
319 319
 		}
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 			'id_poll' => $id_poll,
345 345
 		)
346 346
 	)->fetch_callback(
347
-		function ($row) use (&$pollOptions) {
347
+		function($row) use (&$pollOptions) {
348 348
 			$row['label'] = censor($row['label']);
349 349
 			$pollOptions[$row['id_choice']] = $row;
350 350
 		}
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 			'id_poll' => $id_poll,
728 728
 		)
729 729
 	)->fetch_callback(
730
-		function ($row) use (&$pollOptions) {
730
+		function($row) use (&$pollOptions) {
731 731
 			$pollOptions[] = $row[0];
732 732
 		}
733 733
 	);
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
 			'id_poll' => $id_poll,
793 793
 		)
794 794
 	)->fetch_callback(
795
-		function ($row) use (&$choices, &$number) {
795
+		function($row) use (&$choices, &$number) {
796 796
 			$row['label'] = censor($row['label']);
797 797
 			$choices[$row['id_choice']] = array(
798 798
 				'id' => $row['id_choice'],
Please login to merge, or discard this patch.
sources/subs/Smileys.subs.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			'smiley_list' => $smileys,
44 44
 		]
45 45
 	)->fetch_callback(
46
-		function ($row) use (&$found) {
46
+		function($row) use (&$found) {
47 47
 			$found[] = $row['filename'];
48 48
 		}
49 49
 	);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 			'current_smiley' => $id,
213 213
 		]
214 214
 	)->fetch_callback(
215
-		function ($row) use (&$current_smiley)
215
+		function($row) use (&$current_smiley)
216 216
 		{
217 217
 			$current_smiley = [
218 218
 				'id' => $row['id'],
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 			'hidden' => 1,
381 381
 		]
382 382
 	)->fetch_callback(
383
-		function ($row) use (&$smileys) {
383
+		function($row) use (&$smileys) {
384 384
 			global $context;
385 385
 
386 386
 			$location = empty($row['hidden']) ? 'postform' : 'popup';
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
 {
630 630
 	global $modSettings;
631 631
 
632
-	$smiley_types =  ['jpg', 'gif', 'jpeg', 'png', 'webp', 'svg'];
632
+	$smiley_types = ['jpg', 'gif', 'jpeg', 'png', 'webp', 'svg'];
633 633
 	$smileys_dir = empty($modSettings['smileys_dir']) ? BOARDDIR . '/smileys' : $modSettings['smileys_dir'];
634 634
 	$fileFunc = FileFunctions::instance();
635 635
 	$extensionTypes = [];
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 		ORDER BY smiley_row, smiley_order',
688 688
 		[]
689 689
 	)->fetch_callback(
690
-		function ($row) use (&$smileys, $context) {
690
+		function($row) use (&$smileys, $context) {
691 691
 			$filename = $row['filename'] . '.' . $context['smiley_extension'];
692 692
 			if (possibleSmileEmoji($row))
693 693
 			{
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 		if ($test !== $row['filename'] && preg_match('~data-emoji-code=["\'](.*?)["\']~', $test, $result))
739 739
 		{
740 740
 			// Valid emoji, set the filename to the proper emoji file and type
741
-			$row['emoji'] =  $result[1];
741
+			$row['emoji'] = $result[1];
742 742
 			return true;
743 743
 		}
744 744
 	}
Please login to merge, or discard this patch.
sources/ElkArte/SettingsForm/SettingsFormAdapter/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -486,7 +486,7 @@
 block discarded – undo
486 486
 	{
487 487
 		// Now loop through the remaining (database-based) settings.
488 488
 		$this->configVars = array_map(
489
-			static function ($configVar) {
489
+			static function($configVar) {
490 490
 				// We just saved the file-based settings, so skip their definitions.
491 491
 				if (!is_array($configVar) || $configVar[2] === 'file')
492 492
 				{
Please login to merge, or discard this patch.
sources/ElkArte/Search/API/Sphinxql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@
 block discarded – undo
275 275
 	{
276 276
 		global $modSettings;
277 277
 
278
-		set_error_handler(static function () { /* ignore errors */ });
278
+		set_error_handler(static function() { /* ignore errors */ });
279 279
 		try
280 280
 		{
281 281
 			$mySphinx = mysqli_connect(($modSettings['sphinx_searchd_server'] === 'localhost' ? '127.0.0.1' : $modSettings['sphinx_searchd_server']), '', '', '', (int) $modSettings['sphinxql_searchd_port']);
Please login to merge, or discard this patch.
sources/ElkArte/Search/SearchParams.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 		// Test for gzuncompress failing, our ErrorException will die on any E_WARNING with no
92 92
 		// Exception, so turn it off/on for this check.
93
-		set_error_handler(static function () { /* ignore errors */ });
93
+		set_error_handler(static function() { /* ignore errors */ });
94 94
 		try
95 95
 		{
96 96
 			$check = gzuncompress($temp_params);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
 		// Due to some potential browser/server limitations, attempt to compress
131 131
 		// old IE's 2083 character limit, we have to compress long search
132
-		set_error_handler(static function () { /* ignore errors */ });
132
+		set_error_handler(static function() { /* ignore errors */ });
133 133
 		try
134 134
 		{
135 135
 			$compressed = gzcompress($encoded);
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 	 */
559 559
 	public function setSortAndDirection($params)
560 560
 	{
561
-		$sort_columns = ['relevance', 'num_replies', 'id_msg',];
561
+		$sort_columns = ['relevance', 'num_replies', 'id_msg', ];
562 562
 
563 563
 		// Allow integration to add additional sort columns
564 564
 		call_integration_hook('integrate_search_sort_columns', array(&$sort_columns));
Please login to merge, or discard this patch.
sources/ElkArte/Http/FsockFetchWebdata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
 		// no socket, then we need to open one to do much
211 211
 		if (!is_resource($this->_fp))
212 212
 		{
213
-			set_error_handler(static function () { /* ignore errors */ });
213
+			set_error_handler(static function() { /* ignore errors */ });
214 214
 			try
215 215
 			{
216 216
 				$this->_fp = fsockopen($this->_url['host'], $this->_url['port'], $errno, $errstr, 5);
Please login to merge, or discard this patch.
sources/ElkArte/Emoji.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	public function emojiFromHTML($string)
164 164
 	{
165 165
 		// If there are 4byte encoded values &#x1f123, change those back to utf8 characters
166
-		return preg_replace_callback(self::POSSIBLE_HTML_EMOJI, static function ($match) {
166
+		return preg_replace_callback(self::POSSIBLE_HTML_EMOJI, static function($match) {
167 167
 			$replace = html_entity_decode($match[0], ENT_NOQUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');
168 168
 
169 169
 			// The Fitzpatrick Scale modifiers are not (well) supported across all graphics sets.  For now
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 			return $string;
265 265
 		}
266 266
 
267
-		$result = preg_replace_callback($this->emoji_regex, function ($match) {
267
+		$result = preg_replace_callback($this->emoji_regex, function($match) {
268 268
 			$hex_str = $this->unicodeCharacterToNumber($match[0]);
269 269
 			$found = $this->findEmojiByCode($hex_str);
270 270
 
Please login to merge, or discard this patch.