Passed
Push — release-2.1 ( e31624...391b74 )
by Mathias
26:03 queued 19:58
created
Sources/RemoveTopic.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -569,9 +569,11 @@
 block discarded – undo
569 569
 	updateSettings(array(
570 570
 		'calendar_updated' => time(),
571 571
 	));
572
-	if (!empty($cache_enable) && $cache_enable >= 3) {
572
+	if (!empty($cache_enable) && $cache_enable >= 3)
573
+	{
573 574
 		cache_put_data('board-' . $recycle_board, null);
574
-		foreach ($adjustBoards as $stats) {
575
+		foreach ($adjustBoards as $stats)
576
+		{
575 577
 			cache_put_data('board-' . $stats['id_board'], null);
576 578
 		}
577 579
 	}
Please login to merge, or discard this patch.
Sources/tasks/UpdateUnicode.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 		if (!@touch($this->temp_dir . DIRECTORY_SEPARATOR . 'lock'))
417 417
 			return true;
418 418
 
419
-		register_shutdown_function(function () {
419
+		register_shutdown_function(function() {
420 420
 			if (file_exists($this->temp_dir . DIRECTORY_SEPARATOR . 'lock'))
421 421
 				unlink($this->temp_dir . DIRECTORY_SEPARATOR . 'lock');
422 422
 		});
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 					$func_code = rtrim($func_code);
903 903
 
904 904
 					$func_code .= $nextline . implode(' .' . $nextline, array_map(
905
-						function ($v)
905
+						function($v)
906 906
 						{
907 907
 							return var_export($v, true);
908 908
 						},
@@ -1833,7 +1833,7 @@  discard block
 block discarded – undo
1833 1833
 			}
1834 1834
 		}
1835 1835
 		// This sort works decently well to ensure widely used scripts are ranked before rare scripts.
1836
-		uasort($this->funcs['utf8_regex_joining_type']['data'], function ($a, $b)
1836
+		uasort($this->funcs['utf8_regex_joining_type']['data'], function($a, $b)
1837 1837
 		{
1838 1838
 			if ($a['stats']['age'] == $b['stats']['age'])
1839 1839
 			{
@@ -1921,7 +1921,7 @@  discard block
 block discarded – undo
1921 1921
 			}
1922 1922
 		}
1923 1923
 		// Again, sort commonly used scripts before rare scripts.
1924
-		uasort($this->funcs['utf8_regex_indic']['data'], function ($a, $b)
1924
+		uasort($this->funcs['utf8_regex_indic']['data'], function($a, $b)
1925 1925
 		{
1926 1926
 			if ($a['stats']['age'] == $b['stats']['age'])
1927 1927
 			{
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -416,7 +416,8 @@
 block discarded – undo
416 416
 		if (!@touch($this->temp_dir . DIRECTORY_SEPARATOR . 'lock'))
417 417
 			return true;
418 418
 
419
-		register_shutdown_function(function () {
419
+		register_shutdown_function(function ()
420
+		{
420 421
 			if (file_exists($this->temp_dir . DIRECTORY_SEPARATOR . 'lock'))
421 422
 				unlink($this->temp_dir . DIRECTORY_SEPARATOR . 'lock');
422 423
 		});
Please login to merge, or discard this patch.
Sources/Reports.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@
 block discarded – undo
419 419
 
420 420
 	$board_names = array_reduce(
421 421
 		$boards,
422
-		function (array $accumulator, array $board)
422
+		function(array $accumulator, array $board)
423 423
 		{
424 424
 			$accumulator[$board['profile']][] = $board['name'];
425 425
 
Please login to merge, or discard this patch.
Sources/MoveTopic.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -708,9 +708,11 @@
 block discarded – undo
708 708
 	updateSettings(array(
709 709
 		'calendar_updated' => time(),
710 710
 	));
711
-	if (!empty($cache_enable) && $cache_enable >= 3) {
711
+	if (!empty($cache_enable) && $cache_enable >= 3)
712
+	{
712 713
 		cache_put_data('board-' . $toBoard, null);
713
-		foreach ($fromBoards as $stats) {
714
+		foreach ($fromBoards as $stats)
715
+		{
714 716
 			cache_put_data('board-' . $stats['id_board'], null);
715 717
 		}
716 718
 	}
Please login to merge, or discard this patch.
Sources/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
 	 * @return boolean Whether the info was successfully written
173 173
 	 */
174 174
 	#[\ReturnTypeWillChange]
175
-	public function write(/*PHP 8.0 string*/$id,/*PHP 8.0 string */ $data): bool
175
+	public function write(/*PHP 8.0 string*/$id, /*PHP 8.0 string */ $data): bool
176 176
 	{
177 177
 		global $smcFunc;
178 178
 
Please login to merge, or discard this patch.
other/update_unicode_data.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,9 @@
 block discarded – undo
56 56
 }
57 57
 
58 58
 // This should never be needed, but set it for completeness.
59
-$smcFunc['db_insert'] = function($method, $table, $columns, $data, $keys, $returnmode = 0, $connection = null) {};
59
+$smcFunc['db_insert'] = function($method, $table, $columns, $data, $keys, $returnmode = 0, $connection = null)
60
+{
61
+};
60 62
 
61 63
 // 3. Do the job.
62 64
 require_once($sourcedir . '/Subs.php');
Please login to merge, or discard this patch.
other/update_timezones.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 				else
454 454
 				{
455 455
 					// First, parse the existing code into usable chunks.
456
-					$search_for = str_replace('array\(', 'array(\((?'.'>[^()]|(?1))*\)),', $search_for);
456
+					$search_for = str_replace('array\(', 'array(\((?' . '>[^()]|(?1))*\)),', $search_for);
457 457
 
458 458
 					preg_match('~' . $search_for . '~', $file_contents, $matches);
459 459
 
@@ -463,14 +463,14 @@  discard block
 block discarded – undo
463 463
 					$existing_code = $matches[0];
464 464
 					$existing_inner = $matches[1];
465 465
 
466
-					preg_match_all('~(?:\h*//[^\n]*\n)*\h*array(\((?'.'>[^()]|(?1))*\)),~', $existing_inner, $matches);
466
+					preg_match_all('~(?:\h*//[^\n]*\n)*\h*array(\((?' . '>[^()]|(?1))*\)),~', $existing_inner, $matches);
467 467
 					$existing_entries = $matches[0];
468 468
 
469 469
 					// Now do the same with the generated code.
470 470
 					preg_match('~' . $search_for . '~', $code, $matches);
471 471
 					$new_inner = $matches[1];
472 472
 
473
-					preg_match_all('~(?:\h*//[^\n]*\n)*\h*array(\((?'.'>[^()]|(?1))*\)),~', $new_inner, $matches);
473
+					preg_match_all('~(?:\h*//[^\n]*\n)*\h*array(\((?' . '>[^()]|(?1))*\)),~', $new_inner, $matches);
474 474
 					$new_entries = $matches[0];
475 475
 
476 476
 					// This is what we will ultimately save.
@@ -1407,7 +1407,7 @@  discard block
 block discarded – undo
1407 1407
 						// Filter out the canonical tzid.
1408 1408
 						$shared_options = array_filter(
1409 1409
 							$shared_options,
1410
-							function ($tzid) use ($option)
1410
+							function($tzid) use ($option)
1411 1411
 							{
1412 1412
 								return $tzid !== $this->zones[$option]['canonical'];
1413 1413
 							}
@@ -2230,7 +2230,7 @@  discard block
 block discarded – undo
2230 2230
 		// A human should still check our suggestion, though.
2231 2231
 		uasort(
2232 2232
 			$possible_fallback_zones,
2233
-			function ($a, $b) use ($new_zone)
2233
+			function($a, $b) use ($new_zone)
2234 2234
 			{
2235 2235
 				$cc = $new_zone['country_code'];
2236 2236
 
@@ -2533,7 +2533,7 @@  discard block
 block discarded – undo
2533 2533
 		{
2534 2534
 			$date_string = preg_replace_callback(
2535 2535
 				"/(\d{4})\h+($month)\h+($weekday)<=(\d+)/",
2536
-				function ($matches)
2536
+				function($matches)
2537 2537
 				{
2538 2538
 					$d = new \DateTime($matches[2] . ' ' . $matches[4] . ' ' . $matches[1]);
2539 2539
 					$d->add(new \DateInterval('P1D'));
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 
370 370
 				if (preg_match('~\n\h+\K\'' . $new_tzid . '\'(?=\s+=>\s+\'\w+\',)~', $file_contents))
371 371
 				{
372
-					echo "Renamed $old_tzid to $new_tzid in get_tzid_metazones().\n\n";
372
+					echo "renamed $old_tzid to $new_tzid in get_tzid_metazones().\n\n";
373 373
 
374 374
 					$this->files_updated = true;
375 375
 				}
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 
383 383
 				if (preg_match('~\n\h+\K\'' . $new_tzid . '\'(?=,\n)~', $file_contents))
384 384
 				{
385
-					echo "Renamed $old_tzid to $new_tzid in get_sorted_tzids_for_country().\n\n";
385
+					echo "renamed $old_tzid to $new_tzid in get_sorted_tzids_for_country().\n\n";
386 386
 
387 387
 					$this->files_updated = true;
388 388
 				}
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 
425 425
 					if (preg_match('~\n\h+\K\'' . $tzid . '\'(?=,\n)~', $file_contents))
426 426
 					{
427
-						echo "Added $tzid to $cc in get_sorted_tzids_for_country().\n\n";
427
+						echo "added $tzid to $cc in get_sorted_tzids_for_country().\n\n";
428 428
 
429 429
 						$this->files_updated = true;
430 430
 					}
Please login to merge, or discard this patch.