Passed
Push — release-2.1 ( bb7f39...4ba5dd )
by Mathias
06:31
created
Sources/tasks/ExportProfileData.php 2 patches
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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,7 +203,9 @@
 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)
207
+			{
208
+return $txt[$datatype]; }, array_keys($included))),
207 209
 			'author' => $mbname,
208 210
 			'source' => $scripturl . '?action=profile;u=' . $uid,
209 211
 			'self' => '', // Unused, but can't be null.
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/Load.php 2 patches
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.
Spacing   +4 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2718,8 +2718,7 @@  discard block
 block discarded – undo
2718 2718
 		$context['css_files_order'] = array();
2719 2719
 
2720 2720
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2721
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2722
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2721
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2723 2722
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2724 2723
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2725 2724
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2833,8 +2832,7 @@  discard block
 block discarded – undo
2833 2832
 	global $settings, $context, $modSettings;
2834 2833
 
2835 2834
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2836
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2837
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2835
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2838 2836
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2839 2837
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2840 2838
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -3577,8 +3575,7 @@  discard block
 block discarded – undo
3577 3575
 
3578 3576
 	// What accelerator we are going to try.
3579 3577
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3580
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3581
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3578
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3582 3579
 
3583 3580
 	// Do some basic tests.
3584 3581
 	if (class_exists($fully_qualified_class_name))
@@ -3882,7 +3879,7 @@  discard block
 block discarded – undo
3882 3879
 			$auth_secret = hash_file('sha256', $boarddir . '/Settings.php');
3883 3880
 
3884 3881
 			// Set the last error to now, but only every 15 minutes.  Don't need to flood the logs.
3885
-			if (empty($db_last_error) || ($db_last_error + 60*15) <= time())
3882
+			if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time())
3886 3883
 			{
3887 3884
 				updateDbLastError(time());
3888 3885
 				loadLanguage('Errors');
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/ManageServer.php 2 patches
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.
Braces   -1 removed lines patch added patch discarded remove patch
@@ -707,7 +707,6 @@
 block discarded – undo
707 707
 		$cache_level = array($txt['cache_off']);
708 708
 		$apis_names['none'] = $txt['cache_off'];
709 709
 	}
710
-
711 710
 	else
712 711
 	{
713 712
 		$txt['cache_settings_message'] = '<strong class="success">' .
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.
Sources/Cache/APIs/MemcachedImplementation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
 		$class_name = $this->getImplementationClassKeyName();
170 170
 		$class_name_txt_key = strtolower($class_name);
171 171
 
172
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
172
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
173 173
 		$config_vars[] = array(
174 174
 			self::CLASS_KEY,
175
-			$txt['cache_'. $class_name_txt_key .'_servers'],
175
+			$txt['cache_' . $class_name_txt_key . '_servers'],
176 176
 			'file',
177 177
 			'text',
178 178
 			0,
179
-			'cache_'. $class_name_txt_key,
180
-			'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']);
179
+			'cache_' . $class_name_txt_key,
180
+			'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']);
181 181
 
182 182
 		if (!isset($context['settings_post_javascript']))
183 183
 			$context['settings_post_javascript'] = '';
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		$context['settings_post_javascript'] .= '
186 186
 			$("#cache_accelerator").change(function (e) {
187 187
 				var cache_type = e.currentTarget.value;
188
-				$("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'");
188
+				$("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '");
189 189
 			});';
190 190
 	}
191 191
 
Please login to merge, or discard this patch.
Sources/Cache/APIs/Sqlite.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 		$class_name = $this->getImplementationClassKeyName();
132 132
 		$class_name_txt_key = strtolower($class_name);
133 133
 
134
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
134
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
135 135
 		$config_vars[] = array(
136
-			'cachedir_'. $class_name_txt_key,
137
-			$txt['cachedir_'. $class_name_txt_key],
136
+			'cachedir_' . $class_name_txt_key,
137
+			$txt['cachedir_' . $class_name_txt_key],
138 138
 			'file',
139 139
 			'text',
140 140
 			36,
141
-			'cache_'. $class_name_txt_key .'_cachedir');
141
+			'cache_' . $class_name_txt_key . '_cachedir');
142 142
 
143 143
 		if (!isset($context['settings_post_javascript']))
144 144
 			$context['settings_post_javascript'] = '';
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$context['settings_post_javascript'] .= '
147 147
 			$("#cache_accelerator").change(function (e) {
148 148
 				var cache_type = e.currentTarget.value;
149
-				$("#cachedir_'. $class_name_txt_key .'").prop("disabled", cache_type != "'. $class_name .'");
149
+				$("#cachedir_'. $class_name_txt_key . '").prop("disabled", cache_type != "' . $class_name . '");
150 150
 			});';
151 151
 	}
152 152
 
Please login to merge, or discard this patch.