Passed
Push — release-2.1 ( 859b2c...bb7f39 )
by Mathias
06:54 queued 13s
created
Sources/ManageErrors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -355,8 +355,8 @@
 block discarded – undo
355 355
 	elseif (isset($_POST['delall']) && isset($filter))
356 356
 	{
357 357
 		// ip need a different placeholder type
358
-		$filter_type = $filter['variable'] == 'ip'? 'inet' : 'string';
359
-		$filter_op = $filter['variable'] == 'ip'? '=' : 'LIKE';
358
+		$filter_type = $filter['variable'] == 'ip' ? 'inet' : 'string';
359
+		$filter_op = $filter['variable'] == 'ip' ? '=' : 'LIKE';
360 360
 		$smcFunc['db_query']('', '
361 361
 			DELETE FROM {db_prefix}log_errors
362 362
 			WHERE ' . $filter['variable'] . ' ' . $filter_op . ' {' . $filter_type . ':filter}',
Please login to merge, or discard this patch.
Sources/Recent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -467,20 +467,20 @@
 block discarded – undo
467 467
 		$context['posts'][$key]['quickbuttons'] = array(
468 468
 			'reply' => array(
469 469
 				'label' => $txt['reply'],
470
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
470
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
471 471
 				'icon' => 'reply_button',
472 472
 				'show' => $post['can_reply']
473 473
 			),
474 474
 			'quote' => array(
475 475
 				'label' => $txt['quote_action'],
476
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
476
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
477 477
 				'icon' => 'quote',
478 478
 				'show' => $post['can_quote']
479 479
 			),
480 480
 			'delete' => array(
481 481
 				'label' => $txt['remove'],
482
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';recent;'.$context['session_var'].'='.$context['session_id'],
483
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'"',
482
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id'],
483
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '"',
484 484
 				'class' => 'you_sure',
485 485
 				'icon' => 'remove_button',
486 486
 				'show' => $post['can_delete']
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
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 		$feed_meta = array(
205 205
 			'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']),
206
-			'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))),
206
+			'desc' => sentence_list(array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))),
207 207
 			'author' => $mbname,
208 208
 			'source' => $scripturl . '?action=profile;u=' . $uid,
209 209
 			'self' => '', // Unused, but can't be null.
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 					'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"',
724 724
 				),
725 725
 				$returnContext
726
-			) . $hidden_orig_link . '</span>' ;
726
+			) . $hidden_orig_link . '</span>';
727 727
 		}
728 728
 		elseif (strpos($currentAttachment['mime_type'], 'video/') === 0)
729 729
 		{
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1721,7 +1721,7 @@  discard block
 block discarded – undo
1721 1721
 		{
1722 1722
 			// Avoid double separators and empty titled sections
1723 1723
 			$empty_section = true;
1724
-			for ($j=$i+1; $j < count($context['theme_options']); $j++)
1724
+			for ($j = $i + 1; $j < count($context['theme_options']); $j++)
1725 1725
 			{
1726 1726
 				// Found another separator, so we're done
1727 1727
 				if (!is_array($context['theme_options'][$j]))
@@ -2700,8 +2700,7 @@  discard block
 block discarded – undo
2700 2700
 		foreach ($context['post_errors'] as $error)
2701 2701
 		{
2702 2702
 			$text_key_error = $error == 'password_short' ?
2703
-				sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) :
2704
-				$txt['profile_error_' . $error];
2703
+				sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : $txt['profile_error_' . $error];
2705 2704
 
2706 2705
 			echo '
2707 2706
 				<li>', isset($txt['profile_error_' . $error]) ? $text_key_error : $error, '</li>';
Please login to merge, or discard this patch.
Sources/ManageSettings.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1860,25 +1860,25 @@
 block discarded – undo
1860 1860
 		$fields = array();
1861 1861
 		$new_sort = array();
1862 1862
 
1863
-		while($row = $smcFunc['db_fetch_assoc']($request))
1863
+		while ($row = $smcFunc['db_fetch_assoc']($request))
1864 1864
 				$fields[] = $row['id_field'];
1865 1865
 		$smcFunc['db_free_result']($request);
1866 1866
 
1867 1867
 		$idx = array_search($context['fid'], $fields);
1868 1868
 
1869
-		if ($_GET['move'] == 'down' && count($fields) - 1 > $idx )
1869
+		if ($_GET['move'] == 'down' && count($fields) - 1 > $idx)
1870 1870
 		{
1871
-				$new_sort = array_slice($fields ,0 ,$idx ,true);
1871
+				$new_sort = array_slice($fields, 0, $idx, true);
1872 1872
 				$new_sort[] = $fields[$idx + 1];
1873 1873
 				$new_sort[] = $fields[$idx];
1874
-				$new_sort += array_slice($fields ,$idx + 2 ,count($fields) ,true);
1874
+				$new_sort += array_slice($fields, $idx + 2, count($fields), true);
1875 1875
 		}
1876 1876
 		elseif ($context['fid'] > 0 and $idx < count($fields))
1877 1877
 		{
1878
-				$new_sort = array_slice($fields ,0 ,($idx - 1) ,true);
1878
+				$new_sort = array_slice($fields, 0, ($idx - 1), true);
1879 1879
 				$new_sort[] = $fields[$idx];
1880 1880
 				$new_sort[] = $fields[$idx - 1];
1881
-				$new_sort += array_slice($fields ,($idx + 1) ,count($fields) ,true);
1881
+				$new_sort += array_slice($fields, ($idx + 1), count($fields), true);
1882 1882
 		}
1883 1883
 		else
1884 1884
 			redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler
Please login to merge, or discard this patch.
Sources/LogInOut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -320,7 +320,7 @@
 block discarded – undo
320 320
 		{
321 321
 			// PHPBB 3 check this function exists in PHP 5.5 or higher
322 322
 			if (function_exists('password_verify'))
323
-				$other_passwords[] = password_verify($_POST['passwrd'],$user_settings['password_salt']);
323
+				$other_passwords[] = password_verify($_POST['passwrd'], $user_settings['password_salt']);
324 324
 
325 325
 			// PHP-Fusion
326 326
 			$other_passwords[] = hash_hmac('sha256', $_POST['passwrd'], $user_settings['password_salt']);
Please login to merge, or discard this patch.
Sources/Subs-Db-postgresql.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,11 +75,11 @@  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(function($errno, $errstr) {
82
-		throw new ErrorException($errstr, $errno);});
82
+		throw new ErrorException($errstr, $errno); });
83 83
 	try
84 84
 	{
85 85
 		if (!empty($db_options['persist']))
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 	if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false)
939 939
 		$error_array[2] = null;
940 940
 
941
-	if(empty($db_persist))
941
+	if (empty($db_persist))
942 942
 	{ // without pooling
943 943
 		if (empty($pg_error_data_prep))
944 944
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
Please login to merge, or discard this patch.
Sources/ManageServer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1638,7 +1638,7 @@
 block discarded – undo
1638 1638
 	$cacheAPIdir = $sourcedir . '/Cache';
1639 1639
 
1640 1640
 	$loadedApis = array();
1641
-	$apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER;
1641
+	$apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER;
1642 1642
 
1643 1643
 	$api_classes = new GlobIterator($apis_dir . '/*.php', FilesystemIterator::NEW_CURRENT_AND_KEY);
1644 1644
 
Please login to merge, or discard this patch.
Sources/Cache/APIs/FileBased.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		$class_name = $this->getImplementationClassKeyName();
185 185
 		$class_name_txt_key = strtolower($class_name);
186 186
 
187
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
187
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
188 188
 		$config_vars[] = array('cachedir', $txt['cachedir'], 'file', 'text', 36, 'cache_cachedir');
189 189
 
190 190
 		if (!isset($context['settings_post_javascript']))
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		$context['settings_post_javascript'] .= '
194 194
 			$("#cache_accelerator").change(function (e) {
195 195
 				var cache_type = e.currentTarget.value;
196
-				$("#cachedir").prop("disabled", cache_type != "'. $class_name .'");
196
+				$("#cachedir").prop("disabled", cache_type != "'. $class_name . '");
197 197
 			});';
198 198
 	}
199 199
 
Please login to merge, or discard this patch.