Passed
Pull Request — development (#3766)
by Elk
06:51
created
sources/ElkArte/MessagesDelete.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 				'messages' => $msgs,
95 95
 			)
96 96
 		)->fetch_callback(
97
-			function ($row) use (&$actioned_messages, &$previous_topics) {
97
+			function($row) use (&$actioned_messages, &$previous_topics) {
98 98
 				// Restoring the first post means topic.
99 99
 				if ((int) $row['id_msg'] === (int) $row['id_first_msg'] && (int) $row['id_previous_topic'] === (int) $row['id_topic'])
100 100
 				{
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 					'previous_topics' => $previous_topics,
156 156
 				)
157 157
 			)->fetch_callback(
158
-				static function ($row) use (&$previous_topics) {
158
+				static function($row) use (&$previous_topics) {
159 159
 					$previous_topics[$row['id_topic']] = array(
160 160
 						'board' => $row['id_board'],
161 161
 						'subject' => $row['subject'],
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 					'is_approved' => 1,
276 276
 				)
277 277
 			)->fetch_callback(
278
-				static function ($row) {
278
+				static function($row) {
279 279
 					updateMemberData($row['id_member'], array('posts' => '+'));
280 280
 				}
281 281
 			);
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 				'target_topic' => $target_topic,
316 316
 			)
317 317
 		)->fetch_callback(
318
-			static function ($row) use (&$target_topic_data) {
318
+			static function($row) use (&$target_topic_data) {
319 319
 				if ($row['id_first_msg'] < $target_topic_data['id_first_msg'])
320 320
 				{
321 321
 					$target_topic_data['id_first_msg'] = $row['id_first_msg'];
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 					'from_topic' => $from_topic,
385 385
 				)
386 386
 			)->fetch_callback(
387
-				static function ($row) use (&$source_topic_data) {
387
+				static function($row) use (&$source_topic_data) {
388 388
 					if ($row['id_first_msg'] < $source_topic_data['id_first_msg'])
389 389
 					{
390 390
 						$source_topic_data['id_first_msg'] = $row['id_first_msg'];
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 					'first_messages' => $cache_updates,
459 459
 				)
460 460
 			)->fetch_callback(
461
-				static function ($row) {
461
+				static function($row) {
462 462
 					updateSubjectStats($row['id_topic'], $row['subject']);
463 463
 				}
464 464
 			);
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 						'is_approved' => 1,
553 553
 					)
554 554
 				)->fetch_callback(
555
-					static function ($member) {
555
+					static function($member) {
556 556
 						updateMemberData($member['id_member'], array('posts' => 'posts + ' . $member['post_count']));
557 557
 					}
558 558
 				);
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
 		updateMessageStats();
975 975
 		require_once(SUBSDIR . '/Topic.subs.php');
976 976
 		updateTopicStats();
977
-		updateSettings(['calendar_updated' => time(),]);
977
+		updateSettings(['calendar_updated' => time(), ]);
978 978
 
979 979
 		// And now to update the last message of each board we messed with.
980 980
 		require_once(SUBSDIR . '/Post.subs.php');
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/Member.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
 	 * @param \BBC\ParserWrapper $bbc_parser
42 42
 	 */
43 43
 	public function __construct($data, /**
44
-  * The set of data loaded
45
-  */
44
+	 * The set of data loaded
45
+	 */
46 46
  protected $set, protected $bbc_parser)
47 47
 	{
48 48
 		parent::__construct($data);
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.
sources/ElkArte/Action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 
100 100
 		$this->_subActions = array_filter(
101 101
 			$subActions,
102
-			static function ($subAction) {
102
+			static function($subAction) {
103 103
 				if (isset($subAction['disabled']) && ($subAction['disabled'] === true || $subAction['disabled'] === 'true'))
104 104
 				{
105 105
 					return false;
Please login to merge, or discard this patch.
sources/ElkArte/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 		if (empty(self::$id) && isset($_COOKIE[$cookiename]))
104 104
 		{
105
-			[$id, self::$session_password] = serializeToJson($_COOKIE[$cookiename], static function ($array_from) use ($cookiename) {
105
+			[$id, self::$session_password] = serializeToJson($_COOKIE[$cookiename], static function($array_from) use ($cookiename) {
106 106
 				global $modSettings;
107 107
 				require_once(SUBSDIR . '/Auth.subs.php');
108 108
 				$_COOKIE[$cookiename] = json_encode($array_from);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		elseif (empty(self::$id) && isset($_SESSION['login_' . $cookiename]) && (!empty($modSettings['disableCheckUA']) || (!empty($_SESSION['USER_AGENT']) && $_SESSION['USER_AGENT'] == $user_agent)))
115 115
 		{
116 116
 			// @todo Perhaps we can do some more checking on this, such as on the first octet of the IP?
117
-			[$id, self::$session_password, $login_span] = serializeToJson($_SESSION['login_' . $cookiename], static function ($array_from) use ($cookiename) {
117
+			[$id, self::$session_password, $login_span] = serializeToJson($_SESSION['login_' . $cookiename], static function($array_from) use ($cookiename) {
118 118
 				$_SESSION['login_' . $cookiename] = json_encode($array_from);
119 119
 			});
120 120
 
Please login to merge, or discard this patch.