Completed
Push — release-2.1 ( 64d581...84b0cc )
by Rick
06:44 queued 10s
created
Sources/Class-CurlFetchWeb.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	* Start the curl object
63 63
 	* - allow for user override values
64 64
 	*
65
-	* @param array $options An array of cURL options
65
+	* @param integer[] $options An array of cURL options
66 66
 	* @param int $max_redirect Maximum number of redirects
67 67
 	* @return void
68 68
 	*/
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 	*  - calls set_options to set the curl opts array values based on the defaults and user input
82 82
 	*
83 83
 	* @param string $url the site we are going to fetch
84
-	* @param array $post_data any post data as form name => value
85
-	* @return object An instance of the curl_fetch_web_data class
84
+	* @param string $post_data any post data as form name => value
85
+	* @return curl_fetch_web_data An instance of the curl_fetch_web_data class
86 86
 	*/
87 87
 	public function get_url_data($url, $post_data = array())
88 88
 	{
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	*
107 107
 	* @param string $url The site to fetch
108 108
 	* @param bool $redirect Whether or not this was a redirect request
109
-	* @return void|bool Sets various properties of the class or returns false if the URL isn't specified
109
+	* @return false|null Sets various properties of the class or returns false if the URL isn't specified
110 110
 	*/
111 111
 	private function curl_request($url, $redirect = false)
112 112
 	{
Please login to merge, or discard this patch.
Sources/Class-Graphics.php 2 patches
Doc Comments   +28 added lines patch added patch discarded remove patch
@@ -44,6 +44,10 @@  discard block
 block discarded – undo
44 44
 		$this->Buf   = range(0, 279);
45 45
 	}
46 46
 
47
+	/**
48
+	 * @param string $data
49
+	 * @param integer $datLen
50
+	 */
47 51
 	public function decompress($data, &$datLen)
48 52
 	{
49 53
 		$stLen  = strlen($data);
@@ -63,6 +67,11 @@  discard block
 block discarded – undo
63 67
 		return $ret;
64 68
 	}
65 69
 
70
+	/**
71
+	 * @param boolean $bInit
72
+	 *
73
+	 * @return integer
74
+	 */
66 75
 	public function LZWCommand(&$data, $bInit)
67 76
 	{
68 77
 		if ($bInit)
@@ -253,6 +262,10 @@  discard block
 block discarded – undo
253 262
 		unset($this->m_nColors, $this->m_arColors);
254 263
 	}
255 264
 
265
+	/**
266
+	 * @param string $lpData
267
+	 * @param integer $num
268
+	 */
256 269
 	public function load($lpData, $num)
257 270
 	{
258 271
 		$this->m_nColors  = 0;
@@ -324,6 +337,9 @@  discard block
 block discarded – undo
324 337
 		unset($this->m_bSorted, $this->m_nTableSize, $this->m_nBgColor, $this->m_nPixelRatio, $this->m_colorTable);
325 338
 	}
326 339
 
340
+	/**
341
+	 * @param integer $hdrLen
342
+	 */
327 343
 	public function load($lpData, &$hdrLen)
328 344
 	{
329 345
 		$hdrLen = 0;
@@ -370,6 +386,10 @@  discard block
 block discarded – undo
370 386
 		unset($this->m_bInterlace, $this->m_bSorted, $this->m_nTableSize, $this->m_colorTable);
371 387
 	}
372 388
 
389
+	/**
390
+	 * @param string $lpData
391
+	 * @param integer $hdrLen
392
+	 */
373 393
 	public function load($lpData, &$hdrLen)
374 394
 	{
375 395
 		$hdrLen = 0;
@@ -412,6 +432,10 @@  discard block
 block discarded – undo
412 432
 		$this->m_lzw = new gif_lzw_compression();
413 433
 	}
414 434
 
435
+	/**
436
+	 * @param string $data
437
+	 * @param integer $datLen
438
+	 */
415 439
 	public function load($data, &$datLen)
416 440
 	{
417 441
 		$datLen = 0;
@@ -464,6 +488,10 @@  discard block
 block discarded – undo
464 488
 		return false;
465 489
 	}
466 490
 
491
+	/**
492
+	 * @param string $data
493
+	 * @param integer $extLen
494
+	 */
467 495
 	public function skipExt(&$data, &$extLen)
468 496
 	{
469 497
 		$extLen = 0;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 		$this->MAX_LZW_BITS = 12;
39 39
 		unset($this->Next, $this->Vals, $this->Stack, $this->Buf);
40 40
 
41
-		$this->Next  = range(0, (1 << $this->MAX_LZW_BITS)       - 1);
42
-		$this->Vals  = range(0, (1 << $this->MAX_LZW_BITS)       - 1);
41
+		$this->Next  = range(0, (1 << $this->MAX_LZW_BITS) - 1);
42
+		$this->Vals  = range(0, (1 << $this->MAX_LZW_BITS) - 1);
43 43
 		$this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1);
44 44
 		$this->Buf   = range(0, 279);
45 45
 	}
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
 		for ($i = 0; $i < $this->m_nColors; $i++)
279 279
 		{
280 280
 			$ret .=
281
-				chr(($this->m_arColors[$i] & 0x000000FF))       . // R
282
-				chr(($this->m_arColors[$i] & 0x0000FF00) >>  8) . // G
283
-				chr(($this->m_arColors[$i] & 0x00FF0000) >> 16);  // B
281
+				chr(($this->m_arColors[$i] & 0x000000FF)) . // R
282
+				chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
283
+				chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B
284 284
 		}
285 285
 
286 286
 		return $ret;
@@ -290,14 +290,14 @@  discard block
 block discarded – undo
290 290
 	{
291 291
 		$rgb  = intval($rgb) & 0xFFFFFF;
292 292
 		$r1   = ($rgb & 0x0000FF);
293
-		$g1   = ($rgb & 0x00FF00) >>  8;
293
+		$g1   = ($rgb & 0x00FF00) >> 8;
294 294
 		$b1   = ($rgb & 0xFF0000) >> 16;
295 295
 		$idx  = -1;
296 296
 
297 297
 		for ($i = 0; $i < $this->m_nColors; $i++)
298 298
 		{
299 299
 			$r2 = ($this->m_arColors[$i] & 0x000000FF);
300
-			$g2 = ($this->m_arColors[$i] & 0x0000FF00) >>  8;
300
+			$g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8;
301 301
 			$b2 = ($this->m_arColors[$i] & 0x00FF0000) >> 16;
302 302
 			$d  = abs($r2 - $r1) + abs($g2 - $g1) + abs($b2 - $b1);
303 303
 
Please login to merge, or discard this patch.
Sources/Class-SearchAPI.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,6 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * @param array $wordsSearch Search words
57 57
 	 * @param array $wordsExclude Words to exclude
58 58
 	 * @param bool $isExcluded Whether the specfied word should be excluded
59
+	 * @return void
59 60
 	 */
60 61
 	public function prepareIndexes($word, array &$wordsSearch, array &$wordsExclude, $isExcluded);
61 62
 
@@ -130,7 +131,7 @@  discard block
 block discarded – undo
130 131
 	 * @param array $excludedIndexWords Indexed words that should be excluded
131 132
 	 * @param array $participants
132 133
 	 * @param array $searchArray
133
-	 * @return mixed
134
+	 * @return integer
134 135
 	 */
135 136
 	public function searchQuery(array $query_params, array $searchWords, array $excludedIndexWords, array $participants, array $searchArray);
136 137
 }
Please login to merge, or discard this patch.
Sources/Class-TOTP.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	/**
280 280
 	 * Generate the timestamp for the calculation
281 281
 	 *
282
-	 * @return integer Timestamp
282
+	 * @return double Timestamp
283 283
 	 */
284 284
 	public function generateTimestamp()
285 285
 	{
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 	 * Truncate the given hash down to just what we need
291 291
 	 *
292 292
 	 * @param string $hash Hash to truncate
293
-	 * @return string Truncated hash value
293
+	 * @return integer Truncated hash value
294 294
 	 */
295 295
 	public function truncateHash($hash)
296 296
 	{
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function setInitKey($key)
116 116
 	{
117
-		if (preg_match('/^['.implode('', array_keys($this->getLookup())).']+$/', $key) == false) {
117
+		if (preg_match('/^[' . implode('', array_keys($this->getLookup())) . ']+$/', $key) == false) {
118 118
 			throw new \InvalidArgumentException('Invalid base32 hash!');
119 119
 		}
120 120
 		$this->initKey = $key;
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 		$initKey = ($initKey == null) ? $this->getInitKey() : $initKey;
248 248
 		$timestamp = ($timestamp == null) ? $this->generateTimestamp() : $timestamp;
249 249
 
250
-		$hash = hash_hmac (
250
+		$hash = hash_hmac(
251 251
 			'sha1',
252 252
 			pack('N*', 0) . pack('N*', $timestamp),
253 253
 			$initKey,
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 		$code = '';
271 271
 
272 272
 		for ($i = 0; $i < $length; $i++) {
273
-			$code .= $lookup[mt_rand(0, strlen($lookup)-1)];
273
+			$code .= $lookup[mt_rand(0, strlen($lookup) - 1)];
274 274
 		}
275 275
 
276 276
 		return $code;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	 */
284 284
 	public function generateTimestamp()
285 285
 	{
286
-		return floor(microtime(true)/$this->getRefresh());
286
+		return floor(microtime(true) / $this->getRefresh());
287 287
 	}
288 288
 
289 289
 	/**
@@ -297,10 +297,10 @@  discard block
 block discarded – undo
297 297
 		$offset = ord($hash[19]) & 0xf;
298 298
 
299 299
 		return (
300
-			((ord($hash[$offset+0]) & 0x7f) << 24 ) |
301
-			((ord($hash[$offset+1]) & 0xff) << 16 ) |
302
-			((ord($hash[$offset+2]) & 0xff) << 8 ) |
303
-			(ord($hash[$offset+3]) & 0xff)
300
+			((ord($hash[$offset + 0]) & 0x7f) << 24) |
301
+			((ord($hash[$offset + 1]) & 0xff) << 16) |
302
+			((ord($hash[$offset + 2]) & 0xff) << 8) |
303
+			(ord($hash[$offset + 3]) & 0xff)
304 304
 		) % pow(10, $this->getCodeLength());
305 305
 	}
306 306
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	{
316 316
 		$lookup = $this->getLookup();
317 317
 
318
-		if (preg_match('/^['.implode('', array_keys($lookup)).']+$/', $hash) == false) {
318
+		if (preg_match('/^[' . implode('', array_keys($lookup)) . ']+$/', $hash) == false) {
319 319
 			throw new \InvalidArgumentException('Invalid base32 hash!');
320 320
 		}
321 321
 
Please login to merge, or discard this patch.
Sources/DbPackages-postgresql.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -518,7 +518,7 @@
 block discarded – undo
518 518
  * @param array $parameters Not used?
519 519
  * @param string $if_exists What to do if the index exists. If 'update', the definition will be updated.
520 520
  * @param string $error
521
- * @return boolean Whether or not the operation was successful
521
+ * @return false|null Whether or not the operation was successful
522 522
  */
523 523
 function smf_db_add_index($table_name, $index_info, $parameters = array(), $if_exists = 'update', $error = 'fatal')
524 524
 {
Please login to merge, or discard this patch.
Sources/Drafts.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
  *
176 176
  * @param string $post_errors A string of info about errors encountered trying to save this draft
177 177
  * @param array $recipientList An array of data about who this PM is being sent to
178
- * @return boolean false if you can't save the draft, true if we're doing this via XML more than 5 seconds after the last save, nothing otherwise
178
+ * @return boolean|null false if you can't save the draft, true if we're doing this via XML more than 5 seconds after the last save, nothing otherwise
179 179
  */
180 180
 function SavePMDraft(&$post_errors, $recipientList)
181 181
 {
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
  *
393 393
  * @param int $id_draft The ID of the draft to delete
394 394
  * @param boolean $check Whether or not to check that the draft belongs to the current user
395
- * @return boolean False if it couldn't be deleted (doesn't return anything otherwise)
395
+ * @return false|null False if it couldn't be deleted (doesn't return anything otherwise)
396 396
  */
397 397
 function DeleteDraft($id_draft, $check = true)
398 398
 {
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
  * @param int $member_id ID of the member to show drafts for
427 427
  * @param boolean|integer If $type is 1, this can be set to only load drafts for posts in the specific topic
428 428
  * @param int $draft_type The type of drafts to show - 0 for post drafts, 1 for PM drafts
429
- * @return boolean False if the drafts couldn't be loaded, nothing otherwise
429
+ * @return false|null False if the drafts couldn't be loaded, nothing otherwise
430 430
  */
431 431
 function ShowDrafts($member_id, $topic = false, $draft_type = 0)
432 432
 {
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
  * Allows for the deleting and loading/editing of drafts
511 511
  *
512 512
  * @param type $memID
513
- * @param type $draft_type
513
+ * @param integer $draft_type
514 514
  */
515 515
 function showProfileDrafts($memID, $draft_type = 0)
516 516
 {
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
  * Uses the showpmdraft template
664 664
  * Allows for the deleting and loading/editing of drafts
665 665
  *
666
- * @param type $memID
666
+ * @param integer $memID
667 667
  */
668 668
 function showPMDrafts($memID = -1)
669 669
 {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 				locked = {int:locked},
86 86
 				is_sticky = {int:is_sticky}
87 87
 			WHERE id_draft = {int:id_draft}',
88
-			array (
88
+			array(
89 89
 				'id_topic' => $topic_id,
90 90
 				'id_board' => $board,
91 91
 				'poster_time' => time(),
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 		DELETE FROM {db_prefix}user_drafts
411 411
 		WHERE id_draft IN ({array_int:id_draft})' . ($check ? '
412 412
 			AND  id_member = {int:id_member}' : ''),
413
-		array (
413
+		array(
414 414
 			'id_draft' => $id_draft,
415 415
 			'id_member' => empty($user_info['id']) ? -1 : $user_info['id'],
416 416
 		)
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 			$context['drafts'][] = array(
472 472
 				'subject' => censorText(shorten_subject(stripslashes($row['subject']), 24)),
473 473
 				'poster_time' => timeformat($row['poster_time']),
474
-				'link' => '<a href="' . $scripturl . '?action=post;board=' . $row['id_board'] . ';' . (!empty($row['id_topic']) ? 'topic='. $row['id_topic'] .'.0;' : '') . 'id_draft=' . $row['id_draft'] . '">' . $row['subject'] . '</a>',
474
+				'link' => '<a href="' . $scripturl . '?action=post;board=' . $row['id_board'] . ';' . (!empty($row['id_topic']) ? 'topic=' . $row['id_topic'] . '.0;' : '') . 'id_draft=' . $row['id_draft'] . '">' . $row['subject'] . '</a>',
475 475
 			);
476 476
 		// PM drafts
477 477
 		elseif ($draft_type === 1)
Please login to merge, or discard this patch.
Sources/Errors.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -474,7 +474,7 @@
 block discarded – undo
474 474
  * Used by fatal_error(), fatal_lang_error()
475 475
  *
476 476
  * @param string $error The error
477
- * @param array $sprintf An array of data to be sprintf()'d into the specified message
477
+ * @param boolean $sprintf An array of data to be sprintf()'d into the specified message
478 478
  */
479 479
 function log_error_online($error, $sprintf = array())
480 480
 {
Please login to merge, or discard this patch.
Sources/ManageBans.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
  * Doesn't clean the inputs
926 926
  *
927 927
  * @param array $items_ids The items to remove
928
- * @param bool|int $group_id The ID of the group these triggers are associated with or false if deleting them from all groups
928
+ * @param integer $group_id The ID of the group these triggers are associated with or false if deleting them from all groups
929 929
  * @return bool Always returns true
930 930
  */
931 931
 function removeBanTriggers($items_ids = array(), $group_id = false)
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
  * Errors in $context['ban_errors']
1120 1120
  *
1121 1121
  * @param array $triggers The triggers to validate
1122
- * @return array An array of riggers and log info ready to be used
1122
+ * @return integer An array of riggers and log info ready to be used
1123 1123
  */
1124 1124
 function validateTriggers(&$triggers)
1125 1125
 {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 					'value' => $txt['ban_added'],
184 184
 				),
185 185
 				'data' => array(
186
-					'function' => function ($rowData) use ($context)
186
+					'function' => function($rowData) use ($context)
187 187
 					{
188 188
 						return timeformat($rowData['ban_time'], empty($context['ban_time_format']) ? true : $context['ban_time_format']);
189 189
 					},
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 					'value' => $txt['ban_expires'],
199 199
 				),
200 200
 				'data' => array(
201
-					'function' => function ($rowData) use ($txt)
201
+					'function' => function($rowData) use ($txt)
202 202
 					{
203 203
 						// This ban never expires...whahaha.
204 204
 						if ($rowData['expire_time'] === null)
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 							'style' => 'width: 60%;text-align: left;',
402 402
 						),
403 403
 						'data' => array(
404
-							'function' => function ($ban_item) use ($txt)
404
+							'function' => function($ban_item) use ($txt)
405 405
 							{
406 406
 								if (in_array($ban_item['type'], array('ip', 'hostname', 'email')))
407 407
 									return '<strong>' . $txt[$ban_item['type']] . ':</strong>&nbsp;' . $ban_item[$ban_item['type']];
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 							'style' => 'width: 15%; text-align: center;',
430 430
 						),
431 431
 						'data' => array(
432
-							'function' => function ($ban_item) use ($txt, $context, $scripturl)
432
+							'function' => function($ban_item) use ($txt, $context, $scripturl)
433 433
 							{
434 434
 								return '<a href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $context['ban_group_id'] . ';bi=' . $ban_item['id'] . '">' . $txt['ban_edit_trigger'] . '</a>';
435 435
 							},
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 			}
555 555
 
556 556
 			// We come from the mod center.
557
-			elseif(isset($_GET['msg']) && !empty($_GET['msg']))
557
+			elseif (isset($_GET['msg']) && !empty($_GET['msg']))
558 558
 			{
559 559
 				$request = $smcFunc['db_query']('', '
560 560
 					SELECT poster_name, poster_ip, poster_email
@@ -1429,7 +1429,7 @@  discard block
 block discarded – undo
1429 1429
 	if (empty($ban_info['cannot']['access']) && empty($ban_info['cannot']['register']) && empty($ban_info['cannot']['post']) && empty($ban_info['cannot']['login']))
1430 1430
 		$context['ban_errors'][] = 'ban_unknown_restriction_type';
1431 1431
 
1432
-	if(!empty($ban_info['id']))
1432
+	if (!empty($ban_info['id']))
1433 1433
 	{
1434 1434
 		// Verify the ban group exists.
1435 1435
 		$request = $smcFunc['db_query']('', '
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
 		$smcFunc['db_free_result']($request);
1448 1448
 	}
1449 1449
 
1450
-	if(!empty($ban_info['name']))
1450
+	if (!empty($ban_info['name']))
1451 1451
 	{
1452 1452
 		// Make sure the name does not already exist (Of course, if it exists in the ban group we are editing, proceed.)
1453 1453
 		$request = $smcFunc['db_query']('', '
@@ -1516,7 +1516,7 @@  discard block
 block discarded – undo
1516 1516
 	if (empty($ban_info['cannot']['access']) && empty($ban_info['cannot']['register']) && empty($ban_info['cannot']['post']) && empty($ban_info['cannot']['login']))
1517 1517
 		$context['ban_errors'][] = 'ban_unknown_restriction_type';
1518 1518
 
1519
-	if(!empty($ban_info['name']))
1519
+	if (!empty($ban_info['name']))
1520 1520
 	{
1521 1521
 		// Check whether a ban with this name already exists.
1522 1522
 		$request = $smcFunc['db_query']('', '
@@ -1795,7 +1795,7 @@  discard block
 block discarded – undo
1795 1795
 	if ($context['selected_entity'] === 'ip')
1796 1796
 	{
1797 1797
 		$listOptions['columns']['banned_entity']['data'] = array(
1798
-			'function' => function ($rowData)
1798
+			'function' => function($rowData)
1799 1799
 			{
1800 1800
 				return range2ip(
1801 1801
 					$rowData['ip_low']
@@ -1812,7 +1812,7 @@  discard block
 block discarded – undo
1812 1812
 	elseif ($context['selected_entity'] === 'hostname')
1813 1813
 	{
1814 1814
 		$listOptions['columns']['banned_entity']['data'] = array(
1815
-			'function' => function ($rowData) use ($smcFunc)
1815
+			'function' => function($rowData) use ($smcFunc)
1816 1816
 			{
1817 1817
 				return strtr($smcFunc['htmlspecialchars']($rowData['hostname']), array('%' => '*'));
1818 1818
 			},
@@ -1825,7 +1825,7 @@  discard block
 block discarded – undo
1825 1825
 	elseif ($context['selected_entity'] === 'email')
1826 1826
 	{
1827 1827
 		$listOptions['columns']['banned_entity']['data'] = array(
1828
-			'function' => function ($rowData) use ($smcFunc)
1828
+			'function' => function($rowData) use ($smcFunc)
1829 1829
 			{
1830 1830
 				return strtr($smcFunc['htmlspecialchars']($rowData['email_address']), array('%' => '*'));
1831 1831
 			},
@@ -2032,7 +2032,7 @@  discard block
 block discarded – undo
2032 2032
 					'value' => $txt['ban_log_date'],
2033 2033
 				),
2034 2034
 				'data' => array(
2035
-					'function' => function ($rowData)
2035
+					'function' => function($rowData)
2036 2036
 					{
2037 2037
 						return timeformat($rowData['log_time']);
2038 2038
 					},
@@ -2122,7 +2122,7 @@  discard block
 block discarded – undo
2122 2122
 	$log_entries = array();
2123 2123
 	while ($row = $smcFunc['db_fetch_assoc']($request))
2124 2124
 	{
2125
-		$row['ip'] = $row['ip'] === null? $dash : inet_dtop($row['ip']);
2125
+		$row['ip'] = $row['ip'] === null ? $dash : inet_dtop($row['ip']);
2126 2126
 		$log_entries[] = $row;
2127 2127
 	}
2128 2128
 	$smcFunc['db_free_result']($request);
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
 	if ($low == $high)
2171 2171
 	    return $low;
2172 2172
 	else
2173
-	    return $low . '-'.$high;
2173
+	    return $low . '-' . $high;
2174 2174
 }
2175 2175
 
2176 2176
 /**
@@ -2286,7 +2286,7 @@  discard block
 block discarded – undo
2286 2286
 		$request = $smcFunc['db_query']('', '
2287 2287
 			SELECT mem.id_member, mem.is_activated
2288 2288
 			FROM {db_prefix}members AS mem
2289
-			WHERE ' . implode( ' OR ', $queryPart),
2289
+			WHERE ' . implode(' OR ', $queryPart),
2290 2290
 			$queryValues
2291 2291
 		);
2292 2292
 		while ($row = $smcFunc['db_fetch_assoc']($request))
Please login to merge, or discard this patch.
Sources/ManagePaid.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1452,7 +1452,7 @@
 block discarded – undo
1452 1452
  *
1453 1453
  * @param int $id_subscribe The subscription ID
1454 1454
  * @param int $id_member The ID of the member
1455
- * @param int|string $renewal 0 if we're forcing start/end time, otherwise a string indicating how long to renew the subscription for ('D', 'W', 'M' or 'Y')
1455
+ * @param integer $renewal 0 if we're forcing start/end time, otherwise a string indicating how long to renew the subscription for ('D', 'W', 'M' or 'Y')
1456 1456
  * @param int $forceStartTime If set, forces the subscription to start at the specified time
1457 1457
  * @param int $forceEndTime If set, forces the subscription to end at the specified time
1458 1458
  */
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 		'items_per_page' => $modSettings['defaultMaxListItems'],
263 263
 		'base_href' => $scripturl . '?action=admin;area=paidsubscribe;sa=view',
264 264
 		'get_items' => array(
265
-			'function' => function ($start, $items_per_page) use ($context)
265
+			'function' => function($start, $items_per_page) use ($context)
266 266
 			{
267 267
 				$subscriptions = array();
268 268
 				$counter = 0;
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 			},
282 282
 		),
283 283
 		'get_count' => array(
284
-			'function' => function () use ($context)
284
+			'function' => function() use ($context)
285 285
 			{
286 286
 				return count($context['subscriptions']);
287 287
 			},
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 					'style' => 'width: 35%;',
295 295
 				),
296 296
 				'data' => array(
297
-					'function' => function ($rowData) use ($scripturl)
297
+					'function' => function($rowData) use ($scripturl)
298 298
 					{
299 299
 						return sprintf('<a href="%1$s?action=admin;area=paidsubscribe;sa=viewsub;sid=%2$s">%3$s</a>', $scripturl, $rowData['id'], $rowData['name']);
300 300
 					},
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 					'value' => $txt['paid_cost'],
306 306
 				),
307 307
 				'data' => array(
308
-					'function' => function ($rowData) use ($txt)
308
+					'function' => function($rowData) use ($txt)
309 309
 					{
310 310
 						return $rowData['flexible'] ? '<em>' . $txt['flexible'] . '</em>' : $rowData['cost'] . ' / ' . $rowData['length'];
311 311
 					},
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 					'class' => 'centercol',
349 349
 				),
350 350
 				'data' => array(
351
-					'function' => function ($rowData) use ($txt)
351
+					'function' => function($rowData) use ($txt)
352 352
 					{
353 353
 						return '<span style="color: ' . ($rowData['active'] ? 'green' : 'red') . '">' . ($rowData['active'] ? $txt['yes'] : $txt['no']) . '</span>';
354 354
 					},
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 			),
358 358
 			'modify' => array(
359 359
 				'data' => array(
360
-					'function' => function ($rowData) use ($txt, $scripturl)
360
+					'function' => function($rowData) use ($txt, $scripturl)
361 361
 					{
362 362
 						return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modify;sid=' . $rowData['id'] . '">' . $txt['modify'] . '</a>';
363 363
 					},
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 			),
367 367
 			'delete' => array(
368 368
 				'data' => array(
369
-					'function' => function ($rowData) use ($scripturl, $txt)
369
+					'function' => function($rowData) use ($scripturl, $txt)
370 370
 					{
371 371
 						return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modify;delete;sid=' . $rowData['id'] . '">' . $txt['delete'] . '</a>';
372 372
 					},
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 					'style' => 'width: 20%;',
824 824
 				),
825 825
 				'data' => array(
826
-					'function' => function ($rowData) use ($scripturl, $txt)
826
+					'function' => function($rowData) use ($scripturl, $txt)
827 827
 					{
828 828
 						return $rowData['id_member'] == 0 ? $txt['guest'] : '<a href="' . $scripturl . '?action=profile;u=' . $rowData['id_member'] . '">' . $rowData['name'] . '</a>';
829 829
 					},
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
 					'class' => 'centercol',
894 894
 				),
895 895
 				'data' => array(
896
-					'function' => function ($rowData) use ($scripturl, $txt)
896
+					'function' => function($rowData) use ($scripturl, $txt)
897 897
 					{
898 898
 						return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $rowData['id'] . '">' . $txt['modify'] . '</a>';
899 899
 					},
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
 					'class' => 'centercol',
907 907
 				),
908 908
 				'data' => array(
909
-					'function' => function ($rowData)
909
+					'function' => function($rowData)
910 910
 					{
911 911
 						return '<input type="checkbox" name="delsub[' . $rowData['id'] . ']" class="input_check">';
912 912
 					},
@@ -1950,7 +1950,7 @@  discard block
 block discarded – undo
1950 1950
 	{
1951 1951
 		while (($file = readdir($dh)) !== false)
1952 1952
 		{
1953
-			if (is_file($sourcedir .'/'. $file) && preg_match('~^Subscriptions-([A-Za-z\d]+)\.php$~', $file, $matches))
1953
+			if (is_file($sourcedir . '/' . $file) && preg_match('~^Subscriptions-([A-Za-z\d]+)\.php$~', $file, $matches))
1954 1954
 			{
1955 1955
 				// Check this is definitely a valid gateway!
1956 1956
 				$fp = fopen($sourcedir . '/' . $file, 'rb');
Please login to merge, or discard this patch.