Passed
Pull Request — development (#3792)
by Spuds
06:41
created
sources/ElkArte/Errors/Log.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 				'filter' => empty($filter) ? '' : $filter['value']['sql'],
114 114
 			)
115 115
 		)->fetch_callback(
116
-			function ($row) use (&$log, $filter, $scripturl, $txt) {
116
+			function($row) use (&$log, $filter, $scripturl, $txt) {
117 117
 				$search_message = preg_replace('~<span class="remove">(.+?)</span>~', '%', $this->_db->escape_wildcard_string($row['message']));
118 118
 				if (!empty($filter) && $search_message == $filter['value']['sql'])
119 119
 				{
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 				'critical_type' => 'critical',
193 193
 			)
194 194
 		)->fetch_callback(
195
-			function ($row) use (&$types, $filter, $txt, $sort, &$sum) {
195
+			function($row) use (&$types, $filter, $txt, $sort, &$sum) {
196 196
 				// Total errors so far?
197 197
 				$sum += $row['num_errors'];
198 198
 
Please login to merge, or discard this patch.
sources/ElkArte/Mentions/MentionType/AbstractNotificationMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
 				'target' => $target,
132 132
 			]
133 133
 		)->fetch_callback(
134
-			static function ($row) use (&$existing) {
134
+			static function($row) use (&$existing) {
135 135
 				$existing[] = (int) $row['id_member'];
136 136
 			}
137 137
 		);
Please login to merge, or discard this patch.
sources/ElkArte/Http/FtpConnection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	public function connect($ftp_server, $ftp_port = 21, $ftp_user = 'anonymous', $ftp_pass = '[email protected]')
73 73
 	{
74 74
 		// Connect to the FTP server.
75
-		set_error_handler(static function () { /* ignore errors */ });
75
+		set_error_handler(static function() { /* ignore errors */ });
76 76
 		$ftp_server = $this->getServer($ftp_server);
77 77
 		$this->connection = stream_socket_client($ftp_server . ':' . $ftp_port, $err_code, $err, 5);
78 78
 		restore_error_handler();
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 		fwrite($this->connection, 'STOR ' . $ftp_file . "\r\n");
300 300
 
301 301
 		// Okay, now we connect to the data port.  If it doesn't work out, it's probably "file already exists", etc.
302
-		set_error_handler(static function () { /* ignore errors */ });
302
+		set_error_handler(static function() { /* ignore errors */ });
303 303
 		$fp = stream_socket_client($this->pasv['ip'] . ':' . $this->pasv['port'], $err_code, $err, 5);
304 304
 		restore_error_handler();
305 305
 		if ($fp === false || $err_code !== 0 || !$this->check_response(150))
Please login to merge, or discard this patch.
sources/ElkArte/AdminController/ManageCalendarModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 			'settings' => [
43 43
 				'cal_enabled' => 1,
44 44
 			],
45
-			'setting_callback' => static function ($value) {
45
+			'setting_callback' => static function($value) {
46 46
 				if ($value)
47 47
 				{
48 48
 					enableModules('calendar', ['admin', 'post', 'boardindex', 'display']);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 						'value' => $txt['date'],
165 165
 					],
166 166
 					'data' => [
167
-						'function' => static function ($rowData) {
167
+						'function' => static function($rowData) {
168 168
 							global $txt;
169 169
 
170 170
 							// Recurring every year or just a single year?
Please login to merge, or discard this patch.
sources/ElkArte/Packages/PackageChmod.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 							'value' => $txt['package_restore_permissions_cur_status'],
178 178
 						),
179 179
 						'data' => array(
180
-							'function' => static function ($rowData) {
180
+							'function' => static function($rowData) {
181 181
 								global $txt;
182 182
 								$formatTxt = $rowData['result'] === '' || $rowData['result'] === 'skipped' ? $txt['package_restore_permissions_pre_change'] : $txt['package_restore_permissions_post_change'];
183 183
 								return sprintf($formatTxt, $rowData['cur_perms'], $rowData['new_perms'], $rowData['writable_message']);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 							'value' => $txt['package_restore_permissions_result'],
206 206
 						),
207 207
 						'data' => array(
208
-							'function' => static function ($rowData) {
208
+							'function' => static function($rowData) {
209 209
 								global $txt;
210 210
 								return $txt['package_restore_permissions_action_' . $rowData['result']];
211 211
 							},
Please login to merge, or discard this patch.
sources/ElkArte/Packages/Packages.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
 							'style' => 'width: 25%;',
1047 1047
 						],
1048 1048
 						'data' => [
1049
-							'function' => static function ($package_md5) use ($type) {
1049
+							'function' => static function($package_md5) use ($type) {
1050 1050
 								global $context;
1051 1051
 
1052 1052
 								if (isset($context['available_' . $type][$package_md5]))
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
 							'style' => 'width: 25%;',
1069 1069
 						],
1070 1070
 						'data' => [
1071
-							'function' => static function ($package_md5) use ($type) {
1071
+							'function' => static function($package_md5) use ($type) {
1072 1072
 								global $context;
1073 1073
 
1074 1074
 								if (isset($context['available_' . $type][$package_md5]))
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
 							'value' => $txt['package_installed_on'],
1090 1090
 						],
1091 1091
 						'data' => [
1092
-							'function' => static function ($package_md5) use ($type, $txt) {
1092
+							'function' => static function($package_md5) use ($type, $txt) {
1093 1093
 								global $context;
1094 1094
 
1095 1095
 								if (!empty($context['available_' . $type][$package_md5]['time_installed']))
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 							'value' => '',
1111 1111
 						],
1112 1112
 						'data' => [
1113
-							'function' => static function ($package_md5) use ($type) {
1113
+							'function' => static function($package_md5) use ($type) {
1114 1114
 								global $context, $txt;
1115 1115
 
1116 1116
 								if (!isset($context['available_' . $type][$package_md5]))
Please login to merge, or discard this patch.
sources/ElkArte/Packages/PackageServers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -392,7 +392,7 @@
 block discarded – undo
392 392
 		{
393 393
 			// Name this master.zip based on repo name in the link
394 394
 			$path_parts = pathinfo($matches[4]);
395
-			[, $newname,] = explode('/', $path_parts['dirname']);
395
+			[, $newname, ] = explode('/', $path_parts['dirname']);
396 396
 
397 397
 			// Just to be safe, no invalid file characters
398 398
 			$invalid = array_merge(array_map('chr', range(0, 31)), ['<', '>', ':', '"', '/', '\\', '|', '?', '*']);
Please login to merge, or discard this patch.
sources/ElkArte/ScheduledTasks/Tasks/ApprovalNotification.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 				INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board)',
56 56
 			array()
57 57
 		)->fetch_callback(
58
-			static function ($row) use (&$notices, &$profiles) {
58
+			static function($row) use (&$notices, &$profiles) {
59 59
 				// If this is no longer around we'll ignore it.
60 60
 				if (empty($row['id_topic']))
61 61
 				{
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 				'approve_posts' => 'approve_posts',
112 112
 			)
113 113
 		)->fetch_callback(
114
-			static function ($row) use (&$addGroups, &$perms) {
114
+			static function($row) use (&$addGroups, &$perms) {
115 115
 				// Sorry guys, but we have to ignore guests AND members - it would be too many otherwise.
116 116
 				if ($row['id_group'] < 2)
117 117
 				{
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
 				'additional_group_list_implode' => implode(', additional_groups) != 0 OR FIND_IN_SET(', $addGroups),
163 163
 			)
164 164
 		)->fetch_callback(
165
-			static function ($row) use (&$members) {
165
+			static function($row) use (&$members) {
166 166
 				// Check whether they are interested.
167 167
 				if (!empty($row['mod_prefs']))
168 168
 				{
169
-					[, , $pref_binary] = explode('|', $row['mod_prefs']);
169
+					[,, $pref_binary] = explode('|', $row['mod_prefs']);
170 170
 					if (!($pref_binary & 4))
171 171
 					{
172 172
 						return;
Please login to merge, or discard this patch.
sources/ElkArte/ScheduledTasks/Tasks/PaidSubscriptions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 				'time_now' => time(),
51 51
 			)
52 52
 		)->fetch_callback(
53
-			static function ($row) {
53
+			static function($row) {
54 54
 				removeSubscription($row['id_subscribe'], $row['id_member']);
55 55
 			}
56 56
 		);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 				'time_now' => time(),
77 77
 			)
78 78
 		)->fetch_callback(
79
-			static function ($row) use (&$subs_reminded, $modSettings, $language) {
79
+			static function($row) use (&$subs_reminded, $modSettings, $language) {
80 80
 				$subs_reminded[] = $row['id_sublog'];
81 81
 				$replacements = array(
82 82
 					'PROFILE_LINK' => getUrl('profile', ['action' => 'profile', 'area' => 'subscriptions', 'name' => $row['member_name'], 'u' => $row['id_member']]),
Please login to merge, or discard this patch.