Passed
Pull Request — release-2.1 (#6108)
by Michael
04:54
created
Sources/tasks/CreatePost-Notify.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 {
20 20
 	/**
21 21
 	 * Constants for reply types.
22
-	*/
22
+	 */
23 23
 	const NOTIFY_TYPE_REPLY_AND_MODIFY = 1;
24 24
 	const NOTIFY_TYPE_REPLY_AND_TOPIC_START_FOLLOWING = 2;
25 25
 	const NOTIFY_TYPE_ONLY_REPLIES = 3;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	/**
29 29
 	 * Constants for frequencies.
30
-	*/
30
+	 */
31 31
 	const FREQUENCY_NOTHING = 0;
32 32
 	const FREQUENCY_EVERYTHING = 1;
33 33
 	const FREQUENCY_FIRST_UNREAD_MSG = 2;
Please login to merge, or discard this patch.
Braces   -1 removed lines patch added patch discarded remove patch
@@ -266,7 +266,6 @@
 block discarded – undo
266 266
 				$user_info = $real_user_info;
267 267
 				unset($real_user_info);
268 268
 			}
269
-
270 269
 			else
271 270
 				$user_info = null;
272 271
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		if ($type == 'edit')
119 119
 		{
120 120
 			// Filter out members who have already been notified about this post's topic
121
-			$unnotified = array_filter($watched, function ($member)
121
+			$unnotified = array_filter($watched, function($member)
122 122
 			{
123 123
 				return empty($member['sent']);
124 124
 			});
@@ -204,8 +204,7 @@  discard block
 block discarded – undo
204 204
 			if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($prefs[$member_id]))
205 205
 			{
206 206
 				$pref = !empty($prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ?
207
-					$prefs[$member_id]['topic_notify_' . $topicOptions['id']] :
208
-					(!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0);
207
+					$prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0);
209 208
 
210 209
 				$message_type = 'notification_' . $type;
211 210
 
@@ -224,8 +223,7 @@  discard block
 block discarded – undo
224 223
 			elseif ($type == 'topic')
225 224
 			{
226 225
 				$pref = !empty($prefs[$member_id]['board_notify_' . $topicOptions['board']]) ?
227
-					$prefs[$member_id]['board_notify_' . $topicOptions['board']] :
228
-					(!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0);
226
+					$prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0);
229 227
 
230 228
 				$content_type = 'board';
231 229
 
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Braces   +1 added lines, -8 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)
@@ -925,7 +925,6 @@  discard block
 block discarded – undo
925 925
 			$user_settings_min[$row['id_member']]['time_offset'] = ($tz_user->getOffset($time_user) -
926 926
 					$tz_system->getOffset($time_system)) / 3600;
927 927
 		}
928
-
929 928
 		else
930 929
 			$user_settings_min[$row['id_member']]['time_offset'] = empty($row['time_offset']) ? 0 : $row['time_offset'];
931 930
 	}
@@ -1655,7 +1654,6 @@  discard block
 block discarded – undo
1655 1654
 			$time_user = new DateTime('now', $tz_user);
1656 1655
 			$profile['time_offset'] = ($tz_user->getOffset($time_user) - $tz_system->getOffset($time_system)) / 3600;
1657 1656
 		}
1658
-
1659 1657
 		else
1660 1658
 		{
1661 1659
 			// !!! Compatibility.
@@ -2318,7 +2316,6 @@  discard block
 block discarded – undo
2318 2316
 		loadLanguage('index+Modifications');
2319 2317
 		$context['template_layers'] = array();
2320 2318
 	}
2321
-
2322 2319
 	else
2323 2320
 	{
2324 2321
 		// Custom templates to load, or just default?
@@ -2699,14 +2696,12 @@  discard block
 block discarded – undo
2699 2696
 				$fileUrl = $settings['default_theme_url'] . '/css/' . $fileName;
2700 2697
 				$filePath = $settings['default_theme_dir'] . '/css/' . $fileName;
2701 2698
 			}
2702
-
2703 2699
 			else
2704 2700
 			{
2705 2701
 				$fileUrl = false;
2706 2702
 				$filePath = false;
2707 2703
 			}
2708 2704
 		}
2709
-
2710 2705
 		else
2711 2706
 		{
2712 2707
 			$fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName;
@@ -2814,14 +2809,12 @@  discard block
 block discarded – undo
2814 2809
 				$fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName;
2815 2810
 				$filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName;
2816 2811
 			}
2817
-
2818 2812
 			else
2819 2813
 			{
2820 2814
 				$fileUrl = false;
2821 2815
 				$filePath = false;
2822 2816
 			}
2823 2817
 		}
2824
-
2825 2818
 		else
2826 2819
 		{
2827 2820
 			$fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName;
Please login to merge, or discard this patch.
Sources/tasks/ExportProfileData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 
120 120
 		$feed_meta = array(
121 121
 			'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']),
122
-			'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))),
122
+			'desc' => sentence_list(array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))),
123 123
 			'author' => $mbname,
124 124
 			'source' => $scripturl . '?action=profile;u=' . $uid,
125 125
 			'self' => $scripturl . '?action=profile;area=download;u=' . $uid . ';t=' . hash_hmac('sha1', $idhash, get_auth_secret()),
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,9 @@
 block discarded – undo
119 119
 
120 120
 		$feed_meta = array(
121 121
 			'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']),
122
-			'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))),
122
+			'desc' => sentence_list(array_map(function ($datatype) use ($txt)
123
+			{
124
+return $txt[$datatype]; }, array_keys($included))),
123 125
 			'author' => $mbname,
124 126
 			'source' => $scripturl . '?action=profile;u=' . $uid,
125 127
 			'self' => $scripturl . '?action=profile;area=download;u=' . $uid . ';t=' . hash_hmac('sha1', $idhash, get_auth_secret()),
Please login to merge, or discard this patch.
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/Profile-Actions.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1396,7 +1396,7 @@
 block discarded – undo
1396 1396
 
1397 1397
 	// Figure out the filename we'll tell the browser.
1398 1398
 	$datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile');
1399
-	$included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes);
1399
+	$included_desc = array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes);
1400 1400
 
1401 1401
 	$dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc);
1402 1402
 	$dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename)))));
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1396,7 +1396,9 @@
 block discarded – undo
1396 1396
 
1397 1397
 	// Figure out the filename we'll tell the browser.
1398 1398
 	$datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile');
1399
-	$included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes);
1399
+	$included_desc = array_map(function ($datatype) use ($txt)
1400
+	{
1401
+return $txt[$datatype]; }, $datatypes);
1400 1402
 
1401 1403
 	$dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc);
1402 1404
 	$dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename)))));
Please login to merge, or discard this patch.