Completed
Push — release-2.1 ( 08aa48...ab4516 )
by Mathias
06:51
created
other/upgrade.php 2 patches
Doc Comments   +18 added lines patch added patch discarded remove patch
@@ -207,6 +207,9 @@  discard block
 block discarded – undo
207 207
 // MD5 Encryption.
208 208
 if (!function_exists('md5_hmac'))
209 209
 {
210
+	/**
211
+	 * @param string $key
212
+	 */
210 213
 	function md5_hmac($data, $key)
211 214
 	{
212 215
 		if (strlen($key) > 64)
@@ -441,6 +444,9 @@  discard block
 block discarded – undo
441 444
 }
442 445
 
443 446
 // Used to direct the user to another location.
447
+/**
448
+ * @param string $location
449
+ */
444 450
 function redirectLocation($location, $addForm = true)
445 451
 {
446 452
 	global $upgradeurl, $upcontext, $command_line;
@@ -2128,6 +2134,9 @@  discard block
 block discarded – undo
2128 2134
 	return addslashes(preg_replace(array('~^\.([/\\\]|$)~', '~[/]+~', '~[\\\]+~', '~[/\\\]$~'), array($install_path . '$1', '/', '\\', ''), $path));
2129 2135
 }
2130 2136
 
2137
+/**
2138
+ * @param string $filename
2139
+ */
2131 2140
 function parse_sql($filename)
2132 2141
 {
2133 2142
 	global $db_prefix, $db_collation, $boarddir, $boardurl, $command_line, $file_steps, $step_progress, $custom_warning;
@@ -2414,6 +2423,9 @@  discard block
 block discarded – undo
2414 2423
 	return true;
2415 2424
 }
2416 2425
 
2426
+/**
2427
+ * @param string $string
2428
+ */
2417 2429
 function upgrade_query($string, $unbuffered = false)
2418 2430
 {
2419 2431
 	global $db_connection, $db_server, $db_user, $db_passwd, $db_type, $command_line, $upcontext, $upgradeurl, $modSettings;
@@ -3043,6 +3055,9 @@  discard block
 block discarded – undo
3043 3055
 	$upcontext['current_step'] = 1;
3044 3056
 }
3045 3057
 
3058
+/**
3059
+ * @param string $message
3060
+ */
3046 3061
 function print_error($message, $fatal = false)
3047 3062
 {
3048 3063
 	static $fp = null;
@@ -3056,6 +3071,9 @@  discard block
 block discarded – undo
3056 3071
 		exit;
3057 3072
 }
3058 3073
 
3074
+/**
3075
+ * @param string $message
3076
+ */
3059 3077
 function throw_error($message)
3060 3078
 {
3061 3079
 	global $upcontext;
Please login to merge, or discard this patch.
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -426,11 +426,11 @@  discard block
 block discarded – undo
426 426
 
427 427
 		$totalTime = '';
428 428
 		if ($hours > 0)
429
-			$totalTime .= $hours . ' hour' . ($hours > 1 ? 's':'') . ' ';
429
+			$totalTime .= $hours . ' hour' . ($hours > 1 ? 's' : '') . ' ';
430 430
 		if ($minutes > 0)
431
-			$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's':'') . ' ';
431
+			$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's' : '') . ' ';
432 432
 		if ($seconds > 0)
433
-			$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's':'') . ' ';
433
+			$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's' : '') . ' ';
434 434
 
435 435
 		if (!empty($totalTime))
436 436
 			echo "\n" . 'Upgrade completed in ' . $totalTime . "\n";
@@ -710,14 +710,14 @@  discard block
 block discarded – undo
710 710
 	// Do we need to add this setting?
711 711
 	$need_settings_update = empty($modSettings['custom_avatar_dir']);
712 712
 
713
-	$custom_av_dir = !empty($modSettings['custom_avatar_dir']) ? $modSettings['custom_avatar_dir'] : $GLOBALS['boarddir'] .'/custom_avatar';
714
-	$custom_av_url = !empty($modSettings['custom_avatar_url']) ? $modSettings['custom_avatar_url'] : $boardurl .'/custom_avatar';
713
+	$custom_av_dir = !empty($modSettings['custom_avatar_dir']) ? $modSettings['custom_avatar_dir'] : $GLOBALS['boarddir'] . '/custom_avatar';
714
+	$custom_av_url = !empty($modSettings['custom_avatar_url']) ? $modSettings['custom_avatar_url'] : $boardurl . '/custom_avatar';
715 715
 
716 716
 	// This little fellow has to cooperate...
717 717
 	quickFileWritable($custom_av_dir);
718 718
 
719 719
 	// Are we good now?
720
-	if(!is_writable($custom_av_dir))
720
+	if (!is_writable($custom_av_dir))
721 721
 		return throw_error(sprintf('The directory: %1$s has to be writable to continue the upgrade. Please make sure permissions are correctly set to allow this.', $custom_av_dir));
722 722
 	elseif ($need_settings_update)
723 723
 	{
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
 				$upcontext['user']['id'] = 1;
914 914
 				$upcontext['user']['name'] = 'Administrator';
915 915
 			}
916
-			$upcontext['user']['pass'] = mt_rand(0,60000);
916
+			$upcontext['user']['pass'] = mt_rand(0, 60000);
917 917
 			// This basically is used to match the GET variables to Settings.php.
918 918
 			$upcontext['upgrade_status']['pass'] = $upcontext['user']['pass'];
919 919
 
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
 		if ($db_port != ini_get('mysql' . ($db_type == 'mysqli' || !empty($_POST['convertMysql']) ? 'i' : '') . '.default_port'))
1125 1125
 			$changes['db_port'] = (int) $db_port;
1126 1126
 	}
1127
-	elseif(!empty($db_port))
1127
+	elseif (!empty($db_port))
1128 1128
 	{
1129 1129
 		// If db_port is set and is the same as the default, set it to ''
1130 1130
 		if ($db_type == 'mysql' || $db_type == 'mysqli')
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
 		}
1729 1729
 
1730 1730
 		if (!empty($deletes))
1731
-			upgrade_query( '
1731
+			upgrade_query('
1732 1732
 				UPDATE ' . $db_prefix . 'log_packages
1733 1733
 				SET install_state = 0
1734 1734
 				WHERE id_install IN (' . implode(',', $deletes) . ')');
@@ -1807,7 +1807,7 @@  discard block
 block discarded – undo
1807 1807
 	else
1808 1808
 	{
1809 1809
 		require_once($sourcedir . '/ScheduledTasks.php');
1810
-		$forum_version = SMF_VERSION;  // The variable is usually defined in index.php so lets just use the constant to do it for us.
1810
+		$forum_version = SMF_VERSION; // The variable is usually defined in index.php so lets just use the constant to do it for us.
1811 1811
 		scheduled_fetchSMfiles(); // Now go get those files!
1812 1812
 	}
1813 1813
 
@@ -2625,7 +2625,7 @@  discard block
 block discarded – undo
2625 2625
 	}
2626 2626
 	elseif ($change['type'] === 'index')
2627 2627
 	{
2628
-		$request = upgrade_query( '
2628
+		$request = upgrade_query('
2629 2629
 			SHOW INDEX
2630 2630
 			FROM ' . $db_prefix . $change['table']);
2631 2631
 		if ($request !== false)
@@ -3272,7 +3272,7 @@  discard block
 block discarded – undo
3272 3272
 	// Try 755 and 775 first since 777 doesn't always work and could be a risk...
3273 3273
 	$chmod_values = array(0755, 0775, 0777);
3274 3274
 
3275
-	foreach($chmod_values as $val)
3275
+	foreach ($chmod_values as $val)
3276 3276
 	{
3277 3277
 		// If it's writable, break out of the loop
3278 3278
 		if (is_writable($file))
@@ -3482,95 +3482,95 @@  discard block
 block discarded – undo
3482 3482
 		// Translation table for the character sets not native for MySQL.
3483 3483
 		$translation_tables = array(
3484 3484
 			'windows-1255' => array(
3485
-				'0x81' => '\'\'',		'0x8A' => '\'\'',		'0x8C' => '\'\'',
3486
-				'0x8D' => '\'\'',		'0x8E' => '\'\'',		'0x8F' => '\'\'',
3487
-				'0x90' => '\'\'',		'0x9A' => '\'\'',		'0x9C' => '\'\'',
3488
-				'0x9D' => '\'\'',		'0x9E' => '\'\'',		'0x9F' => '\'\'',
3489
-				'0xCA' => '\'\'',		'0xD9' => '\'\'',		'0xDA' => '\'\'',
3490
-				'0xDB' => '\'\'',		'0xDC' => '\'\'',		'0xDD' => '\'\'',
3491
-				'0xDE' => '\'\'',		'0xDF' => '\'\'',		'0xFB' => '\'\'',
3492
-				'0xFC' => '\'\'',		'0xFF' => '\'\'',		'0xC2' => '0xFF',
3493
-				'0x80' => '0xFC',		'0xE2' => '0xFB',		'0xA0' => '0xC2A0',
3494
-				'0xA1' => '0xC2A1',		'0xA2' => '0xC2A2',		'0xA3' => '0xC2A3',
3495
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
3496
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
3497
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
3498
-				'0xAF' => '0xC2AF',		'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',
3499
-				'0xB2' => '0xC2B2',		'0xB3' => '0xC2B3',		'0xB4' => '0xC2B4',
3500
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
3501
-				'0xB8' => '0xC2B8',		'0xB9' => '0xC2B9',		'0xBB' => '0xC2BB',
3502
-				'0xBC' => '0xC2BC',		'0xBD' => '0xC2BD',		'0xBE' => '0xC2BE',
3503
-				'0xBF' => '0xC2BF',		'0xD7' => '0xD7B3',		'0xD1' => '0xD781',
3504
-				'0xD4' => '0xD7B0',		'0xD5' => '0xD7B1',		'0xD6' => '0xD7B2',
3505
-				'0xE0' => '0xD790',		'0xEA' => '0xD79A',		'0xEC' => '0xD79C',
3506
-				'0xED' => '0xD79D',		'0xEE' => '0xD79E',		'0xEF' => '0xD79F',
3507
-				'0xF0' => '0xD7A0',		'0xF1' => '0xD7A1',		'0xF2' => '0xD7A2',
3508
-				'0xF3' => '0xD7A3',		'0xF5' => '0xD7A5',		'0xF6' => '0xD7A6',
3509
-				'0xF7' => '0xD7A7',		'0xF8' => '0xD7A8',		'0xF9' => '0xD7A9',
3510
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
3511
-				'0x86' => '0xE280A0',	'0x87' => '0xE280A1',	'0x89' => '0xE280B0',
3512
-				'0x8B' => '0xE280B9',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
3513
-				'0x95' => '0xE280A2',	'0x97' => '0xE28094',	'0x99' => '0xE284A2',
3514
-				'0xC0' => '0xD6B0',		'0xC1' => '0xD6B1',		'0xC3' => '0xD6B3',
3515
-				'0xC4' => '0xD6B4',		'0xC5' => '0xD6B5',		'0xC6' => '0xD6B6',
3516
-				'0xC7' => '0xD6B7',		'0xC8' => '0xD6B8',		'0xC9' => '0xD6B9',
3517
-				'0xCB' => '0xD6BB',		'0xCC' => '0xD6BC',		'0xCD' => '0xD6BD',
3518
-				'0xCE' => '0xD6BE',		'0xCF' => '0xD6BF',		'0xD0' => '0xD780',
3519
-				'0xD2' => '0xD782',		'0xE3' => '0xD793',		'0xE4' => '0xD794',
3520
-				'0xE5' => '0xD795',		'0xE7' => '0xD797',		'0xE9' => '0xD799',
3521
-				'0xFD' => '0xE2808E',	'0xFE' => '0xE2808F',	'0x92' => '0xE28099',
3522
-				'0x83' => '0xC692',		'0xD3' => '0xD783',		'0x88' => '0xCB86',
3523
-				'0x98' => '0xCB9C',		'0x91' => '0xE28098',	'0x96' => '0xE28093',
3524
-				'0xBA' => '0xC3B7',		'0x9B' => '0xE280BA',	'0xAA' => '0xC397',
3525
-				'0xA4' => '0xE282AA',	'0xE1' => '0xD791',		'0xE6' => '0xD796',
3526
-				'0xE8' => '0xD798',		'0xEB' => '0xD79B',		'0xF4' => '0xD7A4',
3527
-				'0xFA' => '0xD7AA',		'0xFF' => '0xD6B2',		'0xFC' => '0xE282AC',
3485
+				'0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'',
3486
+				'0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'',
3487
+				'0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'',
3488
+				'0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'',
3489
+				'0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'',
3490
+				'0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'',
3491
+				'0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '\'\'',
3492
+				'0xFC' => '\'\'', '0xFF' => '\'\'', '0xC2' => '0xFF',
3493
+				'0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0',
3494
+				'0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3',
3495
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
3496
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
3497
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
3498
+				'0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1',
3499
+				'0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4',
3500
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
3501
+				'0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB',
3502
+				'0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE',
3503
+				'0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781',
3504
+				'0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2',
3505
+				'0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C',
3506
+				'0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F',
3507
+				'0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2',
3508
+				'0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6',
3509
+				'0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9',
3510
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
3511
+				'0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0',
3512
+				'0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
3513
+				'0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2',
3514
+				'0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3',
3515
+				'0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6',
3516
+				'0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9',
3517
+				'0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD',
3518
+				'0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780',
3519
+				'0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794',
3520
+				'0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799',
3521
+				'0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099',
3522
+				'0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86',
3523
+				'0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093',
3524
+				'0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397',
3525
+				'0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796',
3526
+				'0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4',
3527
+				'0xFA' => '0xD7AA', '0xFF' => '0xD6B2', '0xFC' => '0xE282AC',
3528 3528
 				'0xFB' => '0xD792',
3529 3529
 			),
3530 3530
 			'windows-1253' => array(
3531
-				'0x81' => '\'\'',			'0x88' => '\'\'',			'0x8A' => '\'\'',
3532
-				'0x8C' => '\'\'',			'0x8D' => '\'\'',			'0x8E' => '\'\'',
3533
-				'0x8F' => '\'\'',			'0x90' => '\'\'',			'0x98' => '\'\'',
3534
-				'0x9A' => '\'\'',			'0x9C' => '\'\'',			'0x9D' => '\'\'',
3535
-				'0x9E' => '\'\'',			'0x9F' => '\'\'',			'0xAA' => '\'\'',
3536
-				'0xD2' => '\'\'',			'0xFF' => '\'\'',			'0xCE' => '0xCE9E',
3537
-				'0xB8' => '0xCE88',		'0xBA' => '0xCE8A',		'0xBC' => '0xCE8C',
3538
-				'0xBE' => '0xCE8E',		'0xBF' => '0xCE8F',		'0xC0' => '0xCE90',
3539
-				'0xC8' => '0xCE98',		'0xCA' => '0xCE9A',		'0xCC' => '0xCE9C',
3540
-				'0xCD' => '0xCE9D',		'0xCF' => '0xCE9F',		'0xDA' => '0xCEAA',
3541
-				'0xE8' => '0xCEB8',		'0xEA' => '0xCEBA',		'0xEC' => '0xCEBC',
3542
-				'0xEE' => '0xCEBE',		'0xEF' => '0xCEBF',		'0xC2' => '0xFF',
3543
-				'0xBD' => '0xC2BD',		'0xED' => '0xCEBD',		'0xB2' => '0xC2B2',
3544
-				'0xA0' => '0xC2A0',		'0xA3' => '0xC2A3',		'0xA4' => '0xC2A4',
3545
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
3546
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
3547
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
3548
-				'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',		'0xB3' => '0xC2B3',
3549
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
3550
-				'0xBB' => '0xC2BB',		'0xE2' => '0xCEB2',		'0x80' => '0xD2',
3551
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
3552
-				'0x86' => '0xE280A0',	'0xA1' => '0xCE85',		'0xA2' => '0xCE86',
3553
-				'0x87' => '0xE280A1',	'0x89' => '0xE280B0',	'0xB9' => '0xCE89',
3554
-				'0x8B' => '0xE280B9',	'0x91' => '0xE28098',	'0x99' => '0xE284A2',
3555
-				'0x92' => '0xE28099',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
3556
-				'0x95' => '0xE280A2',	'0x96' => '0xE28093',	'0x97' => '0xE28094',
3557
-				'0x9B' => '0xE280BA',	'0xAF' => '0xE28095',	'0xB4' => '0xCE84',
3558
-				'0xC1' => '0xCE91',		'0xC3' => '0xCE93',		'0xC4' => '0xCE94',
3559
-				'0xC5' => '0xCE95',		'0xC6' => '0xCE96',		'0x83' => '0xC692',
3560
-				'0xC7' => '0xCE97',		'0xC9' => '0xCE99',		'0xCB' => '0xCE9B',
3561
-				'0xD0' => '0xCEA0',		'0xD1' => '0xCEA1',		'0xD3' => '0xCEA3',
3562
-				'0xD4' => '0xCEA4',		'0xD5' => '0xCEA5',		'0xD6' => '0xCEA6',
3563
-				'0xD7' => '0xCEA7',		'0xD8' => '0xCEA8',		'0xD9' => '0xCEA9',
3564
-				'0xDB' => '0xCEAB',		'0xDC' => '0xCEAC',		'0xDD' => '0xCEAD',
3565
-				'0xDE' => '0xCEAE',		'0xDF' => '0xCEAF',		'0xE0' => '0xCEB0',
3566
-				'0xE1' => '0xCEB1',		'0xE3' => '0xCEB3',		'0xE4' => '0xCEB4',
3567
-				'0xE5' => '0xCEB5',		'0xE6' => '0xCEB6',		'0xE7' => '0xCEB7',
3568
-				'0xE9' => '0xCEB9',		'0xEB' => '0xCEBB',		'0xF0' => '0xCF80',
3569
-				'0xF1' => '0xCF81',		'0xF2' => '0xCF82',		'0xF3' => '0xCF83',
3570
-				'0xF4' => '0xCF84',		'0xF5' => '0xCF85',		'0xF6' => '0xCF86',
3571
-				'0xF7' => '0xCF87',		'0xF8' => '0xCF88',		'0xF9' => '0xCF89',
3572
-				'0xFA' => '0xCF8A',		'0xFB' => '0xCF8B',		'0xFC' => '0xCF8C',
3573
-				'0xFD' => '0xCF8D',		'0xFE' => '0xCF8E',		'0xFF' => '0xCE92',
3531
+				'0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'',
3532
+				'0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'',
3533
+				'0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'',
3534
+				'0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'',
3535
+				'0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'',
3536
+				'0xD2' => '\'\'', '0xFF' => '\'\'', '0xCE' => '0xCE9E',
3537
+				'0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C',
3538
+				'0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90',
3539
+				'0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C',
3540
+				'0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA',
3541
+				'0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC',
3542
+				'0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF',
3543
+				'0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2',
3544
+				'0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4',
3545
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
3546
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
3547
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
3548
+				'0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3',
3549
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
3550
+				'0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2',
3551
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
3552
+				'0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86',
3553
+				'0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89',
3554
+				'0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2',
3555
+				'0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
3556
+				'0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094',
3557
+				'0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84',
3558
+				'0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94',
3559
+				'0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692',
3560
+				'0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B',
3561
+				'0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3',
3562
+				'0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6',
3563
+				'0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9',
3564
+				'0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD',
3565
+				'0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0',
3566
+				'0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4',
3567
+				'0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7',
3568
+				'0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80',
3569
+				'0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83',
3570
+				'0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86',
3571
+				'0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89',
3572
+				'0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C',
3573
+				'0xFD' => '0xCF8D', '0xFE' => '0xCF8E', '0xFF' => '0xCE92',
3574 3574
 				'0xD2' => '0xE282AC',
3575 3575
 			),
3576 3576
 		);
@@ -3592,7 +3592,7 @@  discard block
 block discarded – undo
3592 3592
 		$upcontext['table_count'] = count($queryTables);
3593 3593
 		$file_steps = $upcontext['table_count'];
3594 3594
 
3595
-		for($substep = $_GET['substep']; $substep < $upcontext['table_count']; $substep++)
3595
+		for ($substep = $_GET['substep']; $substep < $upcontext['table_count']; $substep++)
3596 3596
 		{
3597 3597
 			$table = $queryTables[$_GET['substep']];
3598 3598
 
@@ -3820,7 +3820,7 @@  discard block
 block discarded – undo
3820 3820
 	$upcontext['step_progress'] = (int) (($upcontext['cur_table_num'] / $upcontext['table_count']) * 100);
3821 3821
 	$file_steps = $upcontext['table_count'];
3822 3822
 
3823
-	foreach($keys as $id => $table)
3823
+	foreach ($keys as $id => $table)
3824 3824
 		if ($id < $_GET['substep'])
3825 3825
 			$upcontext['previous_tables'][] = $table;
3826 3826
 
@@ -3835,7 +3835,7 @@  discard block
 block discarded – undo
3835 3835
 			$upcontext['cur_table_name'] = isset($keys[$substep + 1]) ? $keys[$substep + 1] : $keys[$substep];
3836 3836
 			$upcontext['cur_table_num'] = $substep + 1;
3837 3837
 
3838
-			$upcontext['step_progress'] = (int)(($upcontext['cur_table_num'] / $upcontext['table_count']) * 100);
3838
+			$upcontext['step_progress'] = (int) (($upcontext['cur_table_num'] / $upcontext['table_count']) * 100);
3839 3839
 
3840 3840
 			// Do we need to pause?
3841 3841
 			nextSubstep($substep);
@@ -4072,7 +4072,7 @@  discard block
 block discarded – undo
4072 4072
 				The following files need to be writable to continue the upgrade. Please ensure the Windows permissions are correctly set to allow this:<br>
4073 4073
 				<ul style="margin: 2.5ex; font-family: monospace;">
4074 4074
 					<li>' . implode('</li>
4075
-					<li>', $upcontext['chmod']['files']). '</li>
4075
+					<li>', $upcontext['chmod']['files']) . '</li>
4076 4076
 				</ul>
4077 4077
 			</div>';
4078 4078
 
@@ -4168,7 +4168,7 @@  discard block
 block discarded – undo
4168 4168
 		<title>', $txt['upgrade_upgrade_utility'], '</title>
4169 4169
 		<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/index.css?alp21">
4170 4170
 		<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/install.css?alp21">
4171
-		', $txt['lang_rtl'] == true ? '<link rel="stylesheet" href="' . $settings['default_theme_url'] . '/css/rtl.css?alp21">' : '' , '
4171
+		', $txt['lang_rtl'] == true ? '<link rel="stylesheet" href="' . $settings['default_theme_url'] . '/css/rtl.css?alp21">' : '', '
4172 4172
 		<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
4173 4173
 		<script src="', $settings['default_theme_url'], '/scripts/script.js"></script>
4174 4174
 		<script>
@@ -4776,11 +4776,11 @@  discard block
 block discarded – undo
4776 4776
 
4777 4777
 				$totalTime = '';
4778 4778
 				if ($hours > 0)
4779
-					$totalTime .= $hours . ' hour' . ($hours > 1 ? 's':'') . ' ';
4779
+					$totalTime .= $hours . ' hour' . ($hours > 1 ? 's' : '') . ' ';
4780 4780
 				if ($minutes > 0)
4781
-					$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's':'') . ' ';
4781
+					$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's' : '') . ' ';
4782 4782
 				if ($seconds > 0)
4783
-					$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's':'') . ' ';
4783
+					$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's' : '') . ' ';
4784 4784
 			}
4785 4785
 
4786 4786
 			if ($is_debug && !empty($totalTime))
@@ -4813,11 +4813,11 @@  discard block
 block discarded – undo
4813 4813
 
4814 4814
 				$totalTime = '';
4815 4815
 				if ($hours > 0)
4816
-					$totalTime .= $hours . ' hour' . ($hours > 1 ? 's':'') . ' ';
4816
+					$totalTime .= $hours . ' hour' . ($hours > 1 ? 's' : '') . ' ';
4817 4817
 				if ($minutes > 0)
4818
-					$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's':'') . ' ';
4818
+					$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's' : '') . ' ';
4819 4819
 				if ($seconds > 0)
4820
-					$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's':'') . ' ';
4820
+					$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's' : '') . ' ';
4821 4821
 			}
4822 4822
 
4823 4823
 			echo '
@@ -5544,11 +5544,11 @@  discard block
 block discarded – undo
5544 5544
 	{
5545 5545
 		$totalTime = '';
5546 5546
 		if ($hours > 0)
5547
-			$totalTime .= $hours . ' hour' . ($hours > 1 ? 's':'') . ' ';
5547
+			$totalTime .= $hours . ' hour' . ($hours > 1 ? 's' : '') . ' ';
5548 5548
 		if ($minutes > 0)
5549
-			$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's':'') . ' ';
5549
+			$totalTime .= $minutes . ' minute' . ($minutes > 1 ? 's' : '') . ' ';
5550 5550
 		if ($seconds > 0)
5551
-			$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's':'') . ' ';
5551
+			$totalTime .= $seconds . ' second' . ($seconds > 1 ? 's' : '') . ' ';
5552 5552
 	}
5553 5553
 
5554 5554
 	if ($is_debug && !empty($totalTime))
Please login to merge, or discard this patch.
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-Package.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * of elements, an array of xmlArray's is returned for use with foreach.
258 258
 	 * Example use:
259 259
 	 *  foreach ($xml->set('html/body/p') as $p)
260
-	 * @param $path string The path to search for.
260
+	 * @param string $path string The path to search for.
261 261
 	 * @return array An array of xmlArray objects
262 262
 	 */
263 263
 	public function set($path)
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 	 * Changes a files atrributes (chmod)
856 856
 	 *
857 857
 	 * @param string $ftp_file The file to CHMOD
858
-	 * @param int|string $chmod The value for the CHMOD operation
858
+	 * @param integer $chmod The value for the CHMOD operation
859 859
 	 * @return boolean Whether or not the operation was successful
860 860
 	 */
861 861
 	public function chmod($ftp_file, $chmod)
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 	 *
1026 1026
 	 * @param string $ftp_path The path to the directory
1027 1027
 	 * @param bool $search Whether or not to get a recursive directory listing
1028
-	 * @return string|boolean The results of the command or false if unsuccessful
1028
+	 * @return false|string The results of the command or false if unsuccessful
1029 1029
 	 */
1030 1030
 	public function list_dir($ftp_path = '', $search = false)
1031 1031
 	{
@@ -1070,7 +1070,7 @@  discard block
 block discarded – undo
1070 1070
 	 *
1071 1071
 	 * @param string $file The name of a file
1072 1072
 	 * @param string $listing A directory listing or null to generate one
1073
-	 * @return string|boolean The name of the file or false if it wasn't found
1073
+	 * @return string|false The name of the file or false if it wasn't found
1074 1074
 	 */
1075 1075
 	public function locate($file, $listing = null)
1076 1076
 	{
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 			if ((!isset($match[3]) || trim($match[3]) != '/') && (!isset($match[2]) || trim($match[2]) != '/'))
425 425
 			{
426 426
 				// Because PHP 5.2.0+ seems to croak using regex, we'll have to do this the less fun way.
427
-				$last_tag_end = strpos($data, '</' . $match[1]. '>');
427
+				$last_tag_end = strpos($data, '</' . $match[1] . '>');
428 428
 				if ($last_tag_end === false)
429 429
 					continue;
430 430
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 						break;
439 439
 
440 440
 					// If not then find the next ending tag.
441
-					$next_tag_end = strpos($data, '</' . $match[1]. '>', $offset);
441
+					$next_tag_end = strpos($data, '</' . $match[1] . '>', $offset);
442 442
 
443 443
 					// Didn't find one? Then just use the last and sod it.
444 444
 					if ($next_tag_end === false)
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 				// Parse the insides.
453 453
 				$inner_match = substr($data, 0, $last_tag_end);
454 454
 				// Data now starts from where this section ends.
455
-				$data = substr($data, $last_tag_end + strlen('</' . $match[1]. '>'));
455
+				$data = substr($data, $last_tag_end + strlen('</' . $match[1] . '>'));
456 456
 
457 457
 				if (!empty($inner_match))
458 458
 				{
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 		$trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES));
619 619
 
620 620
 		// Translate all the entities out.
621
-		$data = strtr(preg_replace_callback('~&#(\d{1,4});~', function ($m)
621
+		$data = strtr(preg_replace_callback('~&#(\d{1,4});~', function($m)
622 622
 		{
623 623
 			return chr("$m[1]");
624 624
 		}, $data), $trans_tbl);
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
 		// Set different modes.
874 874
 		$chmod_values = $is_dir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666);
875 875
 
876
-		foreach($chmod_values as $val)
876
+		foreach ($chmod_values as $val)
877 877
 		{
878 878
 			// If it's writable, break out of the loop.
879 879
 			if (is_writable($ftp_file))
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.