Index: trunk/phase3/includes/User.php |
— | — | @@ -5,19 +5,19 @@ |
6 | 6 | */ |
7 | 7 | |
8 | 8 | /** |
9 | | - * \int Number of characters in user_token field. |
| 9 | + * Int Number of characters in user_token field. |
10 | 10 | * @ingroup Constants |
11 | 11 | */ |
12 | 12 | define( 'USER_TOKEN_LENGTH', 32 ); |
13 | 13 | |
14 | 14 | /** |
15 | | - * \int Serialized record version. |
| 15 | + * Int Serialized record version. |
16 | 16 | * @ingroup Constants |
17 | 17 | */ |
18 | 18 | define( 'MW_USER_VERSION', 8 ); |
19 | 19 | |
20 | 20 | /** |
21 | | - * \string Some punctuation to prevent editing from broken text-mangling proxies. |
| 21 | + * String Some punctuation to prevent editing from broken text-mangling proxies. |
22 | 22 | * @ingroup Constants |
23 | 23 | */ |
24 | 24 | define( 'EDIT_TOKEN_SUFFIX', '+\\' ); |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | const EDIT_TOKEN_SUFFIX = EDIT_TOKEN_SUFFIX; |
52 | 52 | |
53 | 53 | /** |
54 | | - * \type{\arrayof{\string}} List of member variables which are saved to the |
| 54 | + * Array of Strings List of member variables which are saved to the |
55 | 55 | * shared cache (memcached). Any operation which changes the |
56 | 56 | * corresponding database fields must call a cache-clearing function. |
57 | 57 | * @showinitializer |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | ); |
80 | 80 | |
81 | 81 | /** |
82 | | - * \type{\arrayof{\string}} Core rights. |
| 82 | + * Array of Strings Core rights. |
83 | 83 | * Each of these should have a corresponding message of the form |
84 | 84 | * "right-$right". |
85 | 85 | * @showinitializer |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | 'writeapi', |
142 | 142 | ); |
143 | 143 | /** |
144 | | - * \string Cached results of getAllRights() |
| 144 | + * String Cached results of getAllRights() |
145 | 145 | */ |
146 | 146 | static $mAllRights = false; |
147 | 147 | |
— | — | @@ -152,12 +152,12 @@ |
153 | 153 | //@} |
154 | 154 | |
155 | 155 | /** |
156 | | - * \bool Whether the cache variables have been loaded. |
| 156 | + * Bool Whether the cache variables have been loaded. |
157 | 157 | */ |
158 | 158 | var $mDataLoaded, $mAuthLoaded, $mOptionsLoaded; |
159 | 159 | |
160 | 160 | /** |
161 | | - * \string Initialization data source if mDataLoaded==false. May be one of: |
| 161 | + * String Initialization data source if mDataLoaded==false. May be one of: |
162 | 162 | * - 'defaults' anonymous user initialised from class defaults |
163 | 163 | * - 'name' initialise from mName |
164 | 164 | * - 'id' initialise from mId |
— | — | @@ -167,12 +167,12 @@ |
168 | 168 | */ |
169 | 169 | var $mFrom; |
170 | 170 | |
171 | | - /** @name Lazy-initialized variables, invalidated with clearInstanceCache */ |
172 | | - //@{ |
| 171 | + /** |
| 172 | + * Lazy-initialized variables, invalidated with clearInstanceCache |
| 173 | + */ |
173 | 174 | var $mNewtalk, $mDatePreference, $mBlockedby, $mHash, $mSkin, $mRights, |
174 | 175 | $mBlockreason, $mBlock, $mEffectiveGroups, $mBlockedGlobally, |
175 | 176 | $mLocked, $mHideName, $mOptions; |
176 | | - //@} |
177 | 177 | |
178 | 178 | static $idCacheByName = array(); |
179 | 179 | |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | |
232 | 232 | /** |
233 | 233 | * Load user table data, given mId has already been set. |
234 | | - * @return \bool false if the ID does not exist, true otherwise |
| 234 | + * @return Bool false if the ID does not exist, true otherwise |
235 | 235 | * @private |
236 | 236 | */ |
237 | 237 | function loadFromId() { |
— | — | @@ -297,12 +297,12 @@ |
298 | 298 | * This is slightly less efficient than newFromId(), so use newFromId() if |
299 | 299 | * you have both an ID and a name handy. |
300 | 300 | * |
301 | | - * @param $name \string Username, validated by Title::newFromText() |
302 | | - * @param $validate \mixed Validate username. Takes the same parameters as |
| 301 | + * @param $name String Username, validated by Title::newFromText() |
| 302 | + * @param $validate String|Bool Validate username. Takes the same parameters as |
303 | 303 | * User::getCanonicalName(), except that true is accepted as an alias |
304 | 304 | * for 'valid', for BC. |
305 | 305 | * |
306 | | - * @return User The User object, or false if the username is invalid |
| 306 | + * @return User object, or false if the username is invalid |
307 | 307 | * (e.g. if it contains illegal characters or is an IP address). If the |
308 | 308 | * username is not present in the database, the result will be a user object |
309 | 309 | * with a name, zero user ID and default settings. |
— | — | @@ -326,8 +326,8 @@ |
327 | 327 | /** |
328 | 328 | * Static factory method for creation from a given user ID. |
329 | 329 | * |
330 | | - * @param $id \int Valid user ID |
331 | | - * @return \type{User} The corresponding User object |
| 330 | + * @param $id Int Valid user ID |
| 331 | + * @return User The corresponding User object |
332 | 332 | */ |
333 | 333 | static function newFromId( $id ) { |
334 | 334 | $u = new User; |
— | — | @@ -343,8 +343,8 @@ |
344 | 344 | * |
345 | 345 | * If the code is invalid or has expired, returns NULL. |
346 | 346 | * |
347 | | - * @param $code \string Confirmation code |
348 | | - * @return \type{User} |
| 347 | + * @param $code String Confirmation code |
| 348 | + * @return User |
349 | 349 | */ |
350 | 350 | static function newFromConfirmationCode( $code ) { |
351 | 351 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -363,7 +363,7 @@ |
364 | 364 | * Create a new user object using data from session or cookies. If the |
365 | 365 | * login credentials are invalid, the result is an anonymous user. |
366 | 366 | * |
367 | | - * @return \type{User} |
| 367 | + * @return User |
368 | 368 | */ |
369 | 369 | static function newFromSession() { |
370 | 370 | $user = new User; |
— | — | @@ -374,8 +374,8 @@ |
375 | 375 | /** |
376 | 376 | * Create a new user object from a user row. |
377 | 377 | * The row should have all fields from the user table in it. |
378 | | - * @param $row array A row from the user table |
379 | | - * @return \type{User} |
| 378 | + * @param $row Array A row from the user table |
| 379 | + * @return User |
380 | 380 | */ |
381 | 381 | static function newFromRow( $row ) { |
382 | 382 | $user = new User; |
— | — | @@ -388,8 +388,8 @@ |
389 | 389 | |
390 | 390 | /** |
391 | 391 | * Get the username corresponding to a given user ID |
392 | | - * @param $id \int User ID |
393 | | - * @return \string The corresponding username |
| 392 | + * @param $id Int User ID |
| 393 | + * @return String The corresponding username |
394 | 394 | */ |
395 | 395 | static function whoIs( $id ) { |
396 | 396 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -399,8 +399,8 @@ |
400 | 400 | /** |
401 | 401 | * Get the real name of a user given their user ID |
402 | 402 | * |
403 | | - * @param $id \int User ID |
404 | | - * @return \string The corresponding user's real name |
| 403 | + * @param $id Int User ID |
| 404 | + * @return String The corresponding user's real name |
405 | 405 | */ |
406 | 406 | static function whoIsReal( $id ) { |
407 | 407 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -409,8 +409,8 @@ |
410 | 410 | |
411 | 411 | /** |
412 | 412 | * Get database id given a user name |
413 | | - * @param $name \string Username |
414 | | - * @return \types{\int,\null} The corresponding user's ID, or null if user is nonexistent |
| 413 | + * @param $name String Username |
| 414 | + * @return Int|Null The corresponding user's ID, or null if user is nonexistent |
415 | 415 | */ |
416 | 416 | static function idFromName( $name ) { |
417 | 417 | $nt = Title::makeTitleSafe( NS_USER, $name ); |
— | — | @@ -454,8 +454,8 @@ |
455 | 455 | * addresses like this, if we allowed accounts like this to be created |
456 | 456 | * new users could get the old edits of these anonymous users. |
457 | 457 | * |
458 | | - * @param $name \string String to match |
459 | | - * @return \bool True or false |
| 458 | + * @param $name String to match |
| 459 | + * @return Bool |
460 | 460 | */ |
461 | 461 | static function isIP( $name ) { |
462 | 462 | return preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/',$name) || IP::isIPv6($name); |
— | — | @@ -469,8 +469,8 @@ |
470 | 470 | * is longer than the maximum allowed username size or doesn't begin with |
471 | 471 | * a capital letter. |
472 | 472 | * |
473 | | - * @param $name \string String to match |
474 | | - * @return \bool True or false |
| 473 | + * @param $name String to match |
| 474 | + * @return Bool |
475 | 475 | */ |
476 | 476 | static function isValidUserName( $name ) { |
477 | 477 | global $wgContLang, $wgMaxNameChars; |
— | — | @@ -523,8 +523,8 @@ |
524 | 524 | * If an account already exists in this form, login will be blocked |
525 | 525 | * by a failure to pass this function. |
526 | 526 | * |
527 | | - * @param $name \string String to match |
528 | | - * @return \bool True or false |
| 527 | + * @param $name String to match |
| 528 | + * @return Bool |
529 | 529 | */ |
530 | 530 | static function isUsableName( $name ) { |
531 | 531 | global $wgReservedUsernames; |
— | — | @@ -560,8 +560,8 @@ |
561 | 561 | * Additional blacklisting may be added here rather than in |
562 | 562 | * isValidUserName() to avoid disrupting existing accounts. |
563 | 563 | * |
564 | | - * @param $name \string String to match |
565 | | - * @return \bool True or false |
| 564 | + * @param $name String to match |
| 565 | + * @return Bool |
566 | 566 | */ |
567 | 567 | static function isCreatableName( $name ) { |
568 | 568 | global $wgInvalidUsernameCharacters; |
— | — | @@ -588,7 +588,7 @@ |
589 | 589 | * Is the input a valid password for this user? |
590 | 590 | * |
591 | 591 | * @param $password String Desired password |
592 | | - * @return bool True or false |
| 592 | + * @return Bool |
593 | 593 | */ |
594 | 594 | function isValidPassword( $password ) { |
595 | 595 | //simple boolean wrapper for getPasswordValidity |
— | — | @@ -644,8 +644,8 @@ |
645 | 645 | * |
646 | 646 | * @todo Check for RFC 2822 compilance (bug 959) |
647 | 647 | * |
648 | | - * @param $addr \string E-mail address |
649 | | - * @return \bool True or false |
| 648 | + * @param $addr String E-mail address |
| 649 | + * @return Bool |
650 | 650 | */ |
651 | 651 | public static function isValidEmailAddr( $addr ) { |
652 | 652 | $result = null; |
— | — | @@ -670,8 +670,8 @@ |
671 | 671 | /** |
672 | 672 | * Given unvalidated user input, return a canonical username, or false if |
673 | 673 | * the username is invalid. |
674 | | - * @param $name \string User input |
675 | | - * @param $validate \types{\string,\bool} Type of validation to use: |
| 674 | + * @param $name String User input |
| 675 | + * @param $validate String|Bool type of validation to use: |
676 | 676 | * - false No validation |
677 | 677 | * - 'valid' Valid for batch processes |
678 | 678 | * - 'usable' Valid for batch processes and login |
— | — | @@ -728,8 +728,8 @@ |
729 | 729 | * Count the number of edits of a user |
730 | 730 | * @todo It should not be static and some day should be merged as proper member function / deprecated -- domas |
731 | 731 | * |
732 | | - * @param $uid \int User ID to check |
733 | | - * @return \int The user's edit count |
| 732 | + * @param $uid Int User ID to check |
| 733 | + * @return Int the user's edit count |
734 | 734 | */ |
735 | 735 | static function edits( $uid ) { |
736 | 736 | wfProfileIn( __METHOD__ ); |
— | — | @@ -765,7 +765,7 @@ |
766 | 766 | * Return a random password. Sourced from mt_rand, so it's not particularly secure. |
767 | 767 | * @todo hash random numbers to improve security, like generateToken() |
768 | 768 | * |
769 | | - * @return \string New random password |
| 769 | + * @return String new random password |
770 | 770 | */ |
771 | 771 | static function randomPassword() { |
772 | 772 | global $wgMinimalPasswordLength; |
— | — | @@ -831,7 +831,7 @@ |
832 | 832 | /** |
833 | 833 | * Load user data from the session or login cookie. If there are no valid |
834 | 834 | * credentials, initialises the user as an anonymous user. |
835 | | - * @return \bool True if the user is logged in, false otherwise. |
| 835 | + * @return Bool True if the user is logged in, false otherwise. |
836 | 836 | */ |
837 | 837 | private function loadFromSession() { |
838 | 838 | global $wgRequest, $wgExternalAuthType, $wgAutocreatePolicy; |
— | — | @@ -922,7 +922,7 @@ |
923 | 923 | * Load user and user_group data from the database. |
924 | 924 | * $this::mId must be set, this is how the user is identified. |
925 | 925 | * |
926 | | - * @return \bool True if the user exists, false if the user is anonymous |
| 926 | + * @return Bool True if the user exists, false if the user is anonymous |
927 | 927 | * @private |
928 | 928 | */ |
929 | 929 | function loadFromDatabase() { |
— | — | @@ -957,7 +957,7 @@ |
958 | 958 | /** |
959 | 959 | * Initialize this object from a row from the user table. |
960 | 960 | * |
961 | | - * @param $row \type{\arrayof{\mixed}} Row from the user table to load. |
| 961 | + * @param $row Array Row from the user table to load. |
962 | 962 | */ |
963 | 963 | function loadFromRow( $row ) { |
964 | 964 | $this->mDataLoaded = true; |
— | — | @@ -1001,7 +1001,7 @@ |
1002 | 1002 | |
1003 | 1003 | /** |
1004 | 1004 | * Clear various cached data stored in this object. |
1005 | | - * @param $reloadFrom \string Reload user and user_groups table data from a |
| 1005 | + * @param $reloadFrom String Reload user and user_groups table data from a |
1006 | 1006 | * given source. May be "name", "id", "defaults", "session", or false for |
1007 | 1007 | * no reload. |
1008 | 1008 | */ |
— | — | @@ -1025,7 +1025,7 @@ |
1026 | 1026 | * Combine the language default options with any site-specific options |
1027 | 1027 | * and add the default language variants. |
1028 | 1028 | * |
1029 | | - * @return \type{\arrayof{\string}} Array of options |
| 1029 | + * @return Array of String options |
1030 | 1030 | */ |
1031 | 1031 | static function getDefaultOptions() { |
1032 | 1032 | global $wgNamespacesToBeSearchedDefault; |
— | — | @@ -1052,8 +1052,8 @@ |
1053 | 1053 | /** |
1054 | 1054 | * Get a given default option value. |
1055 | 1055 | * |
1056 | | - * @param $opt \string Name of option to retrieve |
1057 | | - * @return \string Default option value |
| 1056 | + * @param $opt String Name of option to retrieve |
| 1057 | + * @return String Default option value |
1058 | 1058 | */ |
1059 | 1059 | public static function getDefaultOption( $opt ) { |
1060 | 1060 | $defOpts = self::getDefaultOptions(); |
— | — | @@ -1068,7 +1068,7 @@ |
1069 | 1069 | /** |
1070 | 1070 | * Get blocking information |
1071 | 1071 | * @private |
1072 | | - * @param $bFromSlave \bool Whether to check the slave database first. To |
| 1072 | + * @param $bFromSlave Bool Whether to check the slave database first. To |
1073 | 1073 | * improve performance, non-critical checks are done |
1074 | 1074 | * against slaves. Check when actually saving should be |
1075 | 1075 | * done against master. |
— | — | @@ -1160,9 +1160,9 @@ |
1161 | 1161 | /** |
1162 | 1162 | * Whether the given IP is in a DNS blacklist. |
1163 | 1163 | * |
1164 | | - * @param $ip \string IP to check |
1165 | | - * @param $checkWhitelist Boolean: whether to check the whitelist first |
1166 | | - * @return \bool True if blacklisted. |
| 1164 | + * @param $ip String IP to check |
| 1165 | + * @param $checkWhitelist Bool: whether to check the whitelist first |
| 1166 | + * @return Bool True if blacklisted. |
1167 | 1167 | */ |
1168 | 1168 | function isDnsBlacklisted( $ip, $checkWhitelist = false ) { |
1169 | 1169 | global $wgEnableSorbs, $wgEnableDnsBlacklist, |
— | — | @@ -1181,9 +1181,9 @@ |
1182 | 1182 | /** |
1183 | 1183 | * Whether the given IP is in a given DNS blacklist. |
1184 | 1184 | * |
1185 | | - * @param $ip \string IP to check |
1186 | | - * @param $bases \string or Array of Strings: URL of the DNS blacklist |
1187 | | - * @return \bool True if blacklisted. |
| 1185 | + * @param $ip String IP to check |
| 1186 | + * @param $bases String|Array of Strings: URL of the DNS blacklist |
| 1187 | + * @return Bool True if blacklisted. |
1188 | 1188 | */ |
1189 | 1189 | function inDnsBlacklist( $ip, $bases ) { |
1190 | 1190 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1218,7 +1218,7 @@ |
1219 | 1219 | /** |
1220 | 1220 | * Is this user subject to rate limiting? |
1221 | 1221 | * |
1222 | | - * @return \bool True if rate limited |
| 1222 | + * @return Bool True if rate limited |
1223 | 1223 | */ |
1224 | 1224 | public function isPingLimitable() { |
1225 | 1225 | global $wgRateLimitsExcludedGroups; |
— | — | @@ -1243,8 +1243,8 @@ |
1244 | 1244 | * @note When using a shared cache like memcached, IP-address |
1245 | 1245 | * last-hit counters will be shared across wikis. |
1246 | 1246 | * |
1247 | | - * @param $action \string Action to enforce; 'edit' if unspecified |
1248 | | - * @return \bool True if a rate limiter was tripped |
| 1247 | + * @param $action String Action to enforce; 'edit' if unspecified |
| 1248 | + * @return Bool True if a rate limiter was tripped |
1249 | 1249 | */ |
1250 | 1250 | function pingLimiter( $action = 'edit' ) { |
1251 | 1251 | # Call the 'PingLimiter' hook |
— | — | @@ -1336,8 +1336,8 @@ |
1337 | 1337 | /** |
1338 | 1338 | * Check if user is blocked |
1339 | 1339 | * |
1340 | | - * @param $bFromSlave \bool Whether to check the slave database instead of the master |
1341 | | - * @return \bool True if blocked, false otherwise |
| 1340 | + * @param $bFromSlave Bool Whether to check the slave database instead of the master |
| 1341 | + * @return Bool True if blocked, false otherwise |
1342 | 1342 | */ |
1343 | 1343 | function isBlocked( $bFromSlave = true ) { // hacked from false due to horrible probs on site |
1344 | 1344 | $this->getBlockedStatus( $bFromSlave ); |
— | — | @@ -1347,9 +1347,9 @@ |
1348 | 1348 | /** |
1349 | 1349 | * Check if user is blocked from editing a particular article |
1350 | 1350 | * |
1351 | | - * @param $title \string Title to check |
1352 | | - * @param $bFromSlave \bool Whether to check the slave database instead of the master |
1353 | | - * @return \bool True if blocked, false otherwise |
| 1351 | + * @param $title Title to check |
| 1352 | + * @param $bFromSlave Bool whether to check the slave database instead of the master |
| 1353 | + * @return Bool |
1354 | 1354 | */ |
1355 | 1355 | function isBlockedFrom( $title, $bFromSlave = false ) { |
1356 | 1356 | global $wgBlockAllowsUTEdit; |
— | — | @@ -1372,7 +1372,7 @@ |
1373 | 1373 | |
1374 | 1374 | /** |
1375 | 1375 | * If user is blocked, return the name of the user who placed the block |
1376 | | - * @return \string name of blocker |
| 1376 | + * @return String name of blocker |
1377 | 1377 | */ |
1378 | 1378 | function blockedBy() { |
1379 | 1379 | $this->getBlockedStatus(); |
— | — | @@ -1381,7 +1381,7 @@ |
1382 | 1382 | |
1383 | 1383 | /** |
1384 | 1384 | * If user is blocked, return the specified reason for the block |
1385 | | - * @return \string Blocking reason |
| 1385 | + * @return String Blocking reason |
1386 | 1386 | */ |
1387 | 1387 | function blockedFor() { |
1388 | 1388 | $this->getBlockedStatus(); |
— | — | @@ -1390,7 +1390,7 @@ |
1391 | 1391 | |
1392 | 1392 | /** |
1393 | 1393 | * If user is blocked, return the ID for the block |
1394 | | - * @return \int Block ID |
| 1394 | + * @return Int Block ID |
1395 | 1395 | */ |
1396 | 1396 | function getBlockId() { |
1397 | 1397 | $this->getBlockedStatus(); |
— | — | @@ -1402,8 +1402,8 @@ |
1403 | 1403 | * Do not use for actual edit permission checks! |
1404 | 1404 | * This is intented for quick UI checks. |
1405 | 1405 | * |
1406 | | - * @param $ip \type{\string} IP address, uses current client if none given |
1407 | | - * @return \type{\bool} True if blocked, false otherwise |
| 1406 | + * @param $ip String IP address, uses current client if none given |
| 1407 | + * @return Bool True if blocked, false otherwise |
1408 | 1408 | */ |
1409 | 1409 | function isBlockedGlobally( $ip = '' ) { |
1410 | 1410 | if( $this->mBlockedGlobally !== null ) { |
— | — | @@ -1424,7 +1424,7 @@ |
1425 | 1425 | /** |
1426 | 1426 | * Check if user account is locked |
1427 | 1427 | * |
1428 | | - * @return \type{\bool} True if locked, false otherwise |
| 1428 | + * @return Bool True if locked, false otherwise |
1429 | 1429 | */ |
1430 | 1430 | function isLocked() { |
1431 | 1431 | if( $this->mLocked !== null ) { |
— | — | @@ -1439,7 +1439,7 @@ |
1440 | 1440 | /** |
1441 | 1441 | * Check if user account is hidden |
1442 | 1442 | * |
1443 | | - * @return \type{\bool} True if hidden, false otherwise |
| 1443 | + * @return Bool True if hidden, false otherwise |
1444 | 1444 | */ |
1445 | 1445 | function isHidden() { |
1446 | 1446 | if( $this->mHideName !== null ) { |
— | — | @@ -1456,7 +1456,7 @@ |
1457 | 1457 | |
1458 | 1458 | /** |
1459 | 1459 | * Get the user's ID. |
1460 | | - * @return Integer The user's ID; 0 if the user is anonymous or nonexistent |
| 1460 | + * @return Int The user's ID; 0 if the user is anonymous or nonexistent |
1461 | 1461 | */ |
1462 | 1462 | function getId() { |
1463 | 1463 | if( $this->mId === null and $this->mName !== null |
— | — | @@ -1472,7 +1472,7 @@ |
1473 | 1473 | |
1474 | 1474 | /** |
1475 | 1475 | * Set the user and reload all fields according to a given ID |
1476 | | - * @param $v \int User ID to reload |
| 1476 | + * @param $v Int User ID to reload |
1477 | 1477 | */ |
1478 | 1478 | function setId( $v ) { |
1479 | 1479 | $this->mId = $v; |
— | — | @@ -1481,7 +1481,7 @@ |
1482 | 1482 | |
1483 | 1483 | /** |
1484 | 1484 | * Get the user name, or the IP of an anonymous user |
1485 | | - * @return \string User's name or IP address |
| 1485 | + * @return String User's name or IP address |
1486 | 1486 | */ |
1487 | 1487 | function getName() { |
1488 | 1488 | if ( !$this->mDataLoaded && $this->mFrom == 'name' ) { |
— | — | @@ -1508,7 +1508,7 @@ |
1509 | 1509 | * |
1510 | 1510 | * @note User::newFromName() has rougly the same function, when the named user |
1511 | 1511 | * does not exist. |
1512 | | - * @param $str \string New user name to set |
| 1512 | + * @param $str String New user name to set |
1513 | 1513 | */ |
1514 | 1514 | function setName( $str ) { |
1515 | 1515 | $this->load(); |
— | — | @@ -1517,7 +1517,7 @@ |
1518 | 1518 | |
1519 | 1519 | /** |
1520 | 1520 | * Get the user's name escaped by underscores. |
1521 | | - * @return \string Username escaped by underscores. |
| 1521 | + * @return String Username escaped by underscores. |
1522 | 1522 | */ |
1523 | 1523 | function getTitleKey() { |
1524 | 1524 | return str_replace( ' ', '_', $this->getName() ); |
— | — | @@ -1525,7 +1525,7 @@ |
1526 | 1526 | |
1527 | 1527 | /** |
1528 | 1528 | * Check if the user has new messages. |
1529 | | - * @return \bool True if the user has new messages |
| 1529 | + * @return Bool True if the user has new messages |
1530 | 1530 | */ |
1531 | 1531 | function getNewtalk() { |
1532 | 1532 | $this->load(); |
— | — | @@ -1558,7 +1558,7 @@ |
1559 | 1559 | |
1560 | 1560 | /** |
1561 | 1561 | * Return the talk page(s) this user has new messages on. |
1562 | | - * @return \type{\arrayof{\string}} Array of page URLs |
| 1562 | + * @return Array of String page URLs |
1563 | 1563 | */ |
1564 | 1564 | function getNewMessageLinks() { |
1565 | 1565 | $talks = array(); |
— | — | @@ -1576,10 +1576,10 @@ |
1577 | 1577 | * Internal uncached check for new messages |
1578 | 1578 | * |
1579 | 1579 | * @see getNewtalk() |
1580 | | - * @param $field \string 'user_ip' for anonymous users, 'user_id' otherwise |
1581 | | - * @param $id \types{\string,\int} User's IP address for anonymous users, User ID otherwise |
1582 | | - * @param $fromMaster \bool true to fetch from the master, false for a slave |
1583 | | - * @return \bool True if the user has new messages |
| 1580 | + * @param $field String 'user_ip' for anonymous users, 'user_id' otherwise |
| 1581 | + * @param $id String|Int User's IP address for anonymous users, User ID otherwise |
| 1582 | + * @param $fromMaster Bool true to fetch from the master, false for a slave |
| 1583 | + * @return Bool True if the user has new messages |
1584 | 1584 | * @private |
1585 | 1585 | */ |
1586 | 1586 | function checkNewtalk( $field, $id, $fromMaster = false ) { |
— | — | @@ -1595,9 +1595,9 @@ |
1596 | 1596 | |
1597 | 1597 | /** |
1598 | 1598 | * Add or update the new messages flag |
1599 | | - * @param $field \string 'user_ip' for anonymous users, 'user_id' otherwise |
1600 | | - * @param $id \types{\string,\int} User's IP address for anonymous users, User ID otherwise |
1601 | | - * @return \bool True if successful, false otherwise |
| 1599 | + * @param $field String 'user_ip' for anonymous users, 'user_id' otherwise |
| 1600 | + * @param $id String|Int User's IP address for anonymous users, User ID otherwise |
| 1601 | + * @return Bool True if successful, false otherwise |
1602 | 1602 | * @private |
1603 | 1603 | */ |
1604 | 1604 | function updateNewtalk( $field, $id ) { |
— | — | @@ -1617,9 +1617,9 @@ |
1618 | 1618 | |
1619 | 1619 | /** |
1620 | 1620 | * Clear the new messages flag for the given user |
1621 | | - * @param $field \string 'user_ip' for anonymous users, 'user_id' otherwise |
1622 | | - * @param $id \types{\string,\int} User's IP address for anonymous users, User ID otherwise |
1623 | | - * @return \bool True if successful, false otherwise |
| 1621 | + * @param $field String 'user_ip' for anonymous users, 'user_id' otherwise |
| 1622 | + * @param $id String|Int User's IP address for anonymous users, User ID otherwise |
| 1623 | + * @return Bool True if successful, false otherwise |
1624 | 1624 | * @private |
1625 | 1625 | */ |
1626 | 1626 | function deleteNewtalk( $field, $id ) { |
— | — | @@ -1638,7 +1638,7 @@ |
1639 | 1639 | |
1640 | 1640 | /** |
1641 | 1641 | * Update the 'You have new messages!' status. |
1642 | | - * @param $val \bool Whether the user has new messages |
| 1642 | + * @param $val Bool Whether the user has new messages |
1643 | 1643 | */ |
1644 | 1644 | function setNewtalk( $val ) { |
1645 | 1645 | if( wfReadOnly() ) { |
— | — | @@ -1677,7 +1677,7 @@ |
1678 | 1678 | /** |
1679 | 1679 | * Generate a current or new-future timestamp to be stored in the |
1680 | 1680 | * user_touched field when we update things. |
1681 | | - * @return \string Timestamp in TS_MW format |
| 1681 | + * @return String Timestamp in TS_MW format |
1682 | 1682 | */ |
1683 | 1683 | private static function newTouchedTimestamp() { |
1684 | 1684 | global $wgClockSkewFudge; |
— | — | @@ -1724,7 +1724,7 @@ |
1725 | 1725 | |
1726 | 1726 | /** |
1727 | 1727 | * Validate the cache for this account. |
1728 | | - * @param $timestamp \string A timestamp in TS_MW format |
| 1728 | + * @param $timestamp String A timestamp in TS_MW format |
1729 | 1729 | */ |
1730 | 1730 | function validateCache( $timestamp ) { |
1731 | 1731 | $this->load(); |
— | — | @@ -1733,6 +1733,7 @@ |
1734 | 1734 | |
1735 | 1735 | /** |
1736 | 1736 | * Get the user touched timestamp |
| 1737 | + * @return String timestamp |
1737 | 1738 | */ |
1738 | 1739 | function getTouched() { |
1739 | 1740 | $this->load(); |
— | — | @@ -1750,7 +1751,7 @@ |
1751 | 1752 | * wipes it, so the account cannot be logged in until |
1752 | 1753 | * a new password is set, for instance via e-mail. |
1753 | 1754 | * |
1754 | | - * @param $str \string New password to set |
| 1755 | + * @param $str String New password to set |
1755 | 1756 | * @throws PasswordError on failure |
1756 | 1757 | */ |
1757 | 1758 | function setPassword( $str ) { |
— | — | @@ -1781,7 +1782,7 @@ |
1782 | 1783 | /** |
1783 | 1784 | * Set the password and reset the random token unconditionally. |
1784 | 1785 | * |
1785 | | - * @param $str \string New password to set |
| 1786 | + * @param $str String New password to set |
1786 | 1787 | */ |
1787 | 1788 | function setInternalPassword( $str ) { |
1788 | 1789 | $this->load(); |
— | — | @@ -1799,7 +1800,7 @@ |
1800 | 1801 | |
1801 | 1802 | /** |
1802 | 1803 | * Get the user's current token. |
1803 | | - * @return \string Token |
| 1804 | + * @return String Token |
1804 | 1805 | */ |
1805 | 1806 | function getToken() { |
1806 | 1807 | $this->load(); |
— | — | @@ -1810,7 +1811,7 @@ |
1811 | 1812 | * Set the random token (used for persistent authentication) |
1812 | 1813 | * Called from loadDefaults() among other places. |
1813 | 1814 | * |
1814 | | - * @param $token \string If specified, set the token to this value |
| 1815 | + * @param $token String If specified, set the token to this value |
1815 | 1816 | * @private |
1816 | 1817 | */ |
1817 | 1818 | function setToken( $token = false ) { |
— | — | @@ -1833,7 +1834,7 @@ |
1834 | 1835 | /** |
1835 | 1836 | * Set the cookie password |
1836 | 1837 | * |
1837 | | - * @param $str \string New cookie password |
| 1838 | + * @param $str String New cookie password |
1838 | 1839 | * @private |
1839 | 1840 | */ |
1840 | 1841 | function setCookiePassword( $str ) { |
— | — | @@ -1844,8 +1845,8 @@ |
1845 | 1846 | /** |
1846 | 1847 | * Set the password for a password reminder or new account email |
1847 | 1848 | * |
1848 | | - * @param $str \string New password to set |
1849 | | - * @param $throttle \bool If true, reset the throttle timestamp to the present |
| 1849 | + * @param $str String New password to set |
| 1850 | + * @param $throttle Bool If true, reset the throttle timestamp to the present |
1850 | 1851 | */ |
1851 | 1852 | function setNewpassword( $str, $throttle = true ) { |
1852 | 1853 | $this->load(); |
— | — | @@ -1858,7 +1859,7 @@ |
1859 | 1860 | /** |
1860 | 1861 | * Has password reminder email been sent within the last |
1861 | 1862 | * $wgPasswordReminderResendTime hours? |
1862 | | - * @return \bool True or false |
| 1863 | + * @return Bool |
1863 | 1864 | */ |
1864 | 1865 | function isPasswordReminderThrottled() { |
1865 | 1866 | global $wgPasswordReminderResendTime; |
— | — | @@ -1872,7 +1873,7 @@ |
1873 | 1874 | |
1874 | 1875 | /** |
1875 | 1876 | * Get the user's e-mail address |
1876 | | - * @return \string User's email address |
| 1877 | + * @return String User's email address |
1877 | 1878 | */ |
1878 | 1879 | function getEmail() { |
1879 | 1880 | $this->load(); |
— | — | @@ -1882,7 +1883,7 @@ |
1883 | 1884 | |
1884 | 1885 | /** |
1885 | 1886 | * Get the timestamp of the user's e-mail authentication |
1886 | | - * @return \string TS_MW timestamp |
| 1887 | + * @return String TS_MW timestamp |
1887 | 1888 | */ |
1888 | 1889 | function getEmailAuthenticationTimestamp() { |
1889 | 1890 | $this->load(); |
— | — | @@ -1892,7 +1893,7 @@ |
1893 | 1894 | |
1894 | 1895 | /** |
1895 | 1896 | * Set the user's e-mail address |
1896 | | - * @param $str \string New e-mail address |
| 1897 | + * @param $str String New e-mail address |
1897 | 1898 | */ |
1898 | 1899 | function setEmail( $str ) { |
1899 | 1900 | $this->load(); |
— | — | @@ -1902,7 +1903,7 @@ |
1903 | 1904 | |
1904 | 1905 | /** |
1905 | 1906 | * Get the user's real name |
1906 | | - * @return \string User's real name |
| 1907 | + * @return String User's real name |
1907 | 1908 | */ |
1908 | 1909 | function getRealName() { |
1909 | 1910 | $this->load(); |
— | — | @@ -1911,7 +1912,7 @@ |
1912 | 1913 | |
1913 | 1914 | /** |
1914 | 1915 | * Set the user's real name |
1915 | | - * @param $str \string New real name |
| 1916 | + * @param $str String New real name |
1916 | 1917 | */ |
1917 | 1918 | function setRealName( $str ) { |
1918 | 1919 | $this->load(); |
— | — | @@ -1921,9 +1922,9 @@ |
1922 | 1923 | /** |
1923 | 1924 | * Get the user's current setting for a given option. |
1924 | 1925 | * |
1925 | | - * @param $oname \string The option to check |
1926 | | - * @param $defaultOverride \string A default value returned if the option does not exist |
1927 | | - * @return \string User's current value for the option |
| 1926 | + * @param $oname String The option to check |
| 1927 | + * @param $defaultOverride String A default value returned if the option does not exist |
| 1928 | + * @return String User's current value for the option |
1928 | 1929 | * @see getBoolOption() |
1929 | 1930 | * @see getIntOption() |
1930 | 1931 | */ |
— | — | @@ -1957,8 +1958,8 @@ |
1958 | 1959 | /** |
1959 | 1960 | * Get the user's current setting for a given option, as a boolean value. |
1960 | 1961 | * |
1961 | | - * @param $oname \string The option to check |
1962 | | - * @return \bool User's current value for the option |
| 1962 | + * @param $oname String The option to check |
| 1963 | + * @return Bool User's current value for the option |
1963 | 1964 | * @see getOption() |
1964 | 1965 | */ |
1965 | 1966 | function getBoolOption( $oname ) { |
— | — | @@ -1969,9 +1970,9 @@ |
1970 | 1971 | /** |
1971 | 1972 | * Get the user's current setting for a given option, as a boolean value. |
1972 | 1973 | * |
1973 | | - * @param $oname \string The option to check |
1974 | | - * @param $defaultOverride \int A default value returned if the option does not exist |
1975 | | - * @return \int User's current value for the option |
| 1974 | + * @param $oname String The option to check |
| 1975 | + * @param $defaultOverride Int A default value returned if the option does not exist |
| 1976 | + * @return Int User's current value for the option |
1976 | 1977 | * @see getOption() |
1977 | 1978 | */ |
1978 | 1979 | function getIntOption( $oname, $defaultOverride=0 ) { |
— | — | @@ -1985,8 +1986,8 @@ |
1986 | 1987 | /** |
1987 | 1988 | * Set the given option for a user. |
1988 | 1989 | * |
1989 | | - * @param $oname \string The option to set |
1990 | | - * @param $val \mixed New value to set |
| 1990 | + * @param $oname String The option to set |
| 1991 | + * @param $val mixed New value to set |
1991 | 1992 | */ |
1992 | 1993 | function setOption( $oname, $val ) { |
1993 | 1994 | $this->load(); |
— | — | @@ -2015,7 +2016,7 @@ |
2016 | 2017 | |
2017 | 2018 | /** |
2018 | 2019 | * Get the user's preferred date format. |
2019 | | - * @return \string User's preferred date format |
| 2020 | + * @return String User's preferred date format |
2020 | 2021 | */ |
2021 | 2022 | function getDatePreference() { |
2022 | 2023 | // Important migration for old data rows |
— | — | @@ -2047,7 +2048,7 @@ |
2048 | 2049 | |
2049 | 2050 | /** |
2050 | 2051 | * Get the permissions this user has. |
2051 | | - * @return \type{\arrayof{\string}} Array of permission names |
| 2052 | + * @return Array of String permission names |
2052 | 2053 | */ |
2053 | 2054 | function getRights() { |
2054 | 2055 | if ( is_null( $this->mRights ) ) { |
— | — | @@ -2062,7 +2063,7 @@ |
2063 | 2064 | /** |
2064 | 2065 | * Get the list of explicit group memberships this user has. |
2065 | 2066 | * The implicit * and user groups are not included. |
2066 | | - * @return \type{\arrayof{\string}} Array of internal group names |
| 2067 | + * @return Array of String internal group names |
2067 | 2068 | */ |
2068 | 2069 | function getGroups() { |
2069 | 2070 | $this->load(); |
— | — | @@ -2072,9 +2073,9 @@ |
2073 | 2074 | /** |
2074 | 2075 | * Get the list of implicit group memberships this user has. |
2075 | 2076 | * This includes all explicit groups, plus 'user' if logged in, |
2076 | | - * '*' for all accounts and autopromoted groups |
2077 | | - * @param $recache \bool Whether to avoid the cache |
2078 | | - * @return \type{\arrayof{\string}} Array of internal group names |
| 2077 | + * '*' for all accounts, and autopromoted groups |
| 2078 | + * @param $recache Bool Whether to avoid the cache |
| 2079 | + * @return Array of String internal group names |
2079 | 2080 | */ |
2080 | 2081 | function getEffectiveGroups( $recache = false ) { |
2081 | 2082 | if ( $recache || is_null( $this->mEffectiveGroups ) ) { |
— | — | @@ -2099,7 +2100,7 @@ |
2100 | 2101 | |
2101 | 2102 | /** |
2102 | 2103 | * Get the user's edit count. |
2103 | | - * @return \int User'e edit count |
| 2104 | + * @return Int |
2104 | 2105 | */ |
2105 | 2106 | function getEditCount() { |
2106 | 2107 | if( $this->getId() ) { |
— | — | @@ -2117,7 +2118,7 @@ |
2118 | 2119 | /** |
2119 | 2120 | * Add the user to the given group. |
2120 | 2121 | * This takes immediate effect. |
2121 | | - * @param $group \string Name of the group to add |
| 2122 | + * @param $group String Name of the group to add |
2122 | 2123 | */ |
2123 | 2124 | function addGroup( $group ) { |
2124 | 2125 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -2141,7 +2142,7 @@ |
2142 | 2143 | /** |
2143 | 2144 | * Remove the user from the given group. |
2144 | 2145 | * This takes immediate effect. |
2145 | | - * @param $group \string Name of the group to remove |
| 2146 | + * @param $group String Name of the group to remove |
2146 | 2147 | */ |
2147 | 2148 | function removeGroup( $group ) { |
2148 | 2149 | $this->load(); |
— | — | @@ -2161,7 +2162,7 @@ |
2162 | 2163 | |
2163 | 2164 | /** |
2164 | 2165 | * Get whether the user is logged in |
2165 | | - * @return \bool True or false |
| 2166 | + * @return Bool |
2166 | 2167 | */ |
2167 | 2168 | function isLoggedIn() { |
2168 | 2169 | return $this->getID() != 0; |
— | — | @@ -2169,7 +2170,7 @@ |
2170 | 2171 | |
2171 | 2172 | /** |
2172 | 2173 | * Get whether the user is anonymous |
2173 | | - * @return \bool True or false |
| 2174 | + * @return Bool |
2174 | 2175 | */ |
2175 | 2176 | function isAnon() { |
2176 | 2177 | return !$this->isLoggedIn(); |
— | — | @@ -2177,8 +2178,8 @@ |
2178 | 2179 | |
2179 | 2180 | /** |
2180 | 2181 | * Get whether the user is a bot |
2181 | | - * @return \bool True or false |
2182 | | - * @deprecated |
| 2182 | + * @return Bool |
| 2183 | + * @deprecated use isAllowed('bot') |
2183 | 2184 | */ |
2184 | 2185 | function isBot() { |
2185 | 2186 | wfDeprecated( __METHOD__ ); |
— | — | @@ -2187,7 +2188,7 @@ |
2188 | 2189 | |
2189 | 2190 | /** |
2190 | 2191 | * Check if user is allowed to access a feature / make an action |
2191 | | - * @param $action \string action to be checked |
| 2192 | + * @param $action String action to be checked |
2192 | 2193 | * @return Boolean: True if action is allowed, else false |
2193 | 2194 | */ |
2194 | 2195 | function isAllowed( $action = '' ) { |
— | — | @@ -2216,7 +2217,7 @@ |
2217 | 2218 | |
2218 | 2219 | /** |
2219 | 2220 | * Check whether to enable new pages patrol features for this user |
2220 | | - * @return \bool True or false |
| 2221 | + * @return Bool True or false |
2221 | 2222 | */ |
2222 | 2223 | public function useNPPatrol() { |
2223 | 2224 | global $wgUseRCPatrol, $wgUseNPPatrol; |
— | — | @@ -2227,7 +2228,7 @@ |
2228 | 2229 | * Get the current skin, loading it if required, and setting a title |
2229 | 2230 | * @param $t Title: the title to use in the skin |
2230 | 2231 | * @return Skin The current skin |
2231 | | - * @todo FIXME : need to check the old failback system [AV] |
| 2232 | + * @todo: FIXME : need to check the old failback system [AV] |
2232 | 2233 | */ |
2233 | 2234 | function getSkin( $t = null ) { |
2234 | 2235 | if ( $t ) { |
— | — | @@ -2273,8 +2274,8 @@ |
2274 | 2275 | |
2275 | 2276 | /** |
2276 | 2277 | * Check the watched status of an article. |
2277 | | - * @param $title \type{Title} Title of the article to look at |
2278 | | - * @return \bool True if article is watched |
| 2278 | + * @param $title Title of the article to look at |
| 2279 | + * @return Bool |
2279 | 2280 | */ |
2280 | 2281 | function isWatched( $title ) { |
2281 | 2282 | $wl = WatchedItem::fromUserTitle( $this, $title ); |
— | — | @@ -2283,7 +2284,7 @@ |
2284 | 2285 | |
2285 | 2286 | /** |
2286 | 2287 | * Watch an article. |
2287 | | - * @param $title \type{Title} Title of the article to look at |
| 2288 | + * @param $title Title of the article to look at |
2288 | 2289 | */ |
2289 | 2290 | function addWatch( $title ) { |
2290 | 2291 | $wl = WatchedItem::fromUserTitle( $this, $title ); |
— | — | @@ -2293,7 +2294,7 @@ |
2294 | 2295 | |
2295 | 2296 | /** |
2296 | 2297 | * Stop watching an article. |
2297 | | - * @param $title \type{Title} Title of the article to look at |
| 2298 | + * @param $title Title of the article to look at |
2298 | 2299 | */ |
2299 | 2300 | function removeWatch( $title ) { |
2300 | 2301 | $wl = WatchedItem::fromUserTitle( $this, $title ); |
— | — | @@ -2305,7 +2306,7 @@ |
2306 | 2307 | * Clear the user's notification timestamp for the given title. |
2307 | 2308 | * If e-notif e-mails are on, they will receive notification mails on |
2308 | 2309 | * the next change of the page if it's watched etc. |
2309 | | - * @param $title \type{Title} Title of the article to look at |
| 2310 | + * @param $title Title of the article to look at |
2310 | 2311 | */ |
2311 | 2312 | function clearNotification( &$title ) { |
2312 | 2313 | global $wgUser, $wgUseEnotif, $wgShowUpdatedMarker; |
— | — | @@ -2366,7 +2367,7 @@ |
2367 | 2368 | * If e-notif e-mails are on, they will receive notification mails on |
2368 | 2369 | * the next change of any watched page. |
2369 | 2370 | * |
2370 | | - * @param $currentUser \int User ID |
| 2371 | + * @param $currentUser Int User ID |
2371 | 2372 | */ |
2372 | 2373 | function clearAllNotifications( $currentUser ) { |
2373 | 2374 | global $wgUseEnotif, $wgShowUpdatedMarker; |
— | — | @@ -2390,7 +2391,7 @@ |
2391 | 2392 | |
2392 | 2393 | /** |
2393 | 2394 | * Set this user's options from an encoded string |
2394 | | - * @param $str \string Encoded options to import |
| 2395 | + * @param $str String Encoded options to import |
2395 | 2396 | * @private |
2396 | 2397 | */ |
2397 | 2398 | function decodeOptions( $str ) { |
— | — | @@ -2416,9 +2417,9 @@ |
2417 | 2418 | /** |
2418 | 2419 | * Set a cookie on the user's client. Wrapper for |
2419 | 2420 | * WebResponse::setCookie |
2420 | | - * @param $name \string Name of the cookie to set |
2421 | | - * @param $value \string Value to set |
2422 | | - * @param $exp \int Expiration time, as a UNIX time value; |
| 2421 | + * @param $name String Name of the cookie to set |
| 2422 | + * @param $value String Value to set |
| 2423 | + * @param $exp Int Expiration time, as a UNIX time value; |
2423 | 2424 | * if 0 or not specified, use the default $wgCookieExpiration |
2424 | 2425 | */ |
2425 | 2426 | protected function setCookie( $name, $value, $exp = 0 ) { |
— | — | @@ -2428,7 +2429,7 @@ |
2429 | 2430 | |
2430 | 2431 | /** |
2431 | 2432 | * Clear a cookie on the user's client |
2432 | | - * @param $name \string Name of the cookie to clear |
| 2433 | + * @param $name String Name of the cookie to clear |
2433 | 2434 | */ |
2434 | 2435 | protected function clearCookie( $name ) { |
2435 | 2436 | $this->setCookie( $name, '', time() - 86400 ); |
— | — | @@ -2535,6 +2536,7 @@ |
2536 | 2537 | |
2537 | 2538 | /** |
2538 | 2539 | * If only this user's username is known, and it exists, return the user ID. |
| 2540 | + * @return Int |
2539 | 2541 | */ |
2540 | 2542 | function idForName() { |
2541 | 2543 | $s = trim( $this->getName() ); |
— | — | @@ -2551,8 +2553,8 @@ |
2552 | 2554 | /** |
2553 | 2555 | * Add a user to the database, return the user object |
2554 | 2556 | * |
2555 | | - * @param $name \string Username to add |
2556 | | - * @param $params \type{\arrayof{\string}} Non-default parameters to save to the database: |
| 2557 | + * @param $name String Username to add |
| 2558 | + * @param $params Array of Strings Non-default parameters to save to the database: |
2557 | 2559 | * - password The user's password. Password logins will be disabled if this is omitted. |
2558 | 2560 | * - newpassword A temporary password mailed to the user |
2559 | 2561 | * - email The user's email address |
— | — | @@ -2562,7 +2564,7 @@ |
2563 | 2565 | * - token Random authentication token. Do not set. |
2564 | 2566 | * - registration Registration timestamp. Do not set. |
2565 | 2567 | * |
2566 | | - * @return \type{User} A new User object, or null if the username already exists |
| 2568 | + * @return User object, or null if the username already exists |
2567 | 2569 | */ |
2568 | 2570 | static function createNew( $name, $params = array() ) { |
2569 | 2571 | $user = new User; |
— | — | @@ -2662,7 +2664,7 @@ |
2663 | 2665 | * settings. |
2664 | 2666 | * |
2665 | 2667 | * @deprecated use the ParserOptions object to get the relevant options |
2666 | | - * @return \string Page rendering hash |
| 2668 | + * @return String Page rendering hash |
2667 | 2669 | */ |
2668 | 2670 | function getPageRenderingHash() { |
2669 | 2671 | global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang; |
— | — | @@ -2704,7 +2706,7 @@ |
2705 | 2707 | |
2706 | 2708 | /** |
2707 | 2709 | * Get whether the user is explicitly blocked from account creation. |
2708 | | - * @return \bool True if blocked |
| 2710 | + * @return Bool |
2709 | 2711 | */ |
2710 | 2712 | function isBlockedFromCreateAccount() { |
2711 | 2713 | $this->getBlockedStatus(); |
— | — | @@ -2713,7 +2715,7 @@ |
2714 | 2716 | |
2715 | 2717 | /** |
2716 | 2718 | * Get whether the user is blocked from using Special:Emailuser. |
2717 | | - * @return Boolean: True if blocked |
| 2719 | + * @return Bool |
2718 | 2720 | */ |
2719 | 2721 | function isBlockedFromEmailuser() { |
2720 | 2722 | $this->getBlockedStatus(); |
— | — | @@ -2722,7 +2724,7 @@ |
2723 | 2725 | |
2724 | 2726 | /** |
2725 | 2727 | * Get whether the user is allowed to create an account. |
2726 | | - * @return Boolean: True if allowed |
| 2728 | + * @return Bool |
2727 | 2729 | */ |
2728 | 2730 | function isAllowedToCreateAccount() { |
2729 | 2731 | return $this->isAllowed( 'createaccount' ) && !$this->isBlockedFromCreateAccount(); |
— | — | @@ -2766,7 +2768,7 @@ |
2767 | 2769 | /** |
2768 | 2770 | * Determine whether the user is a newbie. Newbies are either |
2769 | 2771 | * anonymous IPs, or the most recently created accounts. |
2770 | | - * @return Boolean: True if the user is a newbie |
| 2772 | + * @return Bool |
2771 | 2773 | */ |
2772 | 2774 | function isNewbie() { |
2773 | 2775 | return !$this->isAllowed( 'autoconfirmed' ); |
— | — | @@ -2836,8 +2838,8 @@ |
2837 | 2839 | * login credentials aren't being hijacked with a foreign form |
2838 | 2840 | * submission. |
2839 | 2841 | * |
2840 | | - * @param $salt \types{\string,\arrayof{\string}} Optional function-specific data for hashing |
2841 | | - * @return \string The new edit token |
| 2842 | + * @param $salt String|Array of Strings Optional function-specific data for hashing |
| 2843 | + * @return String The new edit token |
2842 | 2844 | */ |
2843 | 2845 | function editToken( $salt = '' ) { |
2844 | 2846 | if ( $this->isAnon() ) { |
— | — | @@ -2859,8 +2861,8 @@ |
2860 | 2862 | /** |
2861 | 2863 | * Generate a looking random token for various uses. |
2862 | 2864 | * |
2863 | | - * @param $salt \string Optional salt value |
2864 | | - * @return \string The new random token |
| 2865 | + * @param $salt String Optional salt value |
| 2866 | + * @return String The new random token |
2865 | 2867 | */ |
2866 | 2868 | public static function generateToken( $salt = '' ) { |
2867 | 2869 | $token = dechex( mt_rand() ) . dechex( mt_rand() ); |
— | — | @@ -2873,8 +2875,8 @@ |
2874 | 2876 | * user's own login session, not a form submission from a third-party |
2875 | 2877 | * site. |
2876 | 2878 | * |
2877 | | - * @param $val \string Input value to compare |
2878 | | - * @param $salt \string Optional function-specific data for hashing |
| 2879 | + * @param $val String Input value to compare |
| 2880 | + * @param $salt String Optional function-specific data for hashing |
2879 | 2881 | * @return Boolean: Whether the token matches |
2880 | 2882 | */ |
2881 | 2883 | function matchEditToken( $val, $salt = '' ) { |
— | — | @@ -2889,8 +2891,8 @@ |
2890 | 2892 | * Check given value against the token value stored in the session, |
2891 | 2893 | * ignoring the suffix. |
2892 | 2894 | * |
2893 | | - * @param $val \string Input value to compare |
2894 | | - * @param $salt \string Optional function-specific data for hashing |
| 2895 | + * @param $val String Input value to compare |
| 2896 | + * @param $salt String Optional function-specific data for hashing |
2895 | 2897 | * @return Boolean: Whether the token matches |
2896 | 2898 | */ |
2897 | 2899 | function matchEditTokenNoSuffix( $val, $salt = '' ) { |
— | — | @@ -2929,11 +2931,11 @@ |
2930 | 2932 | * Send an e-mail to this user's account. Does not check for |
2931 | 2933 | * confirmed status or validity. |
2932 | 2934 | * |
2933 | | - * @param $subject \string Message subject |
2934 | | - * @param $body \string Message body |
2935 | | - * @param $from \string Optional From address; if unspecified, default $wgPasswordSender will be used |
2936 | | - * @param $replyto \string Reply-To address |
2937 | | - * @return Status object |
| 2935 | + * @param $subject String Message subject |
| 2936 | + * @param $body String Message body |
| 2937 | + * @param $from String Optional From address; if unspecified, default $wgPasswordSender will be used |
| 2938 | + * @param $replyto String Reply-To address |
| 2939 | + * @return Status |
2938 | 2940 | */ |
2939 | 2941 | function sendMail( $subject, $body, $from = null, $replyto = null ) { |
2940 | 2942 | if( is_null( $from ) ) { |
— | — | @@ -2955,7 +2957,7 @@ |
2956 | 2958 | * this change to the database. |
2957 | 2959 | * |
2958 | 2960 | * @param[out] &$expiration \mixed Accepts the expiration time |
2959 | | - * @return \string New token |
| 2961 | + * @return String New token |
2960 | 2962 | * @private |
2961 | 2963 | */ |
2962 | 2964 | function confirmationToken( &$expiration ) { |
— | — | @@ -2972,8 +2974,8 @@ |
2973 | 2975 | |
2974 | 2976 | /** |
2975 | 2977 | * Return a URL the user can use to confirm their email address. |
2976 | | - * @param $token \string Accepts the email confirmation token |
2977 | | - * @return \string New token URL |
| 2978 | + * @param $token String Accepts the email confirmation token |
| 2979 | + * @return String New token URL |
2978 | 2980 | * @private |
2979 | 2981 | */ |
2980 | 2982 | function confirmationTokenUrl( $token ) { |
— | — | @@ -2982,8 +2984,8 @@ |
2983 | 2985 | |
2984 | 2986 | /** |
2985 | 2987 | * Return a URL the user can use to invalidate their email address. |
2986 | | - * @param $token \string Accepts the email confirmation token |
2987 | | - * @return \string New token URL |
| 2988 | + * @param $token String Accepts the email confirmation token |
| 2989 | + * @return String New token URL |
2988 | 2990 | * @private |
2989 | 2991 | */ |
2990 | 2992 | function invalidationTokenUrl( $token ) { |
— | — | @@ -3000,9 +3002,9 @@ |
3001 | 3003 | * also sometimes can get corrupted in some browsers/mailers |
3002 | 3004 | * (bug 6957 with Gmail and Internet Explorer). |
3003 | 3005 | * |
3004 | | - * @param $page \string Special page |
3005 | | - * @param $token \string Token |
3006 | | - * @return \string Formatted URL |
| 3006 | + * @param $page String Special page |
| 3007 | + * @param $token String Token |
| 3008 | + * @return String Formatted URL |
3007 | 3009 | */ |
3008 | 3010 | protected function getTokenUrl( $page, $token ) { |
3009 | 3011 | global $wgArticlePath; |
— | — | @@ -3041,7 +3043,7 @@ |
3042 | 3044 | |
3043 | 3045 | /** |
3044 | 3046 | * Set the e-mail authentication timestamp. |
3045 | | - * @param $timestamp \string TS_MW timestamp |
| 3047 | + * @param $timestamp String TS_MW timestamp |
3046 | 3048 | */ |
3047 | 3049 | function setEmailAuthenticationTimestamp( $timestamp ) { |
3048 | 3050 | $this->load(); |
— | — | @@ -3052,7 +3054,7 @@ |
3053 | 3055 | /** |
3054 | 3056 | * Is this user allowed to send e-mails within limits of current |
3055 | 3057 | * site configuration? |
3056 | | - * @return Boolean: True if allowed |
| 3058 | + * @return Bool |
3057 | 3059 | */ |
3058 | 3060 | function canSendEmail() { |
3059 | 3061 | global $wgEnableEmail, $wgEnableUserEmail; |
— | — | @@ -3067,7 +3069,7 @@ |
3068 | 3070 | /** |
3069 | 3071 | * Is this user allowed to receive e-mails within limits of current |
3070 | 3072 | * site configuration? |
3071 | | - * @return Boolean: True if allowed |
| 3073 | + * @return Bool |
3072 | 3074 | */ |
3073 | 3075 | function canReceiveEmail() { |
3074 | 3076 | return $this->isEmailConfirmed() && !$this->getOption( 'disablemail' ); |
— | — | @@ -3081,7 +3083,7 @@ |
3082 | 3084 | * confirmed their address by returning a code or using a password |
3083 | 3085 | * sent to the address from the wiki. |
3084 | 3086 | * |
3085 | | - * @return Boolean: True if confirmed |
| 3087 | + * @return Bool |
3086 | 3088 | */ |
3087 | 3089 | function isEmailConfirmed() { |
3088 | 3090 | global $wgEmailAuthentication; |
— | — | @@ -3102,7 +3104,7 @@ |
3103 | 3105 | |
3104 | 3106 | /** |
3105 | 3107 | * Check whether there is an outstanding request for e-mail confirmation. |
3106 | | - * @return Boolean: True if pending |
| 3108 | + * @return Bool |
3107 | 3109 | */ |
3108 | 3110 | function isEmailConfirmationPending() { |
3109 | 3111 | global $wgEmailAuthentication; |
— | — | @@ -3115,8 +3117,8 @@ |
3116 | 3118 | /** |
3117 | 3119 | * Get the timestamp of account creation. |
3118 | 3120 | * |
3119 | | - * @return \types{\string,\bool} string Timestamp of account creation, or false for |
3120 | | - * non-existent/anonymous user accounts. |
| 3121 | + * @return String|Bool Timestamp of account creation, or false for |
| 3122 | + * non-existent/anonymous user accounts. |
3121 | 3123 | */ |
3122 | 3124 | public function getRegistration() { |
3123 | 3125 | return $this->getId() > 0 |
— | — | @@ -3127,8 +3129,8 @@ |
3128 | 3130 | /** |
3129 | 3131 | * Get the timestamp of the first edit |
3130 | 3132 | * |
3131 | | - * @return \types{\string,\bool} string Timestamp of first edit, or false for |
3132 | | - * non-existent/anonymous user accounts. |
| 3133 | + * @return String|Bool Timestamp of first edit, or false for |
| 3134 | + * non-existent/anonymous user accounts. |
3133 | 3135 | */ |
3134 | 3136 | public function getFirstEditTimestamp() { |
3135 | 3137 | if( $this->getId() == 0 ) { |
— | — | @@ -3149,8 +3151,8 @@ |
3150 | 3152 | /** |
3151 | 3153 | * Get the permissions associated with a given list of groups |
3152 | 3154 | * |
3153 | | - * @param $groups \type{\arrayof{\string}} List of internal group names |
3154 | | - * @return \type{\arrayof{\string}} List of permission key names for given groups combined |
| 3155 | + * @param $groups Array of Strings List of internal group names |
| 3156 | + * @return Array of Strings List of permission key names for given groups combined |
3155 | 3157 | */ |
3156 | 3158 | static function getGroupPermissions( $groups ) { |
3157 | 3159 | global $wgGroupPermissions, $wgRevokePermissions; |
— | — | @@ -3176,8 +3178,8 @@ |
3177 | 3179 | /** |
3178 | 3180 | * Get all the groups who have a given permission |
3179 | 3181 | * |
3180 | | - * @param $role \string Role to check |
3181 | | - * @return \type{\arrayof{\string}} List of internal group names with the given permission |
| 3182 | + * @param $role String Role to check |
| 3183 | + * @return Array of Strings List of internal group names with the given permission |
3182 | 3184 | */ |
3183 | 3185 | static function getGroupsWithPermission( $role ) { |
3184 | 3186 | global $wgGroupPermissions; |
— | — | @@ -3193,8 +3195,8 @@ |
3194 | 3196 | /** |
3195 | 3197 | * Get the localized descriptive name for a group, if it exists |
3196 | 3198 | * |
3197 | | - * @param $group \string Internal group name |
3198 | | - * @return \string Localized descriptive group name |
| 3199 | + * @param $group String Internal group name |
| 3200 | + * @return String Localized descriptive group name |
3199 | 3201 | */ |
3200 | 3202 | static function getGroupName( $group ) { |
3201 | 3203 | $key = "group-$group"; |
— | — | @@ -3207,8 +3209,8 @@ |
3208 | 3210 | /** |
3209 | 3211 | * Get the localized descriptive name for a member of a group, if it exists |
3210 | 3212 | * |
3211 | | - * @param $group \string Internal group name |
3212 | | - * @return \string Localized name for group member |
| 3213 | + * @param $group String Internal group name |
| 3214 | + * @return String Localized name for group member |
3213 | 3215 | */ |
3214 | 3216 | static function getGroupMember( $group ) { |
3215 | 3217 | $key = "group-$group-member"; |
— | — | @@ -3251,7 +3253,7 @@ |
3252 | 3254 | |
3253 | 3255 | /** |
3254 | 3256 | * Get a list of implicit groups |
3255 | | - * @return \type{\arrayof{\string}} Array of internal group names |
| 3257 | + * @return Array of Strings Array of internal group names |
3256 | 3258 | */ |
3257 | 3259 | public static function getImplicitGroups() { |
3258 | 3260 | global $wgImplicitGroups; |
— | — | @@ -3263,8 +3265,8 @@ |
3264 | 3266 | /** |
3265 | 3267 | * Get the title of a page describing a particular group |
3266 | 3268 | * |
3267 | | - * @param $group \string Internal group name |
3268 | | - * @return \types{\type{Title},\bool} Title of the page if it exists, false otherwise |
| 3269 | + * @param $group String Internal group name |
| 3270 | + * @return Title|Bool Title of the page if it exists, false otherwise |
3269 | 3271 | */ |
3270 | 3272 | static function getGroupPage( $group ) { |
3271 | 3273 | $page = wfMsgForContent( 'grouppage-' . $group ); |
— | — | @@ -3280,9 +3282,9 @@ |
3281 | 3283 | * Create a link to the group in HTML, if available; |
3282 | 3284 | * else return the group name. |
3283 | 3285 | * |
3284 | | - * @param $group \string Internal name of the group |
3285 | | - * @param $text \string The text of the link |
3286 | | - * @return \string HTML link to the group |
| 3286 | + * @param $group String Internal name of the group |
| 3287 | + * @param $text String The text of the link |
| 3288 | + * @return String HTML link to the group |
3287 | 3289 | */ |
3288 | 3290 | static function makeGroupLinkHTML( $group, $text = '' ) { |
3289 | 3291 | if( $text == '' ) { |
— | — | @@ -3302,9 +3304,9 @@ |
3303 | 3305 | * Create a link to the group in Wikitext, if available; |
3304 | 3306 | * else return the group name. |
3305 | 3307 | * |
3306 | | - * @param $group \string Internal name of the group |
3307 | | - * @param $text \string The text of the link |
3308 | | - * @return \string Wikilink to the group |
| 3308 | + * @param $group String Internal name of the group |
| 3309 | + * @param $text String The text of the link |
| 3310 | + * @return String Wikilink to the group |
3309 | 3311 | */ |
3310 | 3312 | static function makeGroupLinkWiki( $group, $text = '' ) { |
3311 | 3313 | if( $text == '' ) { |
— | — | @@ -3324,9 +3326,9 @@ |
3325 | 3327 | * |
3326 | 3328 | * @param $group String: the group to check for whether it can add/remove |
3327 | 3329 | * @return Array array( 'add' => array( addablegroups ), |
3328 | | - * 'remove' => array( removablegroups ), |
3329 | | - * 'add-self' => array( addablegroups to self), |
3330 | | - * 'remove-self' => array( removable groups from self) ) |
| 3330 | + * 'remove' => array( removablegroups ), |
| 3331 | + * 'add-self' => array( addablegroups to self), |
| 3332 | + * 'remove-self' => array( removable groups from self) ) |
3331 | 3333 | */ |
3332 | 3334 | static function changeableByGroup( $group ) { |
3333 | 3335 | global $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf; |
— | — | @@ -3475,8 +3477,8 @@ |
3476 | 3478 | /** |
3477 | 3479 | * Get the description of a given right |
3478 | 3480 | * |
3479 | | - * @param $right \string Right to query |
3480 | | - * @return \string Localized description of the right |
| 3481 | + * @param $right String Right to query |
| 3482 | + * @return String Localized description of the right |
3481 | 3483 | */ |
3482 | 3484 | static function getRightDescription( $right ) { |
3483 | 3485 | $key = "right-$right"; |
— | — | @@ -3489,9 +3491,9 @@ |
3490 | 3492 | /** |
3491 | 3493 | * Make an old-style password hash |
3492 | 3494 | * |
3493 | | - * @param $password \string Plain-text password |
3494 | | - * @param $userId \string User ID |
3495 | | - * @return \string Password hash |
| 3495 | + * @param $password String Plain-text password |
| 3496 | + * @param $userId String User ID |
| 3497 | + * @return String Password hash |
3496 | 3498 | */ |
3497 | 3499 | static function oldCrypt( $password, $userId ) { |
3498 | 3500 | global $wgPasswordSalt; |
— | — | @@ -3505,10 +3507,10 @@ |
3506 | 3508 | /** |
3507 | 3509 | * Make a new-style password hash |
3508 | 3510 | * |
3509 | | - * @param $password \string Plain-text password |
3510 | | - * @param $salt \string Optional salt, may be random or the user ID. |
| 3511 | + * @param $password String Plain-text password |
| 3512 | + * @param $salt String Optional salt, may be random or the user ID. |
3511 | 3513 | * If unspecified or false, will generate one automatically |
3512 | | - * @return \string Password hash |
| 3514 | + * @return String Password hash |
3513 | 3515 | */ |
3514 | 3516 | static function crypt( $password, $salt = false ) { |
3515 | 3517 | global $wgPasswordSalt; |
— | — | @@ -3532,9 +3534,9 @@ |
3533 | 3535 | * Compare a password hash with a plain-text password. Requires the user |
3534 | 3536 | * ID if there's a chance that the hash is an old-style hash. |
3535 | 3537 | * |
3536 | | - * @param $hash \string Password hash |
3537 | | - * @param $password \string Plain-text password to compare |
3538 | | - * @param $userId \string User ID for old-style password salt |
| 3538 | + * @param $hash String Password hash |
| 3539 | + * @param $password String Plain-text password to compare |
| 3540 | + * @param $userId String User ID for old-style password salt |
3539 | 3541 | * @return Boolean: |
3540 | 3542 | */ |
3541 | 3543 | static function comparePasswords( $hash, $password, $userId = false ) { |
— | — | @@ -3706,6 +3708,8 @@ |
3707 | 3709 | * actually just returns array() unconditionally at the moment. May as |
3708 | 3710 | * well keep it around for when the browser bugs get fixed, though. |
3709 | 3711 | * |
| 3712 | + * FIXME : This does not belong here; put it in Html or Linker or somewhere |
| 3713 | + * |
3710 | 3714 | * @return array Array of HTML attributes suitable for feeding to |
3711 | 3715 | * Html::element(), directly or indirectly. (Don't feed to Xml::*()! |
3712 | 3716 | * That will potentially output invalid XHTML 1.0 Transitional, and will |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Constructor from an page id |
62 | | - * @param $id The article ID to load |
| 62 | + * @param $id Int article ID to load |
63 | 63 | */ |
64 | 64 | public static function newFromID( $id ) { |
65 | 65 | $t = Title::newFromID( $id ); |
— | — | @@ -1175,7 +1175,7 @@ |
1176 | 1176 | * merging of several policies using array_merge(). |
1177 | 1177 | * @param $policy Mixed, returns empty array on null/false/'', transparent |
1178 | 1178 | * to already-converted arrays, converts String. |
1179 | | - * @return associative Array: 'index' => <indexpolicy>, 'follow' => <followpolicy> |
| 1179 | + * @return Array: 'index' => <indexpolicy>, 'follow' => <followpolicy> |
1180 | 1180 | */ |
1181 | 1181 | public static function formatRobotPolicy( $policy ) { |
1182 | 1182 | if ( is_array( $policy ) ) { |
— | — | @@ -1525,7 +1525,7 @@ |
1526 | 1526 | /** |
1527 | 1527 | * View redirect |
1528 | 1528 | * |
1529 | | - * @param $target Title object or Array of destination(s) to redirect |
| 1529 | + * @param $target Title|Array of destination(s) to redirect |
1530 | 1530 | * @param $appendSubtitle Boolean [optional] |
1531 | 1531 | * @param $forceKnown Boolean: should the image be shown as a bluelink regardless of existence? |
1532 | 1532 | * @return string containing HMTL with redirect link |
— | — | @@ -1813,7 +1813,7 @@ |
1814 | 1814 | * Add row to the redirect table if this is a redirect, remove otherwise. |
1815 | 1815 | * |
1816 | 1816 | * @param $dbw Database |
1817 | | - * @param $redirectTitle a title object pointing to the redirect target, |
| 1817 | + * @param $redirectTitle Title object pointing to the redirect target, |
1818 | 1818 | * or NULL if this is not a redirect |
1819 | 1819 | * @param $lastRevIsRedirect If given, will optimize adding and |
1820 | 1820 | * removing rows in redirect table. |
— | — | @@ -2050,7 +2050,7 @@ |
2051 | 2051 | * auto-detection due to MediaWiki's performance-optimised locking strategy. |
2052 | 2052 | * |
2053 | 2053 | * @param $baseRevId the revision ID this edit was based off, if any |
2054 | | - * @param $user Optional user object, $wgUser will be used if not passed |
| 2054 | + * @param $user User (optional), $wgUser will be used if not passed |
2055 | 2055 | * |
2056 | 2056 | * @return Status object. Possible errors: |
2057 | 2057 | * edit-hook-aborted: The ArticleSave hook aborted the edit but didn't set the fatal flag of $status |
— | — | @@ -3615,7 +3615,7 @@ |
3616 | 3616 | * @param $text String: New text of the article |
3617 | 3617 | * @param $summary String: Edit summary |
3618 | 3618 | * @param $minoredit Boolean: Minor edit |
3619 | | - * @param $timestamp_of_pagechange Timestamp associated with the page change |
| 3619 | + * @param $timestamp_of_pagechange String timestamp associated with the page change |
3620 | 3620 | * @param $newid Integer: rev_id value of the new revision |
3621 | 3621 | * @param $changed Boolean: Whether or not the content actually changed |
3622 | 3622 | * @param $user User object: User doing the edit |
— | — | @@ -4004,7 +4004,7 @@ |
4005 | 4005 | wfProfileOut( __METHOD__ ); |
4006 | 4006 | } |
4007 | 4007 | |
4008 | | - /**#@+ |
| 4008 | + /** |
4009 | 4009 | * The onArticle*() functions are supposed to be a kind of hooks |
4010 | 4010 | * which should be called whenever any of the specified actions |
4011 | 4011 | * are done. |
— | — | @@ -4013,7 +4013,7 @@ |
4014 | 4014 | * |
4015 | 4015 | * This is called on page move and undelete, as well as edit |
4016 | 4016 | * |
4017 | | - * @param $title a title object |
| 4017 | + * @param $title Title object |
4018 | 4018 | */ |
4019 | 4019 | public static function onArticleCreate( $title ) { |
4020 | 4020 | # Update existence markers on article/talk tabs... |
— | — | @@ -4270,7 +4270,7 @@ |
4271 | 4271 | * Return an applicable autosummary if one exists for the given edit. |
4272 | 4272 | * @param $oldtext String: the previous text of the page. |
4273 | 4273 | * @param $newtext String: The submitted text of the page. |
4274 | | - * @param $flags Bitmask: a bitmask of flags submitted for the edit. |
| 4274 | + * @param $flags Int bitmask: a bitmask of flags submitted for the edit. |
4275 | 4275 | * @return string An appropriate autosummary, or an empty string. |
4276 | 4276 | */ |
4277 | 4277 | public static function getAutosummary( $oldtext, $newtext, $flags ) { |