Passed
Push — release-2.1 ( 4017f8...859b2c )
by Mathias
08:28 queued 12s
created
Sources/Load.php 1 patch
Braces   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	// Set a list of common functions.
105 105
 	$ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);';
106 106
 	$ent_check = empty($modSettings['disableEntityCheck']) ? function($string)
107
-		{
107
+	{
108 108
 			$string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);
109 109
 			return $string;
110 110
 		} : function($string)
@@ -929,7 +929,6 @@  discard block
 block discarded – undo
929 929
 			$user_info_min[$row['id_member']]['time_offset'] = ($tz_user->getOffset($time_user) -
930 930
 					$tz_system->getOffset($time_system)) / 3600;
931 931
 		}
932
-
933 932
 		else
934 933
 			$user_info_min[$row['id_member']]['time_offset'] = empty($row['time_offset']) ? 0 : $row['time_offset'];
935 934
 	}
@@ -1657,7 +1656,6 @@  discard block
 block discarded – undo
1657 1656
 			$time_user = new DateTime('now', $tz_user);
1658 1657
 			$profile['time_offset'] = ($tz_user->getOffset($time_user) - $tz_system->getOffset($time_system)) / 3600;
1659 1658
 		}
1660
-
1661 1659
 		else
1662 1660
 		{
1663 1661
 			// !!! Compatibility.
@@ -2351,7 +2349,6 @@  discard block
 block discarded – undo
2351 2349
 		loadLanguage('index+Modifications');
2352 2350
 		$context['template_layers'] = array();
2353 2351
 	}
2354
-
2355 2352
 	else
2356 2353
 	{
2357 2354
 		// Custom templates to load, or just default?
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Braces   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -279,7 +279,6 @@  discard block
 block discarded – undo
279 279
 		$condition = 'id_member IN ({array_int:members})';
280 280
 		$parameters['members'] = $members;
281 281
 	}
282
-
283 282
 	elseif ($members === null)
284 283
 		$condition = '1=1';
285 284
 
@@ -382,11 +381,9 @@  discard block
 block discarded – undo
382 381
 				$val = $val . ' END';
383 382
 				$type = 'raw';
384 383
 			}
385
-
386 384
 			else
387 385
 				$val = alert_count($members, true);
388 386
 		}
389
-
390 387
 		elseif ($type == 'int' && ($val === '+' || $val === '-'))
391 388
 		{
392 389
 			$val = $var . ' ' . $val . ' 1';
@@ -2178,12 +2175,12 @@  discard block
 block discarded – undo
2178 2175
 			'tag' => 'cowsay',
2179 2176
 			'parameters' => array(
2180 2177
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2181
-					{
2178
+				{
2182 2179
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2183 2180
 					},
2184 2181
 				),
2185 2182
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2186
-					{
2183
+				{
2187 2184
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2188 2185
 					},
2189 2186
 				),
@@ -3290,7 +3287,7 @@  discard block
 block discarded – undo
3290 3287
 
3291 3288
 	// Replace away!
3292 3289
 	$message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements)
3293
-		{
3290
+	{
3294 3291
 			return $smileyPregReplacements[$matches[1]];
3295 3292
 		}, $message);
3296 3293
 }
@@ -4085,7 +4082,6 @@  discard block
 block discarded – undo
4085 4082
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4086 4083
 					$minSeed = $js_file['options']['seed'];
4087 4084
 			}
4088
-
4089 4085
 			else
4090 4086
 			{
4091 4087
 				echo '
@@ -6005,7 +6001,8 @@  discard block
 block discarded – undo
6005 6001
 			$zones[$tzkey]['tzid'] = $tzid;
6006 6002
 			$zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0);
6007 6003
 
6008
-			foreach ($tzinfo as $transition) {
6004
+			foreach ($tzinfo as $transition)
6005
+			{
6009 6006
 				$zones[$tzkey]['abbrs'][] = $transition['abbr'];
6010 6007
 			}
6011 6008
 
@@ -6090,7 +6087,8 @@  discard block
 block discarded – undo
6090 6087
 			$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : '');
6091 6088
 
6092 6089
 		// We don't want abbreviations like '+03' or '-11'.
6093
-		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr) {
6090
+		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr)
6091
+		{
6094 6092
 			return !strspn($abbr, '+-');
6095 6093
 		});
6096 6094
 		$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array();
@@ -6491,7 +6489,6 @@  discard block
 block discarded – undo
6491 6489
 			$isWritable = true;
6492 6490
 			break;
6493 6491
 		}
6494
-
6495 6492
 		else
6496 6493
 			@chmod($file, $val);
6497 6494
 	}
Please login to merge, or discard this patch.
Sources/Subs-Admin.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1229,7 +1229,8 @@  discard block
 block discarded – undo
1229 1229
 	}
1230 1230
 
1231 1231
 	// It's important to do the numbered ones before the named ones, or messes happen.
1232
-	uksort($substitutions, function($a, $b) {
1232
+	uksort($substitutions, function($a, $b)
1233
+	{
1233 1234
 		if (is_int($a) && is_int($b))
1234 1235
 			return $a > $b ? 1 : ($a < $b ? -1 : 0);
1235 1236
 		elseif (is_int($a))
@@ -1768,8 +1769,12 @@  discard block
 block discarded – undo
1768 1769
 		unset($mtime, $settingsFile, $settingsText);
1769 1770
 		$defined_vars = get_defined_vars();
1770 1771
 	}
1771
-	catch (Throwable $e) {}
1772
-	catch (ErrorException $e) {}
1772
+	catch (Throwable $e)
1773
+	{
1774
+}
1775
+	catch (ErrorException $e)
1776
+	{
1777
+}
1773 1778
 	if (isset($e))
1774 1779
 		return false;
1775 1780
 
@@ -1925,7 +1930,8 @@  discard block
 block discarded – undo
1925 1930
 	// For the same reason, replace literal returns and newlines with "\r" and "\n"
1926 1931
 	elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false))
1927 1932
 	{
1928
-		return strtr(preg_replace_callback('/[\r\n]+/', function($m) {
1933
+		return strtr(preg_replace_callback('/[\r\n]+/', function($m)
1934
+		{
1929 1935
 			return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \'';
1930 1936
 		}, $var), array("'' . " => '', " . ''" => ''));
1931 1937
 	}
Please login to merge, or discard this patch.