Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | /** |
68 | 68 | * Obtain the recent change with a given rc_id value |
69 | 69 | * |
70 | | - * @param $rcid rc_id value to retrieve |
| 70 | + * @param $rcid Int rc_id value to retrieve |
71 | 71 | * @return RecentChange |
72 | 72 | */ |
73 | 73 | public static function newFromId( $rcid ) { |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -94,10 +94,10 @@ |
95 | 95 | /** |
96 | 96 | * Create a new Title from a prefixed DB key |
97 | 97 | * |
98 | | - * @param $key \type{\string} The database key, which has underscores |
| 98 | + * @param $key String The database key, which has underscores |
99 | 99 | * instead of spaces, possibly including namespace and |
100 | 100 | * interwiki prefixes |
101 | | - * @return \type{Title} the new object, or NULL on an error |
| 101 | + * @return Title the new object, or NULL on an error |
102 | 102 | */ |
103 | 103 | public static function newFromDBkey( $key ) { |
104 | 104 | $t = new Title(); |
— | — | @@ -113,7 +113,7 @@ |
114 | 114 | * Create a new Title from text, such as what one would find in a link. De- |
115 | 115 | * codes any HTML entities in the text. |
116 | 116 | * |
117 | | - * @param $text string The link text; spaces, prefixes, and an |
| 117 | + * @param $text String The link text; spaces, prefixes, and an |
118 | 118 | * initial ':' indicating the main namespace are accepted. |
119 | 119 | * @param $defaultNamespace int The namespace to use if none is speci- |
120 | 120 | * fied by a prefix. If you want to force a specific namespace even if |
— | — | @@ -177,8 +177,8 @@ |
178 | 178 | * Create a new Title from URL-encoded text. Ensures that |
179 | 179 | * the given title's length does not exceed the maximum. |
180 | 180 | * |
181 | | - * @param $url \type{\string} the title, as might be taken from a URL |
182 | | - * @return \type{Title} the new object, or NULL on an error |
| 181 | + * @param $url String the title, as might be taken from a URL |
| 182 | + * @return Title the new object, or NULL on an error |
183 | 183 | */ |
184 | 184 | public static function newFromURL( $url ) { |
185 | 185 | global $wgLegalTitleChars; |
— | — | @@ -202,9 +202,9 @@ |
203 | 203 | /** |
204 | 204 | * Create a new Title from an article ID |
205 | 205 | * |
206 | | - * @param $id \type{\int} the page_id corresponding to the Title to create |
207 | | - * @param $flags \type{\int} use Title::GAID_FOR_UPDATE to use master |
208 | | - * @return \type{Title} the new object, or NULL on an error |
| 206 | + * @param $id Int the page_id corresponding to the Title to create |
| 207 | + * @param $flags Int use Title::GAID_FOR_UPDATE to use master |
| 208 | + * @return Title the new object, or NULL on an error |
209 | 209 | */ |
210 | 210 | public static function newFromID( $id, $flags = 0 ) { |
211 | 211 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
— | — | @@ -220,8 +220,8 @@ |
221 | 221 | /** |
222 | 222 | * Make an array of titles from an array of IDs |
223 | 223 | * |
224 | | - * @param $ids \type{\arrayof{\int}} Array of IDs |
225 | | - * @return \type{\arrayof{Title}} Array of Titles |
| 224 | + * @param $ids Array of Int Array of IDs |
| 225 | + * @return Array of Titles |
226 | 226 | */ |
227 | 227 | public static function newFromIDs( $ids ) { |
228 | 228 | if ( !count( $ids ) ) { |
— | — | @@ -249,8 +249,8 @@ |
250 | 250 | /** |
251 | 251 | * Make a Title object from a DB row |
252 | 252 | * |
253 | | - * @param $row \type{Row} (needs at least page_title,page_namespace) |
254 | | - * @return \type{Title} corresponding Title |
| 253 | + * @param $row Object database row (needs at least page_title,page_namespace) |
| 254 | + * @return Title corresponding Title |
255 | 255 | */ |
256 | 256 | public static function newFromRow( $row ) { |
257 | 257 | $t = self::makeTitle( $row->page_namespace, $row->page_title ); |
— | — | @@ -270,11 +270,11 @@ |
271 | 271 | * For convenience, spaces are converted to underscores so that |
272 | 272 | * eg user_text fields can be used directly. |
273 | 273 | * |
274 | | - * @param $ns \type{\int} the namespace of the article |
275 | | - * @param $title \type{\string} the unprefixed database key form |
276 | | - * @param $fragment \type{\string} The link fragment (after the "#") |
277 | | - * @param $interwiki \type{\string} The interwiki prefix |
278 | | - * @return \type{Title} the new object |
| 274 | + * @param $ns Int the namespace of the article |
| 275 | + * @param $title String the unprefixed database key form |
| 276 | + * @param $fragment String The link fragment (after the "#") |
| 277 | + * @param $interwiki String The interwiki prefix |
| 278 | + * @return Title the new object |
279 | 279 | */ |
280 | 280 | public static function &makeTitle( $ns, $title, $fragment = '', $interwiki = '' ) { |
281 | 281 | $t = new Title(); |
— | — | @@ -293,11 +293,11 @@ |
294 | 294 | * The parameters will be checked for validity, which is a bit slower |
295 | 295 | * than makeTitle() but safer for user-provided data. |
296 | 296 | * |
297 | | - * @param $ns \type{\int} the namespace of the article |
298 | | - * @param $title \type{\string} the database key form |
299 | | - * @param $fragment \type{\string} The link fragment (after the "#") |
300 | | - * @param $interwiki \type{\string} The interwiki prefix |
301 | | - * @return \type{Title} the new object, or NULL on an error |
| 297 | + * @param $ns Int the namespace of the article |
| 298 | + * @param $title String the database key form |
| 299 | + * @param $fragment String The link fragment (after the "#") |
| 300 | + * @param $interwiki String The interwiki prefix |
| 301 | + * @return Title the new object, or NULL on an error |
302 | 302 | */ |
303 | 303 | public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) { |
304 | 304 | $t = new Title(); |
— | — | @@ -312,7 +312,7 @@ |
313 | 313 | /** |
314 | 314 | * Create a new Title for the Main Page |
315 | 315 | * |
316 | | - * @return \type{Title} the new object |
| 316 | + * @return Title the new object |
317 | 317 | */ |
318 | 318 | public static function newMainPage() { |
319 | 319 | $title = Title::newFromText( wfMsgForContent( 'mainpage' ) ); |
— | — | @@ -342,8 +342,8 @@ |
343 | 343 | * This will recurse down $wgMaxRedirects times or until a non-redirect target is hit |
344 | 344 | * in order to provide (hopefully) the Title of the final destination instead of another redirect |
345 | 345 | * |
346 | | - * @param $text \type{\string} Text with possible redirect |
347 | | - * @return \type{Title} The corresponding Title |
| 346 | + * @param $text String Text with possible redirect |
| 347 | + * @return Title The corresponding Title |
348 | 348 | */ |
349 | 349 | public static function newFromRedirectRecurse( $text ) { |
350 | 350 | $titles = self::newFromRedirectArray( $text ); |
— | — | @@ -356,8 +356,8 @@ |
357 | 357 | * The last element in the array is the final destination after all redirects |
358 | 358 | * have been resolved (up to $wgMaxRedirects times) |
359 | 359 | * |
360 | | - * @param $text \type{\string} Text with possible redirect |
361 | | - * @return \type{\array} Array of Titles, with the destination last |
| 360 | + * @param $text String Text with possible redirect |
| 361 | + * @return Array of Titles, with the destination last |
362 | 362 | */ |
363 | 363 | public static function newFromRedirectArray( $text ) { |
364 | 364 | global $wgMaxRedirects; |
— | — | @@ -395,8 +395,8 @@ |
396 | 396 | * Really extract the redirect destination |
397 | 397 | * Do not call this function directly, use one of the newFromRedirect* functions above |
398 | 398 | * |
399 | | - * @param $text \type{\string} Text with possible redirect |
400 | | - * @return \type{Title} The corresponding Title |
| 399 | + * @param $text String Text with possible redirect |
| 400 | + * @return Title The corresponding Title |
401 | 401 | */ |
402 | 402 | protected static function newFromRedirectInternal( $text ) { |
403 | 403 | $redir = MagicWord::get( 'redirect' ); |
— | — | @@ -431,8 +431,8 @@ |
432 | 432 | /** |
433 | 433 | * Get the prefixed DB key associated with an ID |
434 | 434 | * |
435 | | - * @param $id \type{\int} the page_id of the article |
436 | | - * @return \type{Title} an object representing the article, or NULL |
| 435 | + * @param $id Int the page_id of the article |
| 436 | + * @return Title an object representing the article, or NULL |
437 | 437 | * if no such article was found |
438 | 438 | */ |
439 | 439 | public static function nameOf( $id ) { |
— | — | @@ -455,7 +455,7 @@ |
456 | 456 | /** |
457 | 457 | * Get a regex character class describing the legal characters in a link |
458 | 458 | * |
459 | | - * @return \type{\string} the list of characters, not delimited |
| 459 | + * @return String the list of characters, not delimited |
460 | 460 | */ |
461 | 461 | public static function legalChars() { |
462 | 462 | global $wgLegalTitleChars; |
— | — | @@ -466,9 +466,9 @@ |
467 | 467 | * Get a string representation of a title suitable for |
468 | 468 | * including in a search index |
469 | 469 | * |
470 | | - * @param $ns \type{\int} a namespace index |
471 | | - * @param $title \type{\string} text-form main part |
472 | | - * @return \type{\string} a stripped-down title string ready for the |
| 470 | + * @param $ns Int a namespace index |
| 471 | + * @param $title String text-form main part |
| 472 | + * @return String a stripped-down title string ready for the |
473 | 473 | * search index |
474 | 474 | */ |
475 | 475 | public static function indexTitle( $ns, $title ) { |
— | — | @@ -494,11 +494,11 @@ |
495 | 495 | /** |
496 | 496 | * Make a prefixed DB key from a DB key and a namespace index |
497 | 497 | * |
498 | | - * @param $ns \type{\int} numerical representation of the namespace |
499 | | - * @param $title \type{\string} the DB key form the title |
500 | | - * @param $fragment \type{\string} The link fragment (after the "#") |
501 | | - * @param $interwiki \type{\string} The interwiki prefix |
502 | | - * @return \type{\string} the prefixed form of the title |
| 498 | + * @param $ns Int numerical representation of the namespace |
| 499 | + * @param $title String the DB key form the title |
| 500 | + * @param $fragment String The link fragment (after the "#") |
| 501 | + * @param $interwiki String The interwiki prefix |
| 502 | + * @return String the prefixed form of the title |
503 | 503 | */ |
504 | 504 | public static function makeName( $ns, $title, $fragment = '', $interwiki = '' ) { |
505 | 505 | global $wgContLang; |
— | — | @@ -518,7 +518,7 @@ |
519 | 519 | * Determine whether the object refers to a page within |
520 | 520 | * this project. |
521 | 521 | * |
522 | | - * @return \type{\bool} TRUE if this is an in-project interwiki link |
| 522 | + * @return Bool TRUE if this is an in-project interwiki link |
523 | 523 | * or a wikilink, FALSE otherwise |
524 | 524 | */ |
525 | 525 | public function isLocal() { |
— | — | @@ -533,7 +533,7 @@ |
534 | 534 | * Determine whether the object refers to a page within |
535 | 535 | * this project and is transcludable. |
536 | 536 | * |
537 | | - * @return \type{\bool} TRUE if this is transcludable |
| 537 | + * @return Bool TRUE if this is transcludable |
538 | 538 | */ |
539 | 539 | public function isTrans() { |
540 | 540 | if ( $this->mInterwiki == '' ) { |
— | — | @@ -547,7 +547,7 @@ |
548 | 548 | * Returns the DB name of the distant wiki |
549 | 549 | * which owns the object. |
550 | 550 | * |
551 | | - * @return \type{\string} the DB name |
| 551 | + * @return String the DB name |
552 | 552 | */ |
553 | 553 | public function getTransWikiID() { |
554 | 554 | if ( $this->mInterwiki == '' ) { |
— | — | @@ -579,14 +579,14 @@ |
580 | 580 | /** |
581 | 581 | * Get the text form (spaces not underscores) of the main part |
582 | 582 | * |
583 | | - * @return \type{\string} Main part of the title |
| 583 | + * @return String Main part of the title |
584 | 584 | */ |
585 | 585 | public function getText() { return $this->mTextform; } |
586 | 586 | |
587 | 587 | /** |
588 | 588 | * Get the URL-encoded form of the main part |
589 | 589 | * |
590 | | - * @return \type{\string} Main part of the title, URL-encoded |
| 590 | + * @return String Main part of the title, URL-encoded |
591 | 591 | */ |
592 | 592 | public function getPartialURL() { return $this->mUrlform; } |
593 | 593 | |
— | — | @@ -629,7 +629,7 @@ |
630 | 630 | /** |
631 | 631 | * Get the DB key with the initial letter case as specified by the user |
632 | 632 | * |
633 | | - * @return \type{\string} DB key |
| 633 | + * @return String DB key |
634 | 634 | */ |
635 | 635 | function getUserCaseDBKey() { |
636 | 636 | return $this->mUserCaseDBKey; |
— | — | @@ -638,7 +638,7 @@ |
639 | 639 | /** |
640 | 640 | * Get the namespace text of the subject (rather than talk) page |
641 | 641 | * |
642 | | - * @return \type{\string} Namespace text |
| 642 | + * @return String Namespace text |
643 | 643 | */ |
644 | 644 | public function getSubjectNsText() { |
645 | 645 | global $wgContLang; |
— | — | @@ -648,7 +648,7 @@ |
649 | 649 | /** |
650 | 650 | * Get the namespace text of the talk page |
651 | 651 | * |
652 | | - * @return \type{\string} Namespace text |
| 652 | + * @return String Namespace text |
653 | 653 | */ |
654 | 654 | public function getTalkNsText() { |
655 | 655 | global $wgContLang; |
— | — | @@ -658,7 +658,7 @@ |
659 | 659 | /** |
660 | 660 | * Could this title have a corresponding talk page? |
661 | 661 | * |
662 | | - * @return \type{\bool} TRUE or FALSE |
| 662 | + * @return Bool TRUE or FALSE |
663 | 663 | */ |
664 | 664 | public function canTalk() { |
665 | 665 | return( MWNamespace::canTalk( $this->mNamespace ) ); |
— | — | @@ -667,20 +667,20 @@ |
668 | 668 | /** |
669 | 669 | * Get the interwiki prefix (or null string) |
670 | 670 | * |
671 | | - * @return \type{\string} Interwiki prefix |
| 671 | + * @return String Interwiki prefix |
672 | 672 | */ |
673 | 673 | public function getInterwiki() { return $this->mInterwiki; } |
674 | 674 | |
675 | 675 | /** |
676 | 676 | * Get the Title fragment (i.e.\ the bit after the #) in text form |
677 | 677 | * |
678 | | - * @return \type{\string} Title fragment |
| 678 | + * @return String Title fragment |
679 | 679 | */ |
680 | 680 | public function getFragment() { return $this->mFragment; } |
681 | 681 | |
682 | 682 | /** |
683 | 683 | * Get the fragment in URL form, including the "#" character if there is one |
684 | | - * @return \type{\string} Fragment in URL form |
| 684 | + * @return String Fragment in URL form |
685 | 685 | */ |
686 | 686 | public function getFragmentForURL() { |
687 | 687 | if ( $this->mFragment == '' ) { |
— | — | @@ -693,14 +693,14 @@ |
694 | 694 | /** |
695 | 695 | * Get the default namespace index, for when there is no namespace |
696 | 696 | * |
697 | | - * @return \type{\int} Default namespace index |
| 697 | + * @return Int Default namespace index |
698 | 698 | */ |
699 | 699 | public function getDefaultNamespace() { return $this->mDefaultNamespace; } |
700 | 700 | |
701 | 701 | /** |
702 | 702 | * Get title for search index |
703 | 703 | * |
704 | | - * @return \type{\string} a stripped-down title string ready for the |
| 704 | + * @return String a stripped-down title string ready for the |
705 | 705 | * search index |
706 | 706 | */ |
707 | 707 | public function getIndexTitle() { |
— | — | @@ -710,7 +710,7 @@ |
711 | 711 | /** |
712 | 712 | * Get the prefixed database key form |
713 | 713 | * |
714 | | - * @return \type{\string} the prefixed title, with underscores and |
| 714 | + * @return String the prefixed title, with underscores and |
715 | 715 | * any interwiki and namespace prefixes |
716 | 716 | */ |
717 | 717 | public function getPrefixedDBkey() { |
— | — | @@ -723,7 +723,7 @@ |
724 | 724 | * Get the prefixed title with spaces. |
725 | 725 | * This is the form usually used for display |
726 | 726 | * |
727 | | - * @return \type{\string} the prefixed title, with spaces |
| 727 | + * @return String the prefixed title, with spaces |
728 | 728 | */ |
729 | 729 | public function getPrefixedText() { |
730 | 730 | if ( empty( $this->mPrefixedText ) ) { // FIXME: bad usage of empty() ? |
— | — | @@ -738,7 +738,7 @@ |
739 | 739 | * Get the prefixed title with spaces, plus any fragment |
740 | 740 | * (part beginning with '#') |
741 | 741 | * |
742 | | - * @return \type{\string} the prefixed title, with spaces and |
| 742 | + * @return String the prefixed title, with spaces and |
743 | 743 | * the fragment, including '#' |
744 | 744 | */ |
745 | 745 | public function getFullText() { |
— | — | @@ -752,7 +752,7 @@ |
753 | 753 | /** |
754 | 754 | * Get the base name, i.e. the leftmost parts before the / |
755 | 755 | * |
756 | | - * @return \type{\string} Base name |
| 756 | + * @return String Base name |
757 | 757 | */ |
758 | 758 | public function getBaseText() { |
759 | 759 | if ( !MWNamespace::hasSubpages( $this->mNamespace ) ) { |
— | — | @@ -770,7 +770,7 @@ |
771 | 771 | /** |
772 | 772 | * Get the lowest-level subpage name, i.e. the rightmost part after / |
773 | 773 | * |
774 | | - * @return \type{\string} Subpage name |
| 774 | + * @return String Subpage name |
775 | 775 | */ |
776 | 776 | public function getSubpageText() { |
777 | 777 | if ( !MWNamespace::hasSubpages( $this->mNamespace ) ) { |
— | — | @@ -783,7 +783,7 @@ |
784 | 784 | /** |
785 | 785 | * Get a URL-encoded form of the subpage text |
786 | 786 | * |
787 | | - * @return \type{\string} URL-encoded subpage name |
| 787 | + * @return String URL-encoded subpage name |
788 | 788 | */ |
789 | 789 | public function getSubpageUrlForm() { |
790 | 790 | $text = $this->getSubpageText(); |
— | — | @@ -794,7 +794,7 @@ |
795 | 795 | /** |
796 | 796 | * Get a URL-encoded title (not an actual URL) including interwiki |
797 | 797 | * |
798 | | - * @return \type{\string} the URL-encoded form |
| 798 | + * @return String the URL-encoded form |
799 | 799 | */ |
800 | 800 | public function getPrefixedURL() { |
801 | 801 | $s = $this->prefix( $this->mDbkeyform ); |
— | — | @@ -809,8 +809,8 @@ |
810 | 810 | * @param $query \twotypes{\string,\array} an optional query string, not used for interwiki |
811 | 811 | * links. Can be specified as an associative array as well, e.g., |
812 | 812 | * array( 'action' => 'edit' ) (keys and values will be URL-escaped). |
813 | | - * @param $variant \type{\string} language variant of url (for sr, zh..) |
814 | | - * @return \type{\string} the URL |
| 813 | + * @param $variant String language variant of url (for sr, zh..) |
| 814 | + * @return String the URL |
815 | 815 | */ |
816 | 816 | public function getFullURL( $query = '', $variant = false ) { |
817 | 817 | global $wgServer, $wgRequest; |
— | — | @@ -856,8 +856,8 @@ |
857 | 857 | * $wgArticlePath will be used. Can be specified as an associative array |
858 | 858 | * as well, e.g., array( 'action' => 'edit' ) (keys and values will be |
859 | 859 | * URL-escaped). |
860 | | - * @param $variant \type{\string} language variant of url (for sr, zh..) |
861 | | - * @return \type{\string} the URL |
| 860 | + * @param $variant String language variant of url (for sr, zh..) |
| 861 | + * @return String the URL |
862 | 862 | */ |
863 | 863 | public function getLocalURL( $query = '', $variant = false ) { |
864 | 864 | global $wgArticlePath, $wgScript, $wgServer, $wgRequest; |
— | — | @@ -937,12 +937,12 @@ |
938 | 938 | * The result obviously should not be URL-escaped, but does need to be |
939 | 939 | * HTML-escaped if it's being output in HTML. |
940 | 940 | * |
941 | | - * @param $query \type{\arrayof{\string}} An associative array of key => value pairs for the |
| 941 | + * @param $query Array of Strings An associative array of key => value pairs for the |
942 | 942 | * query string. Keys and values will be escaped. |
943 | | - * @param $variant \type{\string} Language variant of URL (for sr, zh..). Ignored |
| 943 | + * @param $variant String Language variant of URL (for sr, zh..). Ignored |
944 | 944 | * for external links. Default is "false" (same variant as current page, |
945 | 945 | * for anonymous users). |
946 | | - * @return \type{\string} the URL |
| 946 | + * @return String the URL |
947 | 947 | */ |
948 | 948 | public function getLinkUrl( $query = array(), $variant = false ) { |
949 | 949 | wfProfileIn( __METHOD__ ); |
— | — | @@ -961,8 +961,8 @@ |
962 | 962 | * Get an HTML-escaped version of the URL form, suitable for |
963 | 963 | * using in a link, without a server name or fragment |
964 | 964 | * |
965 | | - * @param $query \type{\string} an optional query string |
966 | | - * @return \type{\string} the URL |
| 965 | + * @param $query String an optional query string |
| 966 | + * @return String the URL |
967 | 967 | */ |
968 | 968 | public function escapeLocalURL( $query = '' ) { |
969 | 969 | return htmlspecialchars( $this->getLocalURL( $query ) ); |
— | — | @@ -972,8 +972,8 @@ |
973 | 973 | * Get an HTML-escaped version of the URL form, suitable for |
974 | 974 | * using in a link, including the server name and fragment |
975 | 975 | * |
976 | | - * @param $query \type{\string} an optional query string |
977 | | - * @return \type{\string} the URL |
| 976 | + * @param $query String an optional query string |
| 977 | + * @return String the URL |
978 | 978 | */ |
979 | 979 | public function escapeFullURL( $query = '' ) { |
980 | 980 | return htmlspecialchars( $this->getFullURL( $query ) ); |
— | — | @@ -984,9 +984,9 @@ |
985 | 985 | * - Used in various Squid-related code, in case we have a different |
986 | 986 | * internal hostname for the server from the exposed one. |
987 | 987 | * |
988 | | - * @param $query \type{\string} an optional query string |
989 | | - * @param $variant \type{\string} language variant of url (for sr, zh..) |
990 | | - * @return \type{\string} the URL |
| 988 | + * @param $query String an optional query string |
| 989 | + * @param $variant String language variant of url (for sr, zh..) |
| 990 | + * @return String the URL |
991 | 991 | */ |
992 | 992 | public function getInternalURL( $query = '', $variant = false ) { |
993 | 993 | global $wgInternalServer; |
— | — | @@ -998,7 +998,7 @@ |
999 | 999 | /** |
1000 | 1000 | * Get the edit URL for this Title |
1001 | 1001 | * |
1002 | | - * @return \type{\string} the URL, or a null string if this is an |
| 1002 | + * @return String the URL, or a null string if this is an |
1003 | 1003 | * interwiki link |
1004 | 1004 | */ |
1005 | 1005 | public function getEditURL() { |
— | — | @@ -1014,7 +1014,7 @@ |
1015 | 1015 | * Get the HTML-escaped displayable text form. |
1016 | 1016 | * Used for the title field in <a> tags. |
1017 | 1017 | * |
1018 | | - * @return \type{\string} the text, including any prefixes |
| 1018 | + * @return String the text, including any prefixes |
1019 | 1019 | */ |
1020 | 1020 | public function getEscapedText() { |
1021 | 1021 | return htmlspecialchars( $this->getPrefixedText() ); |
— | — | @@ -1023,7 +1023,7 @@ |
1024 | 1024 | /** |
1025 | 1025 | * Is this Title interwiki? |
1026 | 1026 | * |
1027 | | - * @return \type{\bool} |
| 1027 | + * @return Bool |
1028 | 1028 | */ |
1029 | 1029 | public function isExternal() { |
1030 | 1030 | return ( $this->mInterwiki != '' ); |
— | — | @@ -1032,8 +1032,8 @@ |
1033 | 1033 | /** |
1034 | 1034 | * Is this page "semi-protected" - the *only* protection is autoconfirm? |
1035 | 1035 | * |
1036 | | - * @param $action \type{\string} Action to check (default: edit) |
1037 | | - * @return \type{\bool} |
| 1036 | + * @param $action String Action to check (default: edit) |
| 1037 | + * @return Bool |
1038 | 1038 | */ |
1039 | 1039 | public function isSemiProtected( $action = 'edit' ) { |
1040 | 1040 | if ( $this->exists() ) { |
— | — | @@ -1058,9 +1058,9 @@ |
1059 | 1059 | /** |
1060 | 1060 | * Does the title correspond to a protected article? |
1061 | 1061 | * |
1062 | | - * @param $action \type{\string} the action the page is protected from, |
| 1062 | + * @param $action String the action the page is protected from, |
1063 | 1063 | * by default checks all actions. |
1064 | | - * @return \type{\bool} |
| 1064 | + * @return Bool |
1065 | 1065 | */ |
1066 | 1066 | public function isProtected( $action = '' ) { |
1067 | 1067 | global $wgRestrictionLevels; |
— | — | @@ -1090,7 +1090,7 @@ |
1091 | 1091 | /** |
1092 | 1092 | * Is this a conversion table for the LanguageConverter? |
1093 | 1093 | * |
1094 | | - * @return \type{\bool} |
| 1094 | + * @return Bool |
1095 | 1095 | */ |
1096 | 1096 | public function isConversionTable() { |
1097 | 1097 | if( |
— | — | @@ -1107,7 +1107,7 @@ |
1108 | 1108 | /** |
1109 | 1109 | * Is $wgUser watching this page? |
1110 | 1110 | * |
1111 | | - * @return \type{\bool} |
| 1111 | + * @return Bool |
1112 | 1112 | */ |
1113 | 1113 | public function userIsWatching() { |
1114 | 1114 | global $wgUser; |
— | — | @@ -1132,8 +1132,8 @@ |
1133 | 1133 | * |
1134 | 1134 | * May provide false positives, but should never provide a false negative. |
1135 | 1135 | * |
1136 | | - * @param $action \type{\string} action that permission needs to be checked for |
1137 | | - * @return \type{\bool} |
| 1136 | + * @param $action String action that permission needs to be checked for |
| 1137 | + * @return Bool |
1138 | 1138 | */ |
1139 | 1139 | public function quickUserCan( $action ) { |
1140 | 1140 | return $this->userCan( $action, false ); |
— | — | @@ -1144,7 +1144,7 @@ |
1145 | 1145 | * by $wgNamespaceProtection. |
1146 | 1146 | * |
1147 | 1147 | * @param $user User object, $wgUser will be used if not passed |
1148 | | - * @return \type{\bool} |
| 1148 | + * @return Bool |
1149 | 1149 | */ |
1150 | 1150 | public function isNamespaceProtected( User $user = null ) { |
1151 | 1151 | global $wgNamespaceProtection; |
— | — | @@ -1167,9 +1167,9 @@ |
1168 | 1168 | /** |
1169 | 1169 | * Can $wgUser perform $action on this page? |
1170 | 1170 | * |
1171 | | - * @param $action \type{\string} action that permission needs to be checked for |
1172 | | - * @param $doExpensiveQueries \type{\bool} Set this to false to avoid doing unnecessary queries. |
1173 | | - * @return \type{\bool} |
| 1171 | + * @param $action String action that permission needs to be checked for |
| 1172 | + * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries. |
| 1173 | + * @return Bool |
1174 | 1174 | */ |
1175 | 1175 | public function userCan( $action, $doExpensiveQueries = true ) { |
1176 | 1176 | global $wgUser; |
— | — | @@ -1181,11 +1181,11 @@ |
1182 | 1182 | * |
1183 | 1183 | * FIXME: This *does not* check throttles (User::pingLimiter()). |
1184 | 1184 | * |
1185 | | - * @param $action \type{\string}action that permission needs to be checked for |
1186 | | - * @param $user \type{User} user to check |
1187 | | - * @param $doExpensiveQueries \type{\bool} Set this to false to avoid doing unnecessary queries. |
1188 | | - * @param $ignoreErrors \type{\arrayof{\string}} Set this to a list of message keys whose corresponding errors may be ignored. |
1189 | | - * @return \type{\array} Array of arrays of the arguments to wfMsg to explain permissions problems. |
| 1185 | + * @param $action String action that permission needs to be checked for |
| 1186 | + * @param $user User to check |
| 1187 | + * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries. |
| 1188 | + * @param $ignoreErrors Array of Strings Set this to a list of message keys whose corresponding errors may be ignored. |
| 1189 | + * @return Array of arrays of the arguments to wfMsg to explain permissions problems. |
1190 | 1190 | */ |
1191 | 1191 | public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) { |
1192 | 1192 | $errors = $this->getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries ); |
— | — | @@ -1596,11 +1596,11 @@ |
1597 | 1597 | * which checks ONLY that previously checked by userCan (i.e. it leaves out |
1598 | 1598 | * checks on wfReadOnly() and blocks) |
1599 | 1599 | * |
1600 | | - * @param $action \type{\string} action that permission needs to be checked for |
1601 | | - * @param $user \type{User} user to check |
1602 | | - * @param $doExpensiveQueries \type{\bool} Set this to false to avoid doing unnecessary queries. |
1603 | | - * @param $short \type{\bool} Set this to true to stop after the first permission error. |
1604 | | - * @return \type{\array} Array of arrays of the arguments to wfMsg to explain permissions problems. |
| 1600 | + * @param $action String action that permission needs to be checked for |
| 1601 | + * @param $user User to check |
| 1602 | + * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries. |
| 1603 | + * @param $short Bool Set this to true to stop after the first permission error. |
| 1604 | + * @return Array of arrays of the arguments to wfMsg to explain permissions problems. |
1605 | 1605 | */ |
1606 | 1606 | protected function getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries = true, $short = false ) { |
1607 | 1607 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1630,7 +1630,7 @@ |
1631 | 1631 | /** |
1632 | 1632 | * Is this title subject to title protection? |
1633 | 1633 | * |
1634 | | - * @return \type{\mixed} An associative array representing any existent title |
| 1634 | + * @return Mixed An associative array representing any existent title |
1635 | 1635 | * protection, or false if there's none. |
1636 | 1636 | */ |
1637 | 1637 | private function getTitleProtection() { |
— | — | @@ -1663,9 +1663,9 @@ |
1664 | 1664 | /** |
1665 | 1665 | * Update the title protection status |
1666 | 1666 | * |
1667 | | - * @param $create_perm \type{\string} Permission required for creation |
1668 | | - * @param $reason \type{\string} Reason for protection |
1669 | | - * @param $expiry \type{\string} Expiry timestamp |
| 1667 | + * @param $create_perm String Permission required for creation |
| 1668 | + * @param $reason String Reason for protection |
| 1669 | + * @param $expiry String Expiry timestamp |
1670 | 1670 | * @return boolean true |
1671 | 1671 | */ |
1672 | 1672 | public function updateTitleProtection( $create_perm, $reason, $expiry ) { |
— | — | @@ -1743,7 +1743,7 @@ |
1744 | 1744 | * Would anybody with sufficient privileges be able to move this page? |
1745 | 1745 | * Some pages just aren't movable. |
1746 | 1746 | * |
1747 | | - * @return \type{\bool} TRUE or FALSE |
| 1747 | + * @return Bool TRUE or FALSE |
1748 | 1748 | */ |
1749 | 1749 | public function isMovable() { |
1750 | 1750 | return MWNamespace::isMovable( $this->getNamespace() ) && $this->getInterwiki() == ''; |
— | — | @@ -1752,7 +1752,7 @@ |
1753 | 1753 | /** |
1754 | 1754 | * Can $wgUser read this page? |
1755 | 1755 | * |
1756 | | - * @return \type{\bool} |
| 1756 | + * @return Bool |
1757 | 1757 | * @todo fold these checks into userCan() |
1758 | 1758 | */ |
1759 | 1759 | public function userCanRead() { |
— | — | @@ -1859,7 +1859,7 @@ |
1860 | 1860 | /** |
1861 | 1861 | * Is this a talk page of some sort? |
1862 | 1862 | * |
1863 | | - * @return \type{\bool} |
| 1863 | + * @return Bool |
1864 | 1864 | */ |
1865 | 1865 | public function isTalkPage() { |
1866 | 1866 | return MWNamespace::isTalk( $this->getNamespace() ); |
— | — | @@ -1868,7 +1868,7 @@ |
1869 | 1869 | /** |
1870 | 1870 | * Is this a subpage? |
1871 | 1871 | * |
1872 | | - * @return \type{\bool} |
| 1872 | + * @return Bool |
1873 | 1873 | */ |
1874 | 1874 | public function isSubpage() { |
1875 | 1875 | return MWNamespace::hasSubpages( $this->mNamespace ) |
— | — | @@ -1879,7 +1879,7 @@ |
1880 | 1880 | /** |
1881 | 1881 | * Does this have subpages? (Warning, usually requires an extra DB query.) |
1882 | 1882 | * |
1883 | | - * @return \type{\bool} |
| 1883 | + * @return Bool |
1884 | 1884 | */ |
1885 | 1885 | public function hasSubpages() { |
1886 | 1886 | if ( !MWNamespace::hasSubpages( $this->mNamespace ) ) { |
— | — | @@ -1905,7 +1905,7 @@ |
1906 | 1906 | /** |
1907 | 1907 | * Get all subpages of this page. |
1908 | 1908 | * |
1909 | | - * @param $limit Maximum number of subpages to fetch; -1 for no limit |
| 1909 | + * @param $limit Int maximum number of subpages to fetch; -1 for no limit |
1910 | 1910 | * @return mixed TitleArray, or empty array if this page's namespace |
1911 | 1911 | * doesn't allow subpages |
1912 | 1912 | */ |
— | — | @@ -1935,7 +1935,7 @@ |
1936 | 1936 | * Could this page contain custom CSS or JavaScript, based |
1937 | 1937 | * on the title? |
1938 | 1938 | * |
1939 | | - * @return \type{\bool} |
| 1939 | + * @return Bool |
1940 | 1940 | */ |
1941 | 1941 | public function isCssOrJsPage() { |
1942 | 1942 | return $this->mNamespace == NS_MEDIAWIKI |
— | — | @@ -1944,7 +1944,7 @@ |
1945 | 1945 | |
1946 | 1946 | /** |
1947 | 1947 | * Is this a .css or .js subpage of a user page? |
1948 | | - * @return \type{\bool} |
| 1948 | + * @return Bool |
1949 | 1949 | */ |
1950 | 1950 | public function isCssJsSubpage() { |
1951 | 1951 | return ( NS_USER == $this->mNamespace and preg_match( "/\\/.*\\.(?:css|js)$/", $this->mTextform ) ); |
— | — | @@ -1953,7 +1953,7 @@ |
1954 | 1954 | /** |
1955 | 1955 | * Is this a *valid* .css or .js subpage of a user page? |
1956 | 1956 | * |
1957 | | - * @return \type{\bool} |
| 1957 | + * @return Bool |
1958 | 1958 | * @deprecated |
1959 | 1959 | */ |
1960 | 1960 | public function isValidCssJsSubpage() { |
— | — | @@ -1974,7 +1974,7 @@ |
1975 | 1975 | /** |
1976 | 1976 | * Is this a .css subpage of a user page? |
1977 | 1977 | * |
1978 | | - * @return \type{\bool} |
| 1978 | + * @return Bool |
1979 | 1979 | */ |
1980 | 1980 | public function isCssSubpage() { |
1981 | 1981 | return ( NS_USER == $this->mNamespace && preg_match( "/\\/.*\\.css$/", $this->mTextform ) ); |
— | — | @@ -1983,7 +1983,7 @@ |
1984 | 1984 | /** |
1985 | 1985 | * Is this a .js subpage of a user page? |
1986 | 1986 | * |
1987 | | - * @return \type{\bool} |
| 1987 | + * @return Bool |
1988 | 1988 | */ |
1989 | 1989 | public function isJsSubpage() { |
1990 | 1990 | return ( NS_USER == $this->mNamespace && preg_match( "/\\/.*\\.js$/", $this->mTextform ) ); |
— | — | @@ -1993,7 +1993,7 @@ |
1994 | 1994 | * Protect css subpages of user pages: can $wgUser edit |
1995 | 1995 | * this page? |
1996 | 1996 | * |
1997 | | - * @return \type{\bool} |
| 1997 | + * @return Bool |
1998 | 1998 | * @todo XXX: this might be better using restrictions |
1999 | 1999 | */ |
2000 | 2000 | public function userCanEditCssSubpage() { |
— | — | @@ -2006,7 +2006,7 @@ |
2007 | 2007 | * Protect js subpages of user pages: can $wgUser edit |
2008 | 2008 | * this page? |
2009 | 2009 | * |
2010 | | - * @return \type{\bool} |
| 2010 | + * @return Bool |
2011 | 2011 | * @todo XXX: this might be better using restrictions |
2012 | 2012 | */ |
2013 | 2013 | public function userCanEditJsSubpage() { |
— | — | @@ -2018,7 +2018,7 @@ |
2019 | 2019 | /** |
2020 | 2020 | * Cascading protection: Return true if cascading restrictions apply to this page, false if not. |
2021 | 2021 | * |
2022 | | - * @return \type{\bool} If the page is subject to cascading restrictions. |
| 2022 | + * @return Bool If the page is subject to cascading restrictions. |
2023 | 2023 | */ |
2024 | 2024 | public function isCascadeProtected() { |
2025 | 2025 | list( $sources, /* $restrictions */ ) = $this->getCascadeProtectionSources( false ); |
— | — | @@ -2028,9 +2028,9 @@ |
2029 | 2029 | /** |
2030 | 2030 | * Cascading protection: Get the source of any cascading restrictions on this page. |
2031 | 2031 | * |
2032 | | - * @param $getPages \type{\bool} Whether or not to retrieve the actual pages |
| 2032 | + * @param $getPages Bool Whether or not to retrieve the actual pages |
2033 | 2033 | * that the restrictions have come from. |
2034 | | - * @return \type{\arrayof{mixed title array, restriction array}} Array of the Title |
| 2034 | + * @return Mixed Array of the Title |
2035 | 2035 | * objects of the pages from which cascading restrictions have come, |
2036 | 2036 | * false for none, or true if such restrictions exist, but $getPages was not set. |
2037 | 2037 | * The restriction array is an array of each type, each of which contains a |
— | — | @@ -2141,7 +2141,7 @@ |
2142 | 2142 | /** |
2143 | 2143 | * Loads a string into mRestrictions array |
2144 | 2144 | * |
2145 | | - * @param $res \type{Resource} restrictions as an SQL result. |
| 2145 | + * @param $res Resource restrictions as an SQL result. |
2146 | 2146 | * @param $oldFashionedRestrictions string comma-separated list of page |
2147 | 2147 | * restrictions from page table (pre 1.10) |
2148 | 2148 | */ |
— | — | @@ -2296,8 +2296,8 @@ |
2297 | 2297 | /** |
2298 | 2298 | * Accessor/initialisation for mRestrictions |
2299 | 2299 | * |
2300 | | - * @param $action \type{\string} action that permission needs to be checked for |
2301 | | - * @return \type{\arrayof{\string}} the array of groups allowed to edit this article |
| 2300 | + * @param $action String action that permission needs to be checked for |
| 2301 | + * @return Array of Strings the array of groups allowed to edit this article |
2302 | 2302 | */ |
2303 | 2303 | public function getRestrictions( $action ) { |
2304 | 2304 | if ( !$this->mRestrictionsLoaded ) { |
— | — | @@ -2324,7 +2324,7 @@ |
2325 | 2325 | /** |
2326 | 2326 | * Is there a version of this page in the deletion archive? |
2327 | 2327 | * |
2328 | | - * @return \type{\int} the number of archived revisions |
| 2328 | + * @return Int the number of archived revisions |
2329 | 2329 | */ |
2330 | 2330 | public function isDeleted() { |
2331 | 2331 | if ( $this->getNamespace() < 0 ) { |
— | — | @@ -2372,9 +2372,9 @@ |
2373 | 2373 | * Get the article ID for this Title from the link cache, |
2374 | 2374 | * adding it if necessary |
2375 | 2375 | * |
2376 | | - * @param $flags \type{\int} a bit field; may be Title::GAID_FOR_UPDATE to select |
| 2376 | + * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select |
2377 | 2377 | * for update |
2378 | | - * @return \type{\int} the ID |
| 2378 | + * @return Int the ID |
2379 | 2379 | */ |
2380 | 2380 | public function getArticleID( $flags = 0 ) { |
2381 | 2381 | if ( $this->getNamespace() < 0 ) { |
— | — | @@ -2398,8 +2398,8 @@ |
2399 | 2399 | * Is this an article that is a redirect page? |
2400 | 2400 | * Uses link cache, adding it if necessary |
2401 | 2401 | * |
2402 | | - * @param $flags \type{\int} a bit field; may be Title::GAID_FOR_UPDATE to select for update |
2403 | | - * @return \type{\bool} |
| 2402 | + * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select for update |
| 2403 | + * @return Bool |
2404 | 2404 | */ |
2405 | 2405 | public function isRedirect( $flags = 0 ) { |
2406 | 2406 | if ( !is_null( $this->mRedirect ) ) { |
— | — | @@ -2419,8 +2419,8 @@ |
2420 | 2420 | * What is the length of this page? |
2421 | 2421 | * Uses link cache, adding it if necessary |
2422 | 2422 | * |
2423 | | - * @param $flags \type{\int} a bit field; may be Title::GAID_FOR_UPDATE to select for update |
2424 | | - * @return \type{\int} |
| 2423 | + * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select for update |
| 2424 | + * @return Int |
2425 | 2425 | */ |
2426 | 2426 | public function getLength( $flags = 0 ) { |
2427 | 2427 | if ( $this->mLength != -1 ) { |
— | — | @@ -2439,8 +2439,8 @@ |
2440 | 2440 | /** |
2441 | 2441 | * What is the page_latest field for this page? |
2442 | 2442 | * |
2443 | | - * @param $flags \type{\int} a bit field; may be Title::GAID_FOR_UPDATE to select for update |
2444 | | - * @return \type{\int} or 0 if the page doesn't exist |
| 2443 | + * @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select for update |
| 2444 | + * @return Int or 0 if the page doesn't exist |
2445 | 2445 | */ |
2446 | 2446 | public function getLatestRevID( $flags = 0 ) { |
2447 | 2447 | if ( $this->mLatestID !== false ) { |
— | — | @@ -2464,7 +2464,7 @@ |
2465 | 2465 | * loading of the new page_id. It's also called from |
2466 | 2466 | * Article::doDeleteArticle() |
2467 | 2467 | * |
2468 | | - * @param $newid \type{\int} the new Article ID |
| 2468 | + * @param $newid Int the new Article ID |
2469 | 2469 | */ |
2470 | 2470 | public function resetArticleID( $newid ) { |
2471 | 2471 | $linkCache = LinkCache::singleton(); |
— | — | @@ -2485,7 +2485,7 @@ |
2486 | 2486 | /** |
2487 | 2487 | * Updates page_touched for this page; called from LinksUpdate.php |
2488 | 2488 | * |
2489 | | - * @return \type{\bool} true if the update succeded |
| 2489 | + * @return Bool true if the update succeded |
2490 | 2490 | */ |
2491 | 2491 | public function invalidateCache() { |
2492 | 2492 | if ( wfReadOnly() ) { |
— | — | @@ -2506,8 +2506,8 @@ |
2507 | 2507 | * Prefix some arbitrary text with the namespace or interwiki prefix |
2508 | 2508 | * of this object |
2509 | 2509 | * |
2510 | | - * @param $name \type{\string} the text |
2511 | | - * @return \type{\string} the prefixed text |
| 2510 | + * @param $name String the text |
| 2511 | + * @return String the prefixed text |
2512 | 2512 | * @private |
2513 | 2513 | */ |
2514 | 2514 | /* private */ function prefix( $name ) { |
— | — | @@ -2574,7 +2574,7 @@ |
2575 | 2575 | * namespace prefixes, sets the other forms, and canonicalizes |
2576 | 2576 | * everything. |
2577 | 2577 | * |
2578 | | - * @return \type{\bool} true on success |
| 2578 | + * @return Bool true on success |
2579 | 2579 | */ |
2580 | 2580 | private function secureAndSplit() { |
2581 | 2581 | global $wgContLang, $wgLocalInterwiki; |
— | — | @@ -2786,7 +2786,7 @@ |
2787 | 2787 | * Deprecated for public use, use Title::makeTitle() with fragment parameter. |
2788 | 2788 | * Still in active use privately. |
2789 | 2789 | * |
2790 | | - * @param $fragment \type{\string} text |
| 2790 | + * @param $fragment String text |
2791 | 2791 | */ |
2792 | 2792 | public function setFragment( $fragment ) { |
2793 | 2793 | $this->mFragment = str_replace( '_', ' ', substr( $fragment, 1 ) ); |
— | — | @@ -2826,7 +2826,7 @@ |
2827 | 2827 | * @param $options Array: may be FOR UPDATE |
2828 | 2828 | * @param $table String: table name |
2829 | 2829 | * @param $prefix String: fields prefix |
2830 | | - * @return \type{\arrayof{Title}} the Title objects linking here |
| 2830 | + * @return Array of Title objects linking here |
2831 | 2831 | */ |
2832 | 2832 | public function getLinksTo( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) { |
2833 | 2833 | $linkCache = LinkCache::singleton(); |
— | — | @@ -2869,7 +2869,7 @@ |
2870 | 2870 | * On heavily-used templates it will max out the memory. |
2871 | 2871 | * |
2872 | 2872 | * @param $options Array: may be FOR UPDATE |
2873 | | - * @return \type{\arrayof{Title}} the Title objects linking here |
| 2873 | + * @return Array of Title the Title objects linking here |
2874 | 2874 | */ |
2875 | 2875 | public function getTemplateLinksTo( $options = array() ) { |
2876 | 2876 | return $this->getLinksTo( $options, 'templatelinks', 'tl' ); |
— | — | @@ -2879,7 +2879,7 @@ |
2880 | 2880 | * Get an array of Title objects referring to non-existent articles linked from this page |
2881 | 2881 | * |
2882 | 2882 | * @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case) |
2883 | | - * @return \type{\arrayof{Title}} the Title objects |
| 2883 | + * @return Array of Title the Title objects |
2884 | 2884 | */ |
2885 | 2885 | public function getBrokenLinksFrom() { |
2886 | 2886 | if ( $this->getArticleId() == 0 ) { |
— | — | @@ -2916,7 +2916,7 @@ |
2917 | 2917 | * Get a list of URLs to purge from the Squid cache when this |
2918 | 2918 | * page changes |
2919 | 2919 | * |
2920 | | - * @return \type{\arrayof{\string}} the URLs |
| 2920 | + * @return Array of String the URLs |
2921 | 2921 | */ |
2922 | 2922 | public function getSquidURLs() { |
2923 | 2923 | global $wgContLang; |
— | — | @@ -2952,8 +2952,8 @@ |
2953 | 2953 | /** |
2954 | 2954 | * Move this page without authentication |
2955 | 2955 | * |
2956 | | - * @param $nt \type{Title} the new page Title |
2957 | | - * @return \type{\mixed} true on success, getUserPermissionsErrors()-like array on failure |
| 2956 | + * @param $nt Title the new page Title |
| 2957 | + * @return Mixed true on success, getUserPermissionsErrors()-like array on failure |
2958 | 2958 | */ |
2959 | 2959 | public function moveNoAuth( &$nt ) { |
2960 | 2960 | return $this->moveTo( $nt, false ); |
— | — | @@ -2963,11 +2963,11 @@ |
2964 | 2964 | * Check whether a given move operation would be valid. |
2965 | 2965 | * Returns true if ok, or a getUserPermissionsErrors()-like array otherwise |
2966 | 2966 | * |
2967 | | - * @param $nt \type{Title} the new title |
2968 | | - * @param $auth \type{\bool} indicates whether $wgUser's permissions |
| 2967 | + * @param $nt Title the new title |
| 2968 | + * @param $auth Bool indicates whether $wgUser's permissions |
2969 | 2969 | * should be checked |
2970 | | - * @param $reason \type{\string} is the log summary of the move, used for spam checking |
2971 | | - * @return \type{\mixed} True on success, getUserPermissionsErrors()-like array on failure |
| 2970 | + * @param $reason String is the log summary of the move, used for spam checking |
| 2971 | + * @return Mixed True on success, getUserPermissionsErrors()-like array on failure |
2972 | 2972 | */ |
2973 | 2973 | public function isValidMoveOperation( &$nt, $auth = true, $reason = '' ) { |
2974 | 2974 | global $wgUser; |
— | — | @@ -3070,13 +3070,13 @@ |
3071 | 3071 | /** |
3072 | 3072 | * Move a title to a new location |
3073 | 3073 | * |
3074 | | - * @param $nt \type{Title} the new title |
3075 | | - * @param $auth \type{\bool} indicates whether $wgUser's permissions |
| 3074 | + * @param $nt Title the new title |
| 3075 | + * @param $auth Bool indicates whether $wgUser's permissions |
3076 | 3076 | * should be checked |
3077 | | - * @param $reason \type{\string} The reason for the move |
3078 | | - * @param $createRedirect \type{\bool} Whether to create a redirect from the old title to the new title. |
| 3077 | + * @param $reason String The reason for the move |
| 3078 | + * @param $createRedirect Bool Whether to create a redirect from the old title to the new title. |
3079 | 3079 | * Ignored if the user doesn't have the suppressredirect right. |
3080 | | - * @return \type{\mixed} true on success, getUserPermissionsErrors()-like array on failure |
| 3080 | + * @return Mixed true on success, getUserPermissionsErrors()-like array on failure |
3081 | 3081 | */ |
3082 | 3082 | public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true ) { |
3083 | 3083 | global $wgContLang; |
— | — | @@ -3210,10 +3210,10 @@ |
3211 | 3211 | * Move page to a title which is either a redirect to the |
3212 | 3212 | * source page or nonexistent |
3213 | 3213 | * |
3214 | | - * @param $nt \type{Title} the page to move to, which should |
| 3214 | + * @param $nt Title the page to move to, which should |
3215 | 3215 | * be a redirect or nonexistent |
3216 | | - * @param $reason \type{\string} The reason for the move |
3217 | | - * @param $createRedirect \type{\bool} Whether to leave a |
| 3216 | + * @param $reason String The reason for the move |
| 3217 | + * @param $createRedirect Bool Whether to leave a |
3218 | 3218 | * redirect at the old title. Ignored if the user doesn't |
3219 | 3219 | * have the suppressredirect right |
3220 | 3220 | */ |
— | — | @@ -3414,7 +3414,7 @@ |
3415 | 3415 | * Checks if this page is just a one-rev redirect. |
3416 | 3416 | * Adds lock, so don't use just for light purposes. |
3417 | 3417 | * |
3418 | | - * @return \type{\bool} |
| 3418 | + * @return Bool |
3419 | 3419 | */ |
3420 | 3420 | public function isSingleRevRedirect() { |
3421 | 3421 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -3451,8 +3451,8 @@ |
3452 | 3452 | * Checks if $this can be moved to a given Title |
3453 | 3453 | * - Selects for update, so don't call it unless you mean business |
3454 | 3454 | * |
3455 | | - * @param $nt \type{Title} the new title to check |
3456 | | - * @return \type{\bool} TRUE or FALSE |
| 3455 | + * @param $nt Title the new title to check |
| 3456 | + * @return Bool TRUE or FALSE |
3457 | 3457 | */ |
3458 | 3458 | public function isValidMoveTarget( $nt ) { |
3459 | 3459 | # Is it an existing file? |
— | — | @@ -3493,7 +3493,7 @@ |
3494 | 3494 | /** |
3495 | 3495 | * Can this title be added to a user's watchlist? |
3496 | 3496 | * |
3497 | | - * @return \type{\bool} TRUE or FALSE |
| 3497 | + * @return Bool TRUE or FALSE |
3498 | 3498 | */ |
3499 | 3499 | public function isWatchable() { |
3500 | 3500 | return !$this->isExternal() && MWNamespace::isWatchable( $this->getNamespace() ); |
— | — | @@ -3503,7 +3503,7 @@ |
3504 | 3504 | * Get categories to which this Title belongs and return an array of |
3505 | 3505 | * categories' names. |
3506 | 3506 | * |
3507 | | - * @return \type{\array} array an array of parents in the form: |
| 3507 | + * @return Array of parents in the form: |
3508 | 3508 | * $parent => $currentarticle |
3509 | 3509 | */ |
3510 | 3510 | public function getParentCategories() { |
— | — | @@ -3534,8 +3534,8 @@ |
3535 | 3535 | /** |
3536 | 3536 | * Get a tree of parent categories |
3537 | 3537 | * |
3538 | | - * @param $children \type{\array} an array with the children in the keys, to check for circular refs |
3539 | | - * @return \type{\array} Tree of parent categories |
| 3538 | + * @param $children Array with the children in the keys, to check for circular refs |
| 3539 | + * @return Array Tree of parent categories |
3540 | 3540 | */ |
3541 | 3541 | public function getParentCategoryTree( $children = array() ) { |
3542 | 3542 | $stack = array(); |
— | — | @@ -3563,7 +3563,7 @@ |
3564 | 3564 | * Get an associative array for selecting this title from |
3565 | 3565 | * the "page" table |
3566 | 3566 | * |
3567 | | - * @return \type{\array} Selection array |
| 3567 | + * @return Array Selection array |
3568 | 3568 | */ |
3569 | 3569 | public function pageCond() { |
3570 | 3570 | if ( $this->mArticleID > 0 ) { |
— | — | @@ -3577,8 +3577,8 @@ |
3578 | 3578 | /** |
3579 | 3579 | * Get the revision ID of the previous revision |
3580 | 3580 | * |
3581 | | - * @param $revId \type{\int} Revision ID. Get the revision that was before this one. |
3582 | | - * @param $flags \type{\int} Title::GAID_FOR_UPDATE |
| 3581 | + * @param $revId Int Revision ID. Get the revision that was before this one. |
| 3582 | + * @param $flags Int Title::GAID_FOR_UPDATE |
3583 | 3583 | * @return \twotypes{\int,\bool} Old revision ID, or FALSE if none exists |
3584 | 3584 | */ |
3585 | 3585 | public function getPreviousRevisionID( $revId, $flags = 0 ) { |
— | — | @@ -3596,8 +3596,8 @@ |
3597 | 3597 | /** |
3598 | 3598 | * Get the revision ID of the next revision |
3599 | 3599 | * |
3600 | | - * @param $revId \type{\int} Revision ID. Get the revision that was after this one. |
3601 | | - * @param $flags \type{\int} Title::GAID_FOR_UPDATE |
| 3600 | + * @param $revId Int Revision ID. Get the revision that was after this one. |
| 3601 | + * @param $flags Int Title::GAID_FOR_UPDATE |
3602 | 3602 | * @return \twotypes{\int,\bool} Next revision ID, or FALSE if none exists |
3603 | 3603 | */ |
3604 | 3604 | public function getNextRevisionID( $revId, $flags = 0 ) { |
— | — | @@ -3615,7 +3615,7 @@ |
3616 | 3616 | /** |
3617 | 3617 | * Get the first revision of the page |
3618 | 3618 | * |
3619 | | - * @param $flags \type{\int} Title::GAID_FOR_UPDATE |
| 3619 | + * @param $flags Int Title::GAID_FOR_UPDATE |
3620 | 3620 | * @return Revision (or NULL if page doesn't exist) |
3621 | 3621 | */ |
3622 | 3622 | public function getFirstRevision( $flags = 0 ) { |
— | — | @@ -3667,9 +3667,9 @@ |
3668 | 3668 | * Get the number of revisions between the given revision IDs. |
3669 | 3669 | * Used for diffs and other things that really need it. |
3670 | 3670 | * |
3671 | | - * @param $old \type{\int} Revision ID. |
3672 | | - * @param $new \type{\int} Revision ID. |
3673 | | - * @return \type{\int} Number of revisions between these IDs. |
| 3671 | + * @param $old Int Revision ID. |
| 3672 | + * @param $new Int Revision ID. |
| 3673 | + * @return Int Number of revisions between these IDs. |
3674 | 3674 | */ |
3675 | 3675 | public function countRevisionsBetween( $old, $new ) { |
3676 | 3676 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -3685,11 +3685,11 @@ |
3686 | 3686 | * Get the number of authors between the given revision IDs. |
3687 | 3687 | * Used for diffs and other things that really need it. |
3688 | 3688 | * |
3689 | | - * @param $fromRevId \type{\int} Revision ID (first before range) |
3690 | | - * @param $toRevId \type{\int} Revision ID (first after range) |
3691 | | - * @param $limit \type{\int} Maximum number of authors |
3692 | | - * @param $flags \type{\int} Title::GAID_FOR_UPDATE |
3693 | | - * @return \type{\int} |
| 3689 | + * @param $fromRevId Int Revision ID (first before range) |
| 3690 | + * @param $toRevId Int Revision ID (first after range) |
| 3691 | + * @param $limit Int Maximum number of authors |
| 3692 | + * @param $flags Int Title::GAID_FOR_UPDATE |
| 3693 | + * @return Int |
3694 | 3694 | */ |
3695 | 3695 | public function countAuthorsBetween( $fromRevId, $toRevId, $limit, $flags = 0 ) { |
3696 | 3696 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
— | — | @@ -3707,8 +3707,8 @@ |
3708 | 3708 | /** |
3709 | 3709 | * Compare with another title. |
3710 | 3710 | * |
3711 | | - * @param $title \type{Title} |
3712 | | - * @return \type{\bool} TRUE or FALSE |
| 3711 | + * @param $title Title |
| 3712 | + * @return Bool TRUE or FALSE |
3713 | 3713 | */ |
3714 | 3714 | public function equals( Title $title ) { |
3715 | 3715 | // Note: === is necessary for proper matching of number-like titles. |
— | — | @@ -3733,7 +3733,7 @@ |
3734 | 3734 | /** |
3735 | 3735 | * Return a string representation of this title |
3736 | 3736 | * |
3737 | | - * @return \type{\string} String representation of this title |
| 3737 | + * @return String String representation of this title |
3738 | 3738 | */ |
3739 | 3739 | public function __toString() { |
3740 | 3740 | return $this->getPrefixedText(); |
— | — | @@ -3746,7 +3746,7 @@ |
3747 | 3747 | * If you want to know if a title can be meaningfully viewed, you should |
3748 | 3748 | * probably call the isKnown() method instead. |
3749 | 3749 | * |
3750 | | - * @return \type{\bool} |
| 3750 | + * @return Bool |
3751 | 3751 | */ |
3752 | 3752 | public function exists() { |
3753 | 3753 | return $this->getArticleId() != 0; |
— | — | @@ -3766,7 +3766,7 @@ |
3767 | 3767 | * existing code, but we might want to add an optional parameter to skip |
3768 | 3768 | * it and any other expensive checks.) |
3769 | 3769 | * |
3770 | | - * @return \type{\bool} |
| 3770 | + * @return Bool |
3771 | 3771 | */ |
3772 | 3772 | public function isAlwaysKnown() { |
3773 | 3773 | if ( $this->mInterwiki != '' ) { |
— | — | @@ -3797,7 +3797,7 @@ |
3798 | 3798 | * links to the title should be rendered as "bluelinks" (as opposed to |
3799 | 3799 | * "redlinks" to non-existent pages). |
3800 | 3800 | * |
3801 | | - * @return \type{\bool} |
| 3801 | + * @return Bool |
3802 | 3802 | */ |
3803 | 3803 | public function isKnown() { |
3804 | 3804 | return $this->isAlwaysKnown() || $this->exists(); |
— | — | @@ -3829,7 +3829,7 @@ |
3830 | 3830 | /** |
3831 | 3831 | * Is this in a namespace that allows actual pages? |
3832 | 3832 | * |
3833 | | - * @return \type{\bool} |
| 3833 | + * @return Bool |
3834 | 3834 | * @internal note -- uses hardcoded namespace index instead of constants |
3835 | 3835 | */ |
3836 | 3836 | public function canExist() { |
— | — | @@ -3855,7 +3855,7 @@ |
3856 | 3856 | * Get the last touched timestamp |
3857 | 3857 | * |
3858 | 3858 | * @param $db DatabaseBase: optional db |
3859 | | - * @return \type{\string} Last touched timestamp |
| 3859 | + * @return String Last touched timestamp |
3860 | 3860 | */ |
3861 | 3861 | public function getTouched( $db = null ) { |
3862 | 3862 | $db = isset( $db ) ? $db : wfGetDB( DB_SLAVE ); |
— | — | @@ -3902,7 +3902,7 @@ |
3903 | 3903 | /** |
3904 | 3904 | * Get the trackback URL for this page |
3905 | 3905 | * |
3906 | | - * @return \type{\string} Trackback URL |
| 3906 | + * @return String Trackback URL |
3907 | 3907 | */ |
3908 | 3908 | public function trackbackURL() { |
3909 | 3909 | global $wgScriptPath, $wgServer, $wgScriptExtension; |
— | — | @@ -3914,7 +3914,7 @@ |
3915 | 3915 | /** |
3916 | 3916 | * Get the trackback RDF for this page |
3917 | 3917 | * |
3918 | | - * @return \type{\string} Trackback RDF |
| 3918 | + * @return String Trackback RDF |
3919 | 3919 | */ |
3920 | 3920 | public function trackbackRDF() { |
3921 | 3921 | $url = htmlspecialchars( $this->getFullURL() ); |
— | — | @@ -3943,7 +3943,7 @@ |
3944 | 3944 | * Generate strings used for xml 'id' names in monobook tabs |
3945 | 3945 | * |
3946 | 3946 | * @param $prepend string defaults to 'nstab-' |
3947 | | - * @return \type{\string} XML 'id' name |
| 3947 | + * @return String XML 'id' name |
3948 | 3948 | */ |
3949 | 3949 | public function getNamespaceKey( $prepend = 'nstab-' ) { |
3950 | 3950 | global $wgContLang; |
— | — | @@ -3982,7 +3982,7 @@ |
3983 | 3983 | /** |
3984 | 3984 | * Returns true if this title resolves to the named special page |
3985 | 3985 | * |
3986 | | - * @param $name \type{\string} The special page name |
| 3986 | + * @param $name String The special page name |
3987 | 3987 | * @return boolean |
3988 | 3988 | */ |
3989 | 3989 | public function isSpecial( $name ) { |
— | — | @@ -3998,7 +3998,7 @@ |
3999 | 3999 | /** |
4000 | 4000 | * If the Title refers to a special page alias which is not the local default, |
4001 | 4001 | * |
4002 | | - * @return \type{Title} A new Title which points to the local default. |
| 4002 | + * @return Title A new Title which points to the local default. |
4003 | 4003 | * Otherwise, returns $this. |
4004 | 4004 | */ |
4005 | 4005 | public function fixSpecialName() { |
— | — | @@ -4028,9 +4028,9 @@ |
4029 | 4029 | /** |
4030 | 4030 | * Get all extant redirects to this Title |
4031 | 4031 | * |
4032 | | - * @param $ns \twotypes{\int,\null} Single namespace to consider; |
| 4032 | + * @param $ns Int|Null Single namespace to consider; |
4033 | 4033 | * NULL to consider all namespaces |
4034 | | - * @return \type{\arrayof{Title}} Redirects to this title |
| 4034 | + * @return Array of Title redirects to this title |
4035 | 4035 | */ |
4036 | 4036 | public function getRedirectsHere( $ns = null ) { |
4037 | 4037 | $redirs = array(); |
— | — | @@ -4061,7 +4061,7 @@ |
4062 | 4062 | /** |
4063 | 4063 | * Check if this Title is a valid redirect target |
4064 | 4064 | * |
4065 | | - * @return \type{\bool} |
| 4065 | + * @return Bool |
4066 | 4066 | */ |
4067 | 4067 | public function isValidRedirectTarget() { |
4068 | 4068 | global $wgInvalidRedirectTargets; |