Passed
Push — release-2.1 ( f28109...493a4c )
by Mathias
06:40
created
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.
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.
Sources/Cache/APIs/MemcacheImplementation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -152,15 +152,15 @@  discard block
 block discarded – undo
152 152
 		$class_name = $this->getImplementationClassKeyName();
153 153
 		$class_name_txt_key = strtolower($class_name);
154 154
 
155
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
155
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
156 156
 		$config_vars[] = array(
157 157
 			self::CLASS_KEY,
158
-			$txt['cache_'. $class_name_txt_key .'_servers'],
158
+			$txt['cache_' . $class_name_txt_key . '_servers'],
159 159
 			'file',
160 160
 			'text',
161 161
 			0,
162
-			'cache_'. $class_name_txt_key,
163
-			'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']);
162
+			'cache_' . $class_name_txt_key,
163
+			'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']);
164 164
 
165 165
 		if (!isset($context['settings_post_javascript']))
166 166
 			$context['settings_post_javascript'] = '';
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		$context['settings_post_javascript'] .= '
169 169
 			$("#cache_accelerator").change(function (e) {
170 170
 				var cache_type = e.currentTarget.value;
171
-				$("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'");
171
+				$("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '");
172 172
 			});';
173 173
 	}
174 174
 
Please login to merge, or discard this patch.
Sources/ScheduledTasks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	clean_cache();
170 170
 
171 171
 	// If warning decrement is enabled and we have people who have not had a new warning in 24 hours, lower their warning level.
172
-	list (, , $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);
172
+	list (,, $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);
173 173
 	if ($modSettings['warning_decrement'])
174 174
 	{
175 175
 		// Find every member who has a warning level...
@@ -1665,7 +1665,7 @@  discard block
 block discarded – undo
1665 1665
 	// Determine action based on last_login...
1666 1666
 	$purgeMembers = array();
1667 1667
 	$markReadMembers = array();
1668
-	foreach($members as $member)
1668
+	foreach ($members as $member)
1669 1669
 	{
1670 1670
 		if ($member['last_login'] <= $cleanupBeyond)
1671 1671
 			$purgeMembers[] = $member['id_member'];
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2717,8 +2717,7 @@  discard block
 block discarded – undo
2717 2717
 		$context['css_files_order'] = array();
2718 2718
 
2719 2719
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2720
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2721
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2720
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2722 2721
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2723 2722
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2724 2723
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2832,8 +2831,7 @@  discard block
 block discarded – undo
2832 2831
 	global $settings, $context, $modSettings;
2833 2832
 
2834 2833
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2835
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2836
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2834
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2837 2835
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2838 2836
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2839 2837
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -3573,10 +3571,10 @@  discard block
 block discarded – undo
3573 3571
 		$cacheAPI = false;
3574 3572
 
3575 3573
 	// Autoload hasn't been called yet :/
3576
-	require_once($cacheAPIdir .'/CacheApi.php');
3577
-	require_once($cacheAPIdir .'/CacheApiInterface.php');
3574
+	require_once($cacheAPIdir . '/CacheApi.php');
3575
+	require_once($cacheAPIdir . '/CacheApiInterface.php');
3578 3576
 
3579
-	$apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER;
3577
+	$apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER;
3580 3578
 
3581 3579
 	// What accelerator we are going to try.
3582 3580
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
@@ -3588,8 +3586,7 @@  discard block
 block discarded – undo
3588 3586
 	{
3589 3587
 		require_once($file_to_load);
3590 3588
 
3591
-		$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3592
-			CacheApi::APIS_NAMESPACE . $cache_class_name;
3589
+		$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3593 3590
 
3594 3591
 		/* @var CacheApiInterface $cache_api */
3595 3592
 		$cache_api = new $fully_qualified_class_name();
Please login to merge, or discard this patch.