@@ -69,7 +69,7 @@ |
||
69 | 69 | /** |
70 | 70 | * Get a database connection for the bot passwords database |
71 | 71 | * @param int $db Index of the connection to get, e.g. DB_MASTER or DB_SLAVE. |
72 | - * @return DatabaseBase |
|
72 | + * @return DBConnRef |
|
73 | 73 | */ |
74 | 74 | public static function getDB( $db ) { |
75 | 75 | global $wgBotPasswordsCluster, $wgBotPasswordsDatabase; |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | /** |
1136 | 1136 | * Load user data from the session. |
1137 | 1137 | * |
1138 | - * @return bool True if the user is logged in, false otherwise. |
|
1138 | + * @return null|boolean True if the user is logged in, false otherwise. |
|
1139 | 1139 | */ |
1140 | 1140 | private function loadFromSession() { |
1141 | 1141 | // Deprecated hook |
@@ -2708,7 +2708,7 @@ discard block |
||
2708 | 2708 | * resetting it if it's empty (and saving changes). |
2709 | 2709 | * |
2710 | 2710 | * @param string $oname The option name to retrieve the token from |
2711 | - * @return string|bool User's current value for the option, or false if this option is disabled. |
|
2711 | + * @return false|string User's current value for the option, or false if this option is disabled. |
|
2712 | 2712 | * @see resetTokenFromOption() |
2713 | 2713 | * @see getOption() |
2714 | 2714 | * @deprecated 1.26 Applications should use the OAuth extension |
@@ -2737,7 +2737,7 @@ discard block |
||
2737 | 2737 | * *Does not* save user's preferences (similarly to setOption()). |
2738 | 2738 | * |
2739 | 2739 | * @param string $oname The option name to reset the token in |
2740 | - * @return string|bool New token value, or false if this option is disabled. |
|
2740 | + * @return false|string New token value, or false if this option is disabled. |
|
2741 | 2741 | * @see getTokenFromOption() |
2742 | 2742 | * @see setOption() |
2743 | 2743 | */ |
@@ -2773,7 +2773,7 @@ discard block |
||
2773 | 2773 | * new option kind is added. |
2774 | 2774 | * |
2775 | 2775 | * @see User::getOptionKinds |
2776 | - * @return array Option kinds |
|
2776 | + * @return string[] Option kinds |
|
2777 | 2777 | */ |
2778 | 2778 | public static function listOptionKinds() { |
2779 | 2779 | return array( |
@@ -3889,7 +3889,7 @@ discard block |
||
3889 | 3889 | |
3890 | 3890 | /** |
3891 | 3891 | * Get whether the user is explicitly blocked from account creation. |
3892 | - * @return bool|Block |
|
3892 | + * @return Block |
|
3893 | 3893 | */ |
3894 | 3894 | public function isBlockedFromCreateAccount() { |
3895 | 3895 | $this->getBlockedStatus(); |
@@ -4410,7 +4410,7 @@ discard block |
||
4410 | 4410 | /** |
4411 | 4411 | * Get the timestamp of account creation. |
4412 | 4412 | * |
4413 | - * @return string|bool|null Timestamp of account creation, false for |
|
4413 | + * @return false|string Timestamp of account creation, false for |
|
4414 | 4414 | * non-existent/anonymous user accounts, or null if existing account |
4415 | 4415 | * but information is not in database. |
4416 | 4416 | */ |
@@ -4425,7 +4425,7 @@ discard block |
||
4425 | 4425 | /** |
4426 | 4426 | * Get the timestamp of the first edit |
4427 | 4427 | * |
4428 | - * @return string|bool Timestamp of first edit, or false for |
|
4428 | + * @return false|string Timestamp of first edit, or false for |
|
4429 | 4429 | * non-existent/anonymous user accounts. |
4430 | 4430 | */ |
4431 | 4431 | public function getFirstEditTimestamp() { |
@@ -5219,7 +5219,7 @@ discard block |
||
5219 | 5219 | /** |
5220 | 5220 | * Return the list of user fields that should be selected to create |
5221 | 5221 | * a new user object. |
5222 | - * @return array |
|
5222 | + * @return string[] |
|
5223 | 5223 | */ |
5224 | 5224 | public static function selectFields() { |
5225 | 5225 | return array( |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * Do a prefix search of user names and return a list of matching user names. |
32 | 32 | * |
33 | - * @param string|User $audience The string 'public' or a user object to show the search for |
|
33 | + * @param string $audience The string 'public' or a user object to show the search for |
|
34 | 34 | * @param string $search |
35 | 35 | * @param int $limit |
36 | 36 | * @param int $offset How many results to offset from the beginning |
@@ -146,7 +146,7 @@ |
||
146 | 146 | * |
147 | 147 | * @param string $database |
148 | 148 | * @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases |
149 | - * @return IDatabase|null If invalid selection |
|
149 | + * @return DatabaseBase|null If invalid selection |
|
150 | 150 | */ |
151 | 151 | public static function getDB( $database, $ignoreInvalidDB = false ) { |
152 | 152 | global $wgDBname; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * Updates the AutoloadClasses field at the given |
123 | 123 | * filename. |
124 | 124 | * |
125 | - * @param {string} $filename Filename of JSON |
|
125 | + * @param string $filename Filename of JSON |
|
126 | 126 | * extension/skin registration file |
127 | 127 | */ |
128 | 128 | protected function generateJsonAutoload( $filename ) { |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | /** |
158 | 158 | * Generates a PHP file setting up autoload information. |
159 | 159 | * |
160 | - * @param {string} $commandName Command name to include in comment |
|
161 | - * @param {string} $filename of PHP file to put autoload information in. |
|
160 | + * @param string $commandName Command name to include in comment |
|
161 | + * @param string $filename of PHP file to put autoload information in. |
|
162 | 162 | */ |
163 | 163 | protected function generatePHPAutoload( $commandName, $filename ) { |
164 | 164 | // No existing JSON file found; update/generate PHP file |
@@ -278,6 +278,7 @@ discard block |
||
278 | 278 | |
279 | 279 | /** |
280 | 280 | * @var string $code PHP code (including <?php) to detect class names from |
281 | + * @param string $code |
|
281 | 282 | * @return array List of FQCN detected within the tokens |
282 | 283 | */ |
283 | 284 | public function getClasses( $code ) { |
@@ -171,10 +171,16 @@ |
||
171 | 171 | return is_object( $datum ) ? get_class( $datum ) : gettype( $datum ); |
172 | 172 | } |
173 | 173 | |
174 | + /** |
|
175 | + * @param string $expected |
|
176 | + */ |
|
174 | 177 | public static function wrongType( $expected, $datum ) { |
175 | 178 | return "Expected $expected, but recieved " . self::typeOf( $datum ); |
176 | 179 | } |
177 | 180 | |
181 | + /** |
|
182 | + * @param integer $datum |
|
183 | + */ |
|
178 | 184 | public static function outOfRange( $min, $max, $datum ) { |
179 | 185 | return "Expected value between $min and $max, but recieved $datum"; |
180 | 186 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
100 | - * @param array $condition Query conditions suitable for use with |
|
100 | + * @param array $conditions Query conditions suitable for use with |
|
101 | 101 | * IDatabase::select |
102 | 102 | */ |
103 | 103 | public function addConditions( array $conditions ) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
108 | - * @param array $condition Query join conditions suitable for use |
|
108 | + * @param array $conditions Query join conditions suitable for use |
|
109 | 109 | * with IDatabase::select |
110 | 110 | */ |
111 | 111 | public function addJoinConditions( array $conditions ) { |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | * |
300 | 300 | * @param string $host |
301 | 301 | * @param int $port |
302 | - * @param bool|int $defaultPort |
|
302 | + * @param integer $defaultPort |
|
303 | 303 | * @return string |
304 | 304 | */ |
305 | 305 | public static function combineHostAndPort( $host, $port, $defaultPort = false ) { |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * hexadecimal string which sorts after the IPv4 addresses. |
403 | 403 | * |
404 | 404 | * @param string $ip Quad dotted/octet IP address. |
405 | - * @return string|bool False on failure |
|
405 | + * @return string|false False on failure |
|
406 | 406 | */ |
407 | 407 | public static function toHex( $ip ) { |
408 | 408 | if ( self::isIPv6( $ip ) ) { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | * Given an IPv6 address in octet notation, returns a pure hex string. |
436 | 436 | * |
437 | 437 | * @param string $ip Octet ipv6 IP address. |
438 | - * @return string|bool Pure hex (uppercase); false on failure |
|
438 | + * @return false|string Pure hex (uppercase); false on failure |
|
439 | 439 | */ |
440 | 440 | private static function IPv6ToRawHex( $ip ) { |
441 | 441 | $ip = self::sanitizeIP( $ip ); |
@@ -216,6 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | /** |
218 | 218 | * @see self::generate() |
219 | + * @param integer $bytes |
|
219 | 220 | */ |
220 | 221 | public function realGenerate( $bytes, $forceStrong = false ) { |
221 | 222 | |
@@ -351,6 +352,7 @@ discard block |
||
351 | 352 | |
352 | 353 | /** |
353 | 354 | * @see self::generateHex() |
355 | + * @param integer $chars |
|
354 | 356 | */ |
355 | 357 | public function realGenerateHex( $chars, $forceStrong = false ) { |
356 | 358 | // hex strings are 2x the length of raw binary so we divide the length in half |