Passed
Pull Request — development (#3792)
by Spuds
06:41
created
sources/ElkArte/Themes/ThemeLoader.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 					'id_member' => $member,
293 293
 				]
294 294
 			)->fetch_callback(
295
-				static function ($row) use ($immutable_theme_data, &$themeData) {
295
+				static function($row) use ($immutable_theme_data, &$themeData) {
296 296
 					// There are just things we shouldn't be able to change as members.
297 297
 					if ((int) $row['id_member'] !== 0 && in_array($row['variable'], $immutable_theme_data, true))
298 298
 					{
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 			return;
529 529
 		}
530 530
 
531
-		$context['admin_preferences'] = serializeToJson($options['admin_preferences'], static function ($array_form) {
531
+		$context['admin_preferences'] = serializeToJson($options['admin_preferences'], static function($array_form) {
532 532
 			global $context;
533 533
 
534 534
 			require_once(SUBSDIR . '/Admin.subs.php');
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 		// Update the option.
556 556
 		if (($this->user->is_guest === false) && !empty($options['minmax_preferences']))
557 557
 		{
558
-			$context['minmax_preferences'] = serializeToJson($options['minmax_preferences'], static function ($array_form) {
558
+			$context['minmax_preferences'] = serializeToJson($options['minmax_preferences'], static function($array_form) {
559 559
 				global $settings;
560 560
 
561 561
 				require_once(SUBSDIR . '/Themes.subs.php');
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
 				'theme_guests' => $modSettings['theme_guests'],
878 878
 			]
879 879
 		)->fetch_callback(
880
-			static function ($row) {
880
+			static function($row) {
881 881
 				global $settings;
882 882
 
883 883
 				$settings[$row['variable']] = $row['value'];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -934,8 +934,7 @@
 block discarded – undo
934 934
 		$lang = '',
935 935
 		$fatal = false, // @todo reset to true when appropriate
936 936
 		$force_reload = false
937
-	)
938
-	{
937
+	) {
939 938
 		return static::loadLanguageFiles(
940 939
 			explode('+', $template_name),
941 940
 			$lang,
Please login to merge, or discard this patch.
sources/ElkArte/VerificationControls/VerificationControl/Questions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 				FROM {db_prefix}antispam_questions',
138 138
 				[]
139 139
 			)->fetch_callback(
140
-				static function ($row) use (&$modSettings) {
140
+				static function($row) use (&$modSettings) {
141 141
 					$modSettings['question_id_cache'][$row['language']][] = $row['id_question'];
142 142
 				}
143 143
 			);
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 				'current_filter' => $this->_filter === null ? '' : $this->_filter['value'],
252 252
 			]
253 253
 		)->fetch_callback(
254
-			static function ($row) use (&$question_answers) {
254
+			static function($row) use (&$question_answers) {
255 255
 				$question_answers[$row['id_question']] = [
256 256
 					'id_question' => $row['id_question'],
257 257
 					'question' => $row['question'],
Please login to merge, or discard this patch.
sources/ElkArte/TopicsMerge.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 					'limit' => count($this->_polls),
256 256
 				)
257 257
 			)->fetch_callback(
258
-				function ($row) use (&$polls) {
258
+				function($row) use (&$polls) {
259 259
 					$polls[] = array(
260 260
 						'id' => $row['id_poll'],
261 261
 						'topic' => array(
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 				'topics' => $this->_topics,
347 347
 			)
348 348
 		)->fetch_callback(
349
-			static function ($row) use (&$topic_approved, &$first_msg, &$num_replies, &$last_msg, &$num_unapproved) {
349
+			static function($row) use (&$topic_approved, &$first_msg, &$num_replies, &$last_msg, &$num_unapproved) {
350 350
 				// If this is approved, or is fully unapproved.
351 351
 				if ($row['approved'] || !isset($first_msg))
352 352
 				{
Please login to merge, or discard this patch.
sources/ElkArte/IlaIntegrate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	{
262 262
 		global $modSettings;
263 263
 
264
-		return static function (&$data, $disabled, $tag) use ($modSettings) {
264
+		return static function(&$data, $disabled, $tag) use ($modSettings) {
265 265
 			$num = $data;
266 266
 			$attachment = [];
267 267
 			$preview = self::isPreview($num);
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	{
339 339
 		global $txt;
340 340
 
341
-		return static function (&$data) use ($txt) {
341
+		return static function(&$data) use ($txt) {
342 342
 			$num = $data;
343 343
 			$attachment = false;
344 344
 
Please login to merge, or discard this patch.
sources/ElkArte/Maillist/EmailFormat.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 		$temps = explode("\n", $data);
187 187
 
188 188
 		// Remove any 'stuck' whitespace using the trim value function on all lines
189
-		array_walk($temps, function (&$value) {
189
+		array_walk($temps, function(&$value) {
190 190
 			$this->_trim_value($value);
191 191
 		});
192 192
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,8 +197,7 @@
 block discarded – undo
197 197
 			|| preg_match('~^[1-9]\s?([.)\-])\s?~m', $var)
198 198
 			|| preg_match('~' . chr(187) . '~', $var)
199 199
 			|| preg_match('~^[ \t]?\* ?~m', $var)
200
-		)
201
-		{
200
+		) {
202 201
 			$this->_in_plainlist++;
203 202
 		}
204 203
 
Please login to merge, or discard this patch.
sources/ElkArte/UserSettingsLoader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@
 block discarded – undo
302 302
 		}
303 303
 		else
304 304
 		{
305
-			[$context['login_token_var'], , , $context['login_token']] = $_SESSION['token']['post-login'];
305
+			[$context['login_token_var'],,, $context['login_token']] = $_SESSION['token']['post-login'];
306 306
 		}
307 307
 
308 308
 		// Do we perhaps think this is a search robot?
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,8 +207,7 @@
 block discarded – undo
207 207
 			&& !isset($_REQUEST['api']) && (!isset($_REQUEST['action']) || $_REQUEST['action'] !== '.xml')
208 208
 			&& empty($_SESSION['id_msg_last_visit'])
209 209
 			&& (!$this->cache->isEnabled() || !$this->cache->getVar($_SESSION['id_msg_last_visit'], 'user_last_visit-' . $this->id, 5 * 3600))
210
-		)
211
-		{
210
+		) {
212 211
 			// @todo can this be cached?
213 212
 			// Do a quick query to make sure this isn't a mistake.
214 213
 			require_once(SUBSDIR . '/Messages.subs.php');
Please login to merge, or discard this patch.
sources/ElkArte/MembersList.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,8 @@
 block discarded – undo
105 105
 		$id = (int) $id;
106 106
 		$member = self::$instance->getById($id);
107 107
 
108
-		return $member !== false ? $member : new class() extends ValuesContainer {
108
+		return $member !== false ? $member : new class() extends ValuesContainer
109
+		{
109 110
 			public function loadContext($display_custom_fields = false)
110 111
 			{
111 112
 			}
Please login to merge, or discard this patch.
sources/ElkArte/Recent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@
 block discarded – undo
290 290
 				'message_list' => $this->_messages,
291 291
 			)
292 292
 		)->fetch_callback(
293
-			static function ($row) use (&$returns) {
293
+			static function($row) use (&$returns) {
294 294
 				$returns[] = $row;
295 295
 			}
296 296
 		);
Please login to merge, or discard this patch.
sources/ElkArte/Permissions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 				'not_inherited' => -2,
185 185
 			)
186 186
 		)->fetch_callback(
187
-			static function ($row) use (&$children, &$child_groups, &$parents) {
187
+			static function($row) use (&$children, &$child_groups, &$parents) {
188 188
 				$children[$row['id_parent']][] = $row['id_group'];
189 189
 				$child_groups[] = $row['id_group'];
190 190
 				$parents[] = $row['id_parent'];
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 					'parent_list' => $parents,
216 216
 				)
217 217
 			)->fetch_callback(
218
-				static function ($row) use ($children, &$permissions) {
218
+				static function($row) use ($children, &$permissions) {
219 219
 					foreach ($children[$row['id_group']] as $child)
220 220
 					{
221 221
 						$permissions[] = array(
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 					'current_profile' => $profile !== null && $profile ? $profile : 1,
261 261
 				)
262 262
 			)->fetch_callback(
263
-				static function ($row) use (&$permissions, $children) {
263
+				static function($row) use (&$permissions, $children) {
264 264
 					foreach ($children[$row['id_group']] as $child)
265 265
 					{
266 266
 						$permissions[] = array($row['permission'], $child, $row['add_deny'], $row['id_profile']);
Please login to merge, or discard this patch.