Passed
Pull Request — release-2.1 (#5093)
by 01
05:54
created
Sources/Calendar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,8 +240,8 @@
 block discarded – undo
240 240
 		$time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]);
241 241
 
242 242
 	$js_time_string = str_replace(
243
-		array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r',      '%R',  '%S', '%T',    '%X'),
244
-		array('H',  'G',  'h',  'g',  'i',  'A',  'a',  'h:i:s A', 'H:i', 's',  'H:i:s', 'H:i:s'),
243
+		array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'),
244
+		array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'),
245 245
 		$time_string
246 246
 	);
247 247
 
Please login to merge, or discard this patch.
Sources/Post.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,8 +259,8 @@
 block discarded – undo
259 259
 			$time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]);
260 260
 
261 261
 		$js_time_string = str_replace(
262
-			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r',      '%R',  '%S', '%T',    '%X'),
263
-			array('H',  'G',  'h',  'g',  'i',  'A',  'a',  'h:i:s A', 'H:i', 's',  'H:i:s', 'H:i:s'),
262
+			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'),
263
+			array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'),
264 264
 			$time_string
265 265
 		);
266 266
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1281,7 +1281,9 @@
 block discarded – undo
1281 1281
 	// File Upload.
1282 1282
 	if ($context['can_post_attachment'])
1283 1283
 	{
1284
-		$acceptedFiles = implode(',', array_map(function($val) use($smcFunc) { return '.' . $smcFunc['htmltrim']($val); } , explode(',', $context['allowed_extensions'])));
1284
+		$acceptedFiles = implode(',', array_map(function($val) use($smcFunc)
1285
+		{
1286
+return '.' . $smcFunc['htmltrim']($val); } , explode(',', $context['allowed_extensions'])));
1285 1287
 
1286 1288
 		loadJavaScriptFile('dropzone.min.js', array('defer' => true), 'smf_dropzone');
1287 1289
 		loadJavaScriptFile('smf_fileUpload.js', array('defer' => true, 'minimize' => true), 'smf_fileUpload');
Please login to merge, or discard this patch.
Sources/ManageBans.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 		)
785 785
 	);
786 786
 	while ($row = $smcFunc['db_fetch_assoc']($request))
787
-	    $error_ips[] = inet_dtop($row['ip']);
787
+		$error_ips[] = inet_dtop($row['ip']);
788 788
 	$smcFunc['db_free_result']($request);
789 789
 
790 790
 	return $error_ips;
@@ -2168,9 +2168,9 @@  discard block
 block discarded – undo
2168 2168
 
2169 2169
 	if ($low == '255.255.255.255') return 'unknown';
2170 2170
 	if ($low == $high)
2171
-	    return $low;
2171
+		return $low;
2172 2172
 	else
2173
-	    return $low . '-' . $high;
2173
+		return $low . '-' . $high;
2174 2174
 }
2175 2175
 
2176 2176
 /**
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 			if (removeItems == 0)
284 284
 			{
285 285
 				e.preventDefault();
286
-				return alert("'. $txt['select_item_check'] .'");
286
+				return alert("'. $txt['select_item_check'] . '");
287 287
 			}
288 288
 
289 289
 
290
-			return confirm("'. $txt['ban_remove_selected_confirm'] .'");
290
+			return confirm("'. $txt['ban_remove_selected_confirm'] . '");
291 291
 		});',
292 292
 	);
293 293
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 					array(
487 487
 						'position' => 'below_table_data',
488 488
 						'value' => '
489
-						<input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button"> <a class="button" href="' . $scripturl	. '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>',
489
+						<input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button"> <a class="button" href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>',
490 490
 						'style' => 'text-align: right;',
491 491
 					),
492 492
 					array(
@@ -506,11 +506,11 @@  discard block
 block discarded – undo
506 506
 			if (removeItems == 0)
507 507
 			{
508 508
 				e.preventDefault();
509
-				return alert("'. $txt['select_item_check'] .'");
509
+				return alert("'. $txt['select_item_check'] . '");
510 510
 			}
511 511
 
512 512
 
513
-			return confirm("'. $txt['ban_remove_selected_confirm'] .'");
513
+			return confirm("'. $txt['ban_remove_selected_confirm'] . '");
514 514
 		});',
515 515
 			);
516 516
 			createList($listOptions);
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
  *
105 105
  * @param string $class The fully-qualified class name.
106 106
  */
107
-spl_autoload_register(function ($class) use ($sourcedir)
107
+spl_autoload_register(function($class) use ($sourcedir)
108 108
 {
109 109
 	$classMap = array(
110 110
 		'ReCaptcha\\' => 'ReCaptcha/',
Please login to merge, or discard this patch.
Sources/Class-CurlFetchWeb.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
 	public $headers;
95 95
 
96 96
 	/**
97
-	* Start the curl object
98
-	* - allow for user override values
99
-	*
100
-	* @param array $options An array of cURL options
101
-	* @param int $max_redirect Maximum number of redirects
102
-	*/
97
+	 * Start the curl object
98
+	 * - allow for user override values
99
+	 *
100
+	 * @param array $options An array of cURL options
101
+	 * @param int $max_redirect Maximum number of redirects
102
+	 */
103 103
 	public function __construct($options = array(), $max_redirect = 3)
104 104
 	{
105 105
 		// Initialize class variables
@@ -108,16 +108,16 @@  discard block
 block discarded – undo
108 108
 	}
109 109
 
110 110
 	/**
111
-	* Main calling function,
112
-	*  - will request the page data from a given $url
113
-	*  - optionally will post data to the page form if post data is supplied
114
-	*  - passed arrays will be converted to a post string joined with &'s
115
-	*  - calls set_options to set the curl opts array values based on the defaults and user input
116
-	*
117
-	* @param string $url the site we are going to fetch
118
-	* @param array $post_data any post data as form name => value
119
-	* @return object An instance of the curl_fetch_web_data class
120
-	*/
111
+	 * Main calling function,
112
+	 *  - will request the page data from a given $url
113
+	 *  - optionally will post data to the page form if post data is supplied
114
+	 *  - passed arrays will be converted to a post string joined with &'s
115
+	 *  - calls set_options to set the curl opts array values based on the defaults and user input
116
+	 *
117
+	 * @param string $url the site we are going to fetch
118
+	 * @param array $post_data any post data as form name => value
119
+	 * @return object An instance of the curl_fetch_web_data class
120
+	 */
121 121
 	public function get_url_data($url, $post_data = array())
122 122
 	{
123 123
 		// POSTing some data perhaps?
@@ -134,14 +134,14 @@  discard block
 block discarded – undo
134 134
 	}
135 135
 
136 136
 	/**
137
-	* Makes the actual cURL call
138
-	*  - stores responses (url, code, error, headers, body) in the response array
139
-	*  - detects 301, 302, 307 codes and will redirect to the given response header location
140
-	*
141
-	* @param string $url The site to fetch
142
-	* @param bool $redirect Whether or not this was a redirect request
143
-	* @return void|bool Sets various properties of the class or returns false if the URL isn't specified
144
-	*/
137
+	 * Makes the actual cURL call
138
+	 *  - stores responses (url, code, error, headers, body) in the response array
139
+	 *  - detects 301, 302, 307 codes and will redirect to the given response header location
140
+	 *
141
+	 * @param string $url The site to fetch
142
+	 * @param bool $redirect Whether or not this was a redirect request
143
+	 * @return void|bool Sets various properties of the class or returns false if the URL isn't specified
144
+	 */
145 145
 	private function curl_request($url, $redirect = false)
146 146
 	{
147 147
 		// we do have a url I hope
@@ -193,12 +193,12 @@  discard block
 block discarded – undo
193 193
 	}
194 194
 
195 195
 	/**
196
-	* Used if being redirected to ensure we have a fully qualified address
197
-	*
198
-	* @param string $last_url The URL we went to
199
-	* @param string $new_url The URL we were redirected to
200
-	* @return string The new URL that was in the HTTP header
201
-	*/
196
+	 * Used if being redirected to ensure we have a fully qualified address
197
+	 *
198
+	 * @param string $last_url The URL we went to
199
+	 * @param string $new_url The URL we were redirected to
200
+	 * @return string The new URL that was in the HTTP header
201
+	 */
202 202
 	private function get_redirect_url($last_url = '', $new_url = '')
203 203
 	{
204 204
 		// Get the elements for these urls
@@ -216,13 +216,13 @@  discard block
 block discarded – undo
216 216
 	}
217 217
 
218 218
 	/**
219
-	* Used to return the results to the calling program
220
-	*  - called as ->result() will return the full final array
221
-	*  - called as ->result('body') to just return the page source of the result
222
-	*
223
-	* @param string $area Used to return an area such as body, header, error
224
-	* @return string The response
225
-	*/
219
+	 * Used to return the results to the calling program
220
+	 *  - called as ->result() will return the full final array
221
+	 *  - called as ->result('body') to just return the page source of the result
222
+	 *
223
+	 * @param string $area Used to return an area such as body, header, error
224
+	 * @return string The response
225
+	 */
226 226
 	public function result($area = '')
227 227
 	{
228 228
 		$max_result = count($this->response) - 1;
@@ -235,13 +235,13 @@  discard block
 block discarded – undo
235 235
 	}
236 236
 
237 237
 	/**
238
-	* Will return all results from all loops (redirects)
239
-	*  - Can be called as ->result_raw(x) where x is a specific loop results.
240
-	*  - Call as ->result_raw() for everything.
241
-	*
242
-	* @param string $response_number Which response we want to get
243
-	* @return array|string The entire response array or just the specified response
244
-	*/
238
+	 * Will return all results from all loops (redirects)
239
+	 *  - Can be called as ->result_raw(x) where x is a specific loop results.
240
+	 *  - Call as ->result_raw() for everything.
241
+	 *
242
+	 * @param string $response_number Which response we want to get
243
+	 * @return array|string The entire response array or just the specified response
244
+	 */
245 245
 	public function result_raw($response_number = '')
246 246
 	{
247 247
 		if (!is_numeric($response_number))
@@ -254,13 +254,13 @@  discard block
 block discarded – undo
254 254
 	}
255 255
 
256 256
 	/**
257
-	* Takes supplied POST data and url encodes it
258
-	*  - forms the date (for post) in to a string var=xyz&var2=abc&var3=123
259
-	*  - drops vars with @ since we don't support sending files (uploading)
260
-	*
261
-	* @param array|string $post_data The raw POST data
262
-	* @return string A string of post data
263
-	*/
257
+	 * Takes supplied POST data and url encodes it
258
+	 *  - forms the date (for post) in to a string var=xyz&var2=abc&var3=123
259
+	 *  - drops vars with @ since we don't support sending files (uploading)
260
+	 *
261
+	 * @param array|string $post_data The raw POST data
262
+	 * @return string A string of post data
263
+	 */
264 264
 	private function build_post_data($post_data)
265 265
 	{
266 266
 		if (is_array($post_data))
@@ -279,11 +279,11 @@  discard block
 block discarded – undo
279 279
 	}
280 280
 
281 281
 	/**
282
-	* Sets the final cURL options for the current call
283
-	*  - overwrites our default values with user supplied ones or appends new user ones to what we have
284
-	*  - sets the callback function now that $this is existing
285
-	* @return void
286
-	*/
282
+	 * Sets the final cURL options for the current call
283
+	 *  - overwrites our default values with user supplied ones or appends new user ones to what we have
284
+	 *  - sets the callback function now that $this is existing
285
+	 * @return void
286
+	 */
287 287
 	private function set_options()
288 288
 	{
289 289
 		// Callback to parse the returned headers, if any
@@ -308,12 +308,12 @@  discard block
 block discarded – undo
308 308
 	}
309 309
 
310 310
 	/**
311
-	* Called to initiate a redirect from a 301, 302 or 307 header
312
-	*  - resets the cURL options for the loop, sets the referrer flag
313
-	*
314
-	* @param string $target_url The URL we want to redirect to
315
-	* @param string $referer_url The URL that we're redirecting from
316
-	*/
311
+	 * Called to initiate a redirect from a 301, 302 or 307 header
312
+	 *  - resets the cURL options for the loop, sets the referrer flag
313
+	 *
314
+	 * @param string $target_url The URL we want to redirect to
315
+	 * @param string $referer_url The URL that we're redirecting from
316
+	 */
317 317
 	private function redirect($target_url, $referer_url)
318 318
 	{
319 319
 		// no no I last saw that over there ... really, 301, 302, 307
@@ -323,13 +323,13 @@  discard block
 block discarded – undo
323 323
 	}
324 324
 
325 325
 	/**
326
-	* Callback function to parse returned headers
327
-	*  - lowercases everything to make it consistent
328
-	*
329
-	* @param type $cr Not sure what this is used for?
330
-	* @param string $header The header
331
-	* @return int The length of the header
332
-	*/
326
+	 * Callback function to parse returned headers
327
+	 *  - lowercases everything to make it consistent
328
+	 *
329
+	 * @param type $cr Not sure what this is used for?
330
+	 * @param string $header The header
331
+	 * @return int The length of the header
332
+	 */
333 333
 	private function header_callback($cr, $header)
334 334
 	{
335 335
 		$_header = trim($header);
Please login to merge, or discard this patch.
Sources/News.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 			{
838 838
 				uasort($loaded_attachments, function($a, $b) {
839 839
 					if ($a['filesize'] == $b['filesize'])
840
-					        return 0;
840
+							return 0;
841 841
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
842 842
 				});
843 843
 			}
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 			{
1243 1243
 				uasort($loaded_attachments, function($a, $b) {
1244 1244
 					if ($a['filesize'] == $b['filesize'])
1245
-					        return 0;
1245
+							return 0;
1246 1246
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
1247 1247
 				});
1248 1248
 			}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		$smcFunc['db_free_result']($request);
166 166
 
167 167
 		$feed_meta['title'] = ' - ' . strip_tags($board_info['name']);
168
-		$feed_meta['source'] .= '?board=' . $board . '.0' ;
168
+		$feed_meta['source'] .= '?board=' . $board . '.0';
169 169
 
170 170
 		$query_this_board = 'b.id_board = ' . $board;
171 171
 
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 
390 390
 		foreach ($xml_data as $item)
391 391
 		{
392
-			$link = array_filter($item['content'], function ($e) { return ($e['tag'] == 'link'); });
392
+			$link = array_filter($item['content'], function($e) { return ($e['tag'] == 'link'); });
393 393
 			$link = array_pop($link);
394 394
 
395 395
 			echo '
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -389,7 +389,9 @@  discard block
 block discarded – undo
389 389
 
390 390
 		foreach ($xml_data as $item)
391 391
 		{
392
-			$link = array_filter($item['content'], function ($e) { return ($e['tag'] == 'link'); });
392
+			$link = array_filter($item['content'], function ($e)
393
+			{
394
+return ($e['tag'] == 'link'); });
393 395
 			$link = array_pop($link);
394 396
 
395 397
 			echo '
@@ -446,7 +448,7 @@  discard block
 block discarded – undo
446 448
 		return $val;
447 449
 
448 450
 	$val = preg_replace_callback('~\b' . preg_quote($scripturl, '~') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$~', function($m) use ($scripturl)
449
-		{
451
+	{
450 452
 			return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? $m[2] : "");
451 453
 		}, $val);
452 454
 	return $val;
@@ -867,7 +869,8 @@  discard block
 block discarded – undo
867 869
 			// Sort the attachments by size to make things easier below
868 870
 			if (!empty($loaded_attachments))
869 871
 			{
870
-				uasort($loaded_attachments, function($a, $b) {
872
+				uasort($loaded_attachments, function($a, $b)
873
+				{
871 874
 					if ($a['filesize'] == $b['filesize'])
872 875
 					        return 0;
873 876
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
@@ -1283,7 +1286,8 @@  discard block
 block discarded – undo
1283 1286
 			// Sort the attachments by size to make things easier below
1284 1287
 			if (!empty($loaded_attachments))
1285 1288
 			{
1286
-				uasort($loaded_attachments, function($a, $b) {
1289
+				uasort($loaded_attachments, function($a, $b)
1290
+				{
1287 1291
 					if ($a['filesize'] == $b['filesize'])
1288 1292
 					        return 0;
1289 1293
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
Please login to merge, or discard this patch.
Sources/ManageAttachments.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1542,7 +1542,7 @@  discard block
 block discarded – undo
1542 1542
 					'no_msg' => 0,
1543 1543
 					'substep' => $_GET['substep'],
1544 1544
 					'ignore_ids' => $ignore_ids,
1545
-					'attach_thumb' => array(0,3),
1545
+					'attach_thumb' => array(0, 3),
1546 1546
 				)
1547 1547
 			);
1548 1548
 			
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
 					array(
1573 1573
 						'to_remove' => $to_remove,
1574 1574
 						'no_member' => 0,
1575
-						'attach_thumb' => array(0,3),
1575
+						'attach_thumb' => array(0, 3),
1576 1576
 					)
1577 1577
 				);
1578 1578
 
Please login to merge, or discard this patch.
Sources/Subs-Sound.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 	cache_put_data('wave_file/' . $user_info['ip2'], $ip2 ? $ip2 + 1 : 1, 20);
39 39
 
40 40
 	// Fixate randomization for this word.
41
-    $tmp = unpack('n', md5($word . session_id()));
41
+	$tmp = unpack('n', md5($word . session_id()));
42 42
 	mt_srand(end($tmp));
43 43
 
44 44
 	// Try to see if there's a sound font in the user's language.
Please login to merge, or discard this patch.
Themes/default/Display.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -670,7 +670,7 @@
 block discarded – undo
670 670
 	// Show "<< Last Edit: Time by Person >>" if this post was edited. But we need the div even if it wasn't modified!
671 671
 	// Because we insert into it through AJAX and we don't want to stop themers moving it around if they so wish so they can put it where they want it.
672 672
 	echo '
673
-									<span class="smalltext modified floatright', !empty($modSettings['show_modify']) && !empty($message['modified']['name']) ? ' mvisible' : '','" id="modified_', $message['id'], '">';
673
+									<span class="smalltext modified floatright', !empty($modSettings['show_modify']) && !empty($message['modified']['name']) ? ' mvisible' : '', '" id="modified_', $message['id'], '">';
674 674
 
675 675
 	if (!empty($modSettings['show_modify']) && !empty($message['modified']['name']))
676 676
 		echo
Please login to merge, or discard this patch.