r79682 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79681‎ | r79682 | r79683 >
Date:23:08, 5 January 2011
Author:happy-melon
Status:resolved (Comments)
Tags:
Comment:
Documentation format
Modified paths:
  • /trunk/phase3/includes/RecentChange.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -66,7 +66,7 @@
6767 /**
6868 * Obtain the recent change with a given rc_id value
6969 *
70 - * @param $rcid rc_id value to retrieve
 70+ * @param $rcid Int rc_id value to retrieve
7171 * @return RecentChange
7272 */
7373 public static function newFromId( $rcid ) {
Index: trunk/phase3/includes/Title.php
@@ -94,10 +94,10 @@
9595 /**
9696 * Create a new Title from a prefixed DB key
9797 *
98 - * @param $key \type{\string} The database key, which has underscores
 98+ * @param $key String The database key, which has underscores
9999 * instead of spaces, possibly including namespace and
100100 * 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
102102 */
103103 public static function newFromDBkey( $key ) {
104104 $t = new Title();
@@ -113,7 +113,7 @@
114114 * Create a new Title from text, such as what one would find in a link. De-
115115 * codes any HTML entities in the text.
116116 *
117 - * @param $text string The link text; spaces, prefixes, and an
 117+ * @param $text String The link text; spaces, prefixes, and an
118118 * initial ':' indicating the main namespace are accepted.
119119 * @param $defaultNamespace int The namespace to use if none is speci-
120120 * fied by a prefix. If you want to force a specific namespace even if
@@ -177,8 +177,8 @@
178178 * Create a new Title from URL-encoded text. Ensures that
179179 * the given title's length does not exceed the maximum.
180180 *
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
183183 */
184184 public static function newFromURL( $url ) {
185185 global $wgLegalTitleChars;
@@ -202,9 +202,9 @@
203203 /**
204204 * Create a new Title from an article ID
205205 *
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
209209 */
210210 public static function newFromID( $id, $flags = 0 ) {
211211 $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
@@ -220,8 +220,8 @@
221221 /**
222222 * Make an array of titles from an array of IDs
223223 *
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
226226 */
227227 public static function newFromIDs( $ids ) {
228228 if ( !count( $ids ) ) {
@@ -249,8 +249,8 @@
250250 /**
251251 * Make a Title object from a DB row
252252 *
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
255255 */
256256 public static function newFromRow( $row ) {
257257 $t = self::makeTitle( $row->page_namespace, $row->page_title );
@@ -270,11 +270,11 @@
271271 * For convenience, spaces are converted to underscores so that
272272 * eg user_text fields can be used directly.
273273 *
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
279279 */
280280 public static function &makeTitle( $ns, $title, $fragment = '', $interwiki = '' ) {
281281 $t = new Title();
@@ -293,11 +293,11 @@
294294 * The parameters will be checked for validity, which is a bit slower
295295 * than makeTitle() but safer for user-provided data.
296296 *
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
302302 */
303303 public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) {
304304 $t = new Title();
@@ -312,7 +312,7 @@
313313 /**
314314 * Create a new Title for the Main Page
315315 *
316 - * @return \type{Title} the new object
 316+ * @return Title the new object
317317 */
318318 public static function newMainPage() {
319319 $title = Title::newFromText( wfMsgForContent( 'mainpage' ) );
@@ -342,8 +342,8 @@
343343 * This will recurse down $wgMaxRedirects times or until a non-redirect target is hit
344344 * in order to provide (hopefully) the Title of the final destination instead of another redirect
345345 *
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
348348 */
349349 public static function newFromRedirectRecurse( $text ) {
350350 $titles = self::newFromRedirectArray( $text );
@@ -356,8 +356,8 @@
357357 * The last element in the array is the final destination after all redirects
358358 * have been resolved (up to $wgMaxRedirects times)
359359 *
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
362362 */
363363 public static function newFromRedirectArray( $text ) {
364364 global $wgMaxRedirects;
@@ -395,8 +395,8 @@
396396 * Really extract the redirect destination
397397 * Do not call this function directly, use one of the newFromRedirect* functions above
398398 *
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
401401 */
402402 protected static function newFromRedirectInternal( $text ) {
403403 $redir = MagicWord::get( 'redirect' );
@@ -431,8 +431,8 @@
432432 /**
433433 * Get the prefixed DB key associated with an ID
434434 *
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
437437 * if no such article was found
438438 */
439439 public static function nameOf( $id ) {
@@ -455,7 +455,7 @@
456456 /**
457457 * Get a regex character class describing the legal characters in a link
458458 *
459 - * @return \type{\string} the list of characters, not delimited
 459+ * @return String the list of characters, not delimited
460460 */
461461 public static function legalChars() {
462462 global $wgLegalTitleChars;
@@ -466,9 +466,9 @@
467467 * Get a string representation of a title suitable for
468468 * including in a search index
469469 *
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
473473 * search index
474474 */
475475 public static function indexTitle( $ns, $title ) {
@@ -494,11 +494,11 @@
495495 /**
496496 * Make a prefixed DB key from a DB key and a namespace index
497497 *
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
503503 */
504504 public static function makeName( $ns, $title, $fragment = '', $interwiki = '' ) {
505505 global $wgContLang;
@@ -518,7 +518,7 @@
519519 * Determine whether the object refers to a page within
520520 * this project.
521521 *
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
523523 * or a wikilink, FALSE otherwise
524524 */
525525 public function isLocal() {
@@ -533,7 +533,7 @@
534534 * Determine whether the object refers to a page within
535535 * this project and is transcludable.
536536 *
537 - * @return \type{\bool} TRUE if this is transcludable
 537+ * @return Bool TRUE if this is transcludable
538538 */
539539 public function isTrans() {
540540 if ( $this->mInterwiki == '' ) {
@@ -547,7 +547,7 @@
548548 * Returns the DB name of the distant wiki
549549 * which owns the object.
550550 *
551 - * @return \type{\string} the DB name
 551+ * @return String the DB name
552552 */
553553 public function getTransWikiID() {
554554 if ( $this->mInterwiki == '' ) {
@@ -579,14 +579,14 @@
580580 /**
581581 * Get the text form (spaces not underscores) of the main part
582582 *
583 - * @return \type{\string} Main part of the title
 583+ * @return String Main part of the title
584584 */
585585 public function getText() { return $this->mTextform; }
586586
587587 /**
588588 * Get the URL-encoded form of the main part
589589 *
590 - * @return \type{\string} Main part of the title, URL-encoded
 590+ * @return String Main part of the title, URL-encoded
591591 */
592592 public function getPartialURL() { return $this->mUrlform; }
593593
@@ -629,7 +629,7 @@
630630 /**
631631 * Get the DB key with the initial letter case as specified by the user
632632 *
633 - * @return \type{\string} DB key
 633+ * @return String DB key
634634 */
635635 function getUserCaseDBKey() {
636636 return $this->mUserCaseDBKey;
@@ -638,7 +638,7 @@
639639 /**
640640 * Get the namespace text of the subject (rather than talk) page
641641 *
642 - * @return \type{\string} Namespace text
 642+ * @return String Namespace text
643643 */
644644 public function getSubjectNsText() {
645645 global $wgContLang;
@@ -648,7 +648,7 @@
649649 /**
650650 * Get the namespace text of the talk page
651651 *
652 - * @return \type{\string} Namespace text
 652+ * @return String Namespace text
653653 */
654654 public function getTalkNsText() {
655655 global $wgContLang;
@@ -658,7 +658,7 @@
659659 /**
660660 * Could this title have a corresponding talk page?
661661 *
662 - * @return \type{\bool} TRUE or FALSE
 662+ * @return Bool TRUE or FALSE
663663 */
664664 public function canTalk() {
665665 return( MWNamespace::canTalk( $this->mNamespace ) );
@@ -667,20 +667,20 @@
668668 /**
669669 * Get the interwiki prefix (or null string)
670670 *
671 - * @return \type{\string} Interwiki prefix
 671+ * @return String Interwiki prefix
672672 */
673673 public function getInterwiki() { return $this->mInterwiki; }
674674
675675 /**
676676 * Get the Title fragment (i.e.\ the bit after the #) in text form
677677 *
678 - * @return \type{\string} Title fragment
 678+ * @return String Title fragment
679679 */
680680 public function getFragment() { return $this->mFragment; }
681681
682682 /**
683683 * 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
685685 */
686686 public function getFragmentForURL() {
687687 if ( $this->mFragment == '' ) {
@@ -693,14 +693,14 @@
694694 /**
695695 * Get the default namespace index, for when there is no namespace
696696 *
697 - * @return \type{\int} Default namespace index
 697+ * @return Int Default namespace index
698698 */
699699 public function getDefaultNamespace() { return $this->mDefaultNamespace; }
700700
701701 /**
702702 * Get title for search index
703703 *
704 - * @return \type{\string} a stripped-down title string ready for the
 704+ * @return String a stripped-down title string ready for the
705705 * search index
706706 */
707707 public function getIndexTitle() {
@@ -710,7 +710,7 @@
711711 /**
712712 * Get the prefixed database key form
713713 *
714 - * @return \type{\string} the prefixed title, with underscores and
 714+ * @return String the prefixed title, with underscores and
715715 * any interwiki and namespace prefixes
716716 */
717717 public function getPrefixedDBkey() {
@@ -723,7 +723,7 @@
724724 * Get the prefixed title with spaces.
725725 * This is the form usually used for display
726726 *
727 - * @return \type{\string} the prefixed title, with spaces
 727+ * @return String the prefixed title, with spaces
728728 */
729729 public function getPrefixedText() {
730730 if ( empty( $this->mPrefixedText ) ) { // FIXME: bad usage of empty() ?
@@ -738,7 +738,7 @@
739739 * Get the prefixed title with spaces, plus any fragment
740740 * (part beginning with '#')
741741 *
742 - * @return \type{\string} the prefixed title, with spaces and
 742+ * @return String the prefixed title, with spaces and
743743 * the fragment, including '#'
744744 */
745745 public function getFullText() {
@@ -752,7 +752,7 @@
753753 /**
754754 * Get the base name, i.e. the leftmost parts before the /
755755 *
756 - * @return \type{\string} Base name
 756+ * @return String Base name
757757 */
758758 public function getBaseText() {
759759 if ( !MWNamespace::hasSubpages( $this->mNamespace ) ) {
@@ -770,7 +770,7 @@
771771 /**
772772 * Get the lowest-level subpage name, i.e. the rightmost part after /
773773 *
774 - * @return \type{\string} Subpage name
 774+ * @return String Subpage name
775775 */
776776 public function getSubpageText() {
777777 if ( !MWNamespace::hasSubpages( $this->mNamespace ) ) {
@@ -783,7 +783,7 @@
784784 /**
785785 * Get a URL-encoded form of the subpage text
786786 *
787 - * @return \type{\string} URL-encoded subpage name
 787+ * @return String URL-encoded subpage name
788788 */
789789 public function getSubpageUrlForm() {
790790 $text = $this->getSubpageText();
@@ -794,7 +794,7 @@
795795 /**
796796 * Get a URL-encoded title (not an actual URL) including interwiki
797797 *
798 - * @return \type{\string} the URL-encoded form
 798+ * @return String the URL-encoded form
799799 */
800800 public function getPrefixedURL() {
801801 $s = $this->prefix( $this->mDbkeyform );
@@ -809,8 +809,8 @@
810810 * @param $query \twotypes{\string,\array} an optional query string, not used for interwiki
811811 * links. Can be specified as an associative array as well, e.g.,
812812 * 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
815815 */
816816 public function getFullURL( $query = '', $variant = false ) {
817817 global $wgServer, $wgRequest;
@@ -856,8 +856,8 @@
857857 * $wgArticlePath will be used. Can be specified as an associative array
858858 * as well, e.g., array( 'action' => 'edit' ) (keys and values will be
859859 * 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
862862 */
863863 public function getLocalURL( $query = '', $variant = false ) {
864864 global $wgArticlePath, $wgScript, $wgServer, $wgRequest;
@@ -937,12 +937,12 @@
938938 * The result obviously should not be URL-escaped, but does need to be
939939 * HTML-escaped if it's being output in HTML.
940940 *
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
942942 * 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
944944 * for external links. Default is "false" (same variant as current page,
945945 * for anonymous users).
946 - * @return \type{\string} the URL
 946+ * @return String the URL
947947 */
948948 public function getLinkUrl( $query = array(), $variant = false ) {
949949 wfProfileIn( __METHOD__ );
@@ -961,8 +961,8 @@
962962 * Get an HTML-escaped version of the URL form, suitable for
963963 * using in a link, without a server name or fragment
964964 *
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
967967 */
968968 public function escapeLocalURL( $query = '' ) {
969969 return htmlspecialchars( $this->getLocalURL( $query ) );
@@ -972,8 +972,8 @@
973973 * Get an HTML-escaped version of the URL form, suitable for
974974 * using in a link, including the server name and fragment
975975 *
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
978978 */
979979 public function escapeFullURL( $query = '' ) {
980980 return htmlspecialchars( $this->getFullURL( $query ) );
@@ -984,9 +984,9 @@
985985 * - Used in various Squid-related code, in case we have a different
986986 * internal hostname for the server from the exposed one.
987987 *
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
991991 */
992992 public function getInternalURL( $query = '', $variant = false ) {
993993 global $wgInternalServer;
@@ -998,7 +998,7 @@
999999 /**
10001000 * Get the edit URL for this Title
10011001 *
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
10031003 * interwiki link
10041004 */
10051005 public function getEditURL() {
@@ -1014,7 +1014,7 @@
10151015 * Get the HTML-escaped displayable text form.
10161016 * Used for the title field in <a> tags.
10171017 *
1018 - * @return \type{\string} the text, including any prefixes
 1018+ * @return String the text, including any prefixes
10191019 */
10201020 public function getEscapedText() {
10211021 return htmlspecialchars( $this->getPrefixedText() );
@@ -1023,7 +1023,7 @@
10241024 /**
10251025 * Is this Title interwiki?
10261026 *
1027 - * @return \type{\bool}
 1027+ * @return Bool
10281028 */
10291029 public function isExternal() {
10301030 return ( $this->mInterwiki != '' );
@@ -1032,8 +1032,8 @@
10331033 /**
10341034 * Is this page "semi-protected" - the *only* protection is autoconfirm?
10351035 *
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
10381038 */
10391039 public function isSemiProtected( $action = 'edit' ) {
10401040 if ( $this->exists() ) {
@@ -1058,9 +1058,9 @@
10591059 /**
10601060 * Does the title correspond to a protected article?
10611061 *
1062 - * @param $action \type{\string} the action the page is protected from,
 1062+ * @param $action String the action the page is protected from,
10631063 * by default checks all actions.
1064 - * @return \type{\bool}
 1064+ * @return Bool
10651065 */
10661066 public function isProtected( $action = '' ) {
10671067 global $wgRestrictionLevels;
@@ -1090,7 +1090,7 @@
10911091 /**
10921092 * Is this a conversion table for the LanguageConverter?
10931093 *
1094 - * @return \type{\bool}
 1094+ * @return Bool
10951095 */
10961096 public function isConversionTable() {
10971097 if(
@@ -1107,7 +1107,7 @@
11081108 /**
11091109 * Is $wgUser watching this page?
11101110 *
1111 - * @return \type{\bool}
 1111+ * @return Bool
11121112 */
11131113 public function userIsWatching() {
11141114 global $wgUser;
@@ -1132,8 +1132,8 @@
11331133 *
11341134 * May provide false positives, but should never provide a false negative.
11351135 *
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
11381138 */
11391139 public function quickUserCan( $action ) {
11401140 return $this->userCan( $action, false );
@@ -1144,7 +1144,7 @@
11451145 * by $wgNamespaceProtection.
11461146 *
11471147 * @param $user User object, $wgUser will be used if not passed
1148 - * @return \type{\bool}
 1148+ * @return Bool
11491149 */
11501150 public function isNamespaceProtected( User $user = null ) {
11511151 global $wgNamespaceProtection;
@@ -1167,9 +1167,9 @@
11681168 /**
11691169 * Can $wgUser perform $action on this page?
11701170 *
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
11741174 */
11751175 public function userCan( $action, $doExpensiveQueries = true ) {
11761176 global $wgUser;
@@ -1181,11 +1181,11 @@
11821182 *
11831183 * FIXME: This *does not* check throttles (User::pingLimiter()).
11841184 *
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.
11901190 */
11911191 public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) {
11921192 $errors = $this->getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries );
@@ -1596,11 +1596,11 @@
15971597 * which checks ONLY that previously checked by userCan (i.e. it leaves out
15981598 * checks on wfReadOnly() and blocks)
15991599 *
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.
16051605 */
16061606 protected function getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries = true, $short = false ) {
16071607 wfProfileIn( __METHOD__ );
@@ -1630,7 +1630,7 @@
16311631 /**
16321632 * Is this title subject to title protection?
16331633 *
1634 - * @return \type{\mixed} An associative array representing any existent title
 1634+ * @return Mixed An associative array representing any existent title
16351635 * protection, or false if there's none.
16361636 */
16371637 private function getTitleProtection() {
@@ -1663,9 +1663,9 @@
16641664 /**
16651665 * Update the title protection status
16661666 *
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
16701670 * @return boolean true
16711671 */
16721672 public function updateTitleProtection( $create_perm, $reason, $expiry ) {
@@ -1743,7 +1743,7 @@
17441744 * Would anybody with sufficient privileges be able to move this page?
17451745 * Some pages just aren't movable.
17461746 *
1747 - * @return \type{\bool} TRUE or FALSE
 1747+ * @return Bool TRUE or FALSE
17481748 */
17491749 public function isMovable() {
17501750 return MWNamespace::isMovable( $this->getNamespace() ) && $this->getInterwiki() == '';
@@ -1752,7 +1752,7 @@
17531753 /**
17541754 * Can $wgUser read this page?
17551755 *
1756 - * @return \type{\bool}
 1756+ * @return Bool
17571757 * @todo fold these checks into userCan()
17581758 */
17591759 public function userCanRead() {
@@ -1859,7 +1859,7 @@
18601860 /**
18611861 * Is this a talk page of some sort?
18621862 *
1863 - * @return \type{\bool}
 1863+ * @return Bool
18641864 */
18651865 public function isTalkPage() {
18661866 return MWNamespace::isTalk( $this->getNamespace() );
@@ -1868,7 +1868,7 @@
18691869 /**
18701870 * Is this a subpage?
18711871 *
1872 - * @return \type{\bool}
 1872+ * @return Bool
18731873 */
18741874 public function isSubpage() {
18751875 return MWNamespace::hasSubpages( $this->mNamespace )
@@ -1879,7 +1879,7 @@
18801880 /**
18811881 * Does this have subpages? (Warning, usually requires an extra DB query.)
18821882 *
1883 - * @return \type{\bool}
 1883+ * @return Bool
18841884 */
18851885 public function hasSubpages() {
18861886 if ( !MWNamespace::hasSubpages( $this->mNamespace ) ) {
@@ -1905,7 +1905,7 @@
19061906 /**
19071907 * Get all subpages of this page.
19081908 *
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
19101910 * @return mixed TitleArray, or empty array if this page's namespace
19111911 * doesn't allow subpages
19121912 */
@@ -1935,7 +1935,7 @@
19361936 * Could this page contain custom CSS or JavaScript, based
19371937 * on the title?
19381938 *
1939 - * @return \type{\bool}
 1939+ * @return Bool
19401940 */
19411941 public function isCssOrJsPage() {
19421942 return $this->mNamespace == NS_MEDIAWIKI
@@ -1944,7 +1944,7 @@
19451945
19461946 /**
19471947 * Is this a .css or .js subpage of a user page?
1948 - * @return \type{\bool}
 1948+ * @return Bool
19491949 */
19501950 public function isCssJsSubpage() {
19511951 return ( NS_USER == $this->mNamespace and preg_match( "/\\/.*\\.(?:css|js)$/", $this->mTextform ) );
@@ -1953,7 +1953,7 @@
19541954 /**
19551955 * Is this a *valid* .css or .js subpage of a user page?
19561956 *
1957 - * @return \type{\bool}
 1957+ * @return Bool
19581958 * @deprecated
19591959 */
19601960 public function isValidCssJsSubpage() {
@@ -1974,7 +1974,7 @@
19751975 /**
19761976 * Is this a .css subpage of a user page?
19771977 *
1978 - * @return \type{\bool}
 1978+ * @return Bool
19791979 */
19801980 public function isCssSubpage() {
19811981 return ( NS_USER == $this->mNamespace && preg_match( "/\\/.*\\.css$/", $this->mTextform ) );
@@ -1983,7 +1983,7 @@
19841984 /**
19851985 * Is this a .js subpage of a user page?
19861986 *
1987 - * @return \type{\bool}
 1987+ * @return Bool
19881988 */
19891989 public function isJsSubpage() {
19901990 return ( NS_USER == $this->mNamespace && preg_match( "/\\/.*\\.js$/", $this->mTextform ) );
@@ -1993,7 +1993,7 @@
19941994 * Protect css subpages of user pages: can $wgUser edit
19951995 * this page?
19961996 *
1997 - * @return \type{\bool}
 1997+ * @return Bool
19981998 * @todo XXX: this might be better using restrictions
19991999 */
20002000 public function userCanEditCssSubpage() {
@@ -2006,7 +2006,7 @@
20072007 * Protect js subpages of user pages: can $wgUser edit
20082008 * this page?
20092009 *
2010 - * @return \type{\bool}
 2010+ * @return Bool
20112011 * @todo XXX: this might be better using restrictions
20122012 */
20132013 public function userCanEditJsSubpage() {
@@ -2018,7 +2018,7 @@
20192019 /**
20202020 * Cascading protection: Return true if cascading restrictions apply to this page, false if not.
20212021 *
2022 - * @return \type{\bool} If the page is subject to cascading restrictions.
 2022+ * @return Bool If the page is subject to cascading restrictions.
20232023 */
20242024 public function isCascadeProtected() {
20252025 list( $sources, /* $restrictions */ ) = $this->getCascadeProtectionSources( false );
@@ -2028,9 +2028,9 @@
20292029 /**
20302030 * Cascading protection: Get the source of any cascading restrictions on this page.
20312031 *
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
20332033 * 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
20352035 * objects of the pages from which cascading restrictions have come,
20362036 * false for none, or true if such restrictions exist, but $getPages was not set.
20372037 * The restriction array is an array of each type, each of which contains a
@@ -2141,7 +2141,7 @@
21422142 /**
21432143 * Loads a string into mRestrictions array
21442144 *
2145 - * @param $res \type{Resource} restrictions as an SQL result.
 2145+ * @param $res Resource restrictions as an SQL result.
21462146 * @param $oldFashionedRestrictions string comma-separated list of page
21472147 * restrictions from page table (pre 1.10)
21482148 */
@@ -2296,8 +2296,8 @@
22972297 /**
22982298 * Accessor/initialisation for mRestrictions
22992299 *
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
23022302 */
23032303 public function getRestrictions( $action ) {
23042304 if ( !$this->mRestrictionsLoaded ) {
@@ -2324,7 +2324,7 @@
23252325 /**
23262326 * Is there a version of this page in the deletion archive?
23272327 *
2328 - * @return \type{\int} the number of archived revisions
 2328+ * @return Int the number of archived revisions
23292329 */
23302330 public function isDeleted() {
23312331 if ( $this->getNamespace() < 0 ) {
@@ -2372,9 +2372,9 @@
23732373 * Get the article ID for this Title from the link cache,
23742374 * adding it if necessary
23752375 *
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
23772377 * for update
2378 - * @return \type{\int} the ID
 2378+ * @return Int the ID
23792379 */
23802380 public function getArticleID( $flags = 0 ) {
23812381 if ( $this->getNamespace() < 0 ) {
@@ -2398,8 +2398,8 @@
23992399 * Is this an article that is a redirect page?
24002400 * Uses link cache, adding it if necessary
24012401 *
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
24042404 */
24052405 public function isRedirect( $flags = 0 ) {
24062406 if ( !is_null( $this->mRedirect ) ) {
@@ -2419,8 +2419,8 @@
24202420 * What is the length of this page?
24212421 * Uses link cache, adding it if necessary
24222422 *
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
24252425 */
24262426 public function getLength( $flags = 0 ) {
24272427 if ( $this->mLength != -1 ) {
@@ -2439,8 +2439,8 @@
24402440 /**
24412441 * What is the page_latest field for this page?
24422442 *
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
24452445 */
24462446 public function getLatestRevID( $flags = 0 ) {
24472447 if ( $this->mLatestID !== false ) {
@@ -2464,7 +2464,7 @@
24652465 * loading of the new page_id. It's also called from
24662466 * Article::doDeleteArticle()
24672467 *
2468 - * @param $newid \type{\int} the new Article ID
 2468+ * @param $newid Int the new Article ID
24692469 */
24702470 public function resetArticleID( $newid ) {
24712471 $linkCache = LinkCache::singleton();
@@ -2485,7 +2485,7 @@
24862486 /**
24872487 * Updates page_touched for this page; called from LinksUpdate.php
24882488 *
2489 - * @return \type{\bool} true if the update succeded
 2489+ * @return Bool true if the update succeded
24902490 */
24912491 public function invalidateCache() {
24922492 if ( wfReadOnly() ) {
@@ -2506,8 +2506,8 @@
25072507 * Prefix some arbitrary text with the namespace or interwiki prefix
25082508 * of this object
25092509 *
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
25122512 * @private
25132513 */
25142514 /* private */ function prefix( $name ) {
@@ -2574,7 +2574,7 @@
25752575 * namespace prefixes, sets the other forms, and canonicalizes
25762576 * everything.
25772577 *
2578 - * @return \type{\bool} true on success
 2578+ * @return Bool true on success
25792579 */
25802580 private function secureAndSplit() {
25812581 global $wgContLang, $wgLocalInterwiki;
@@ -2786,7 +2786,7 @@
27872787 * Deprecated for public use, use Title::makeTitle() with fragment parameter.
27882788 * Still in active use privately.
27892789 *
2790 - * @param $fragment \type{\string} text
 2790+ * @param $fragment String text
27912791 */
27922792 public function setFragment( $fragment ) {
27932793 $this->mFragment = str_replace( '_', ' ', substr( $fragment, 1 ) );
@@ -2826,7 +2826,7 @@
28272827 * @param $options Array: may be FOR UPDATE
28282828 * @param $table String: table name
28292829 * @param $prefix String: fields prefix
2830 - * @return \type{\arrayof{Title}} the Title objects linking here
 2830+ * @return Array of Title objects linking here
28312831 */
28322832 public function getLinksTo( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) {
28332833 $linkCache = LinkCache::singleton();
@@ -2869,7 +2869,7 @@
28702870 * On heavily-used templates it will max out the memory.
28712871 *
28722872 * @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
28742874 */
28752875 public function getTemplateLinksTo( $options = array() ) {
28762876 return $this->getLinksTo( $options, 'templatelinks', 'tl' );
@@ -2879,7 +2879,7 @@
28802880 * Get an array of Title objects referring to non-existent articles linked from this page
28812881 *
28822882 * @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
28842884 */
28852885 public function getBrokenLinksFrom() {
28862886 if ( $this->getArticleId() == 0 ) {
@@ -2916,7 +2916,7 @@
29172917 * Get a list of URLs to purge from the Squid cache when this
29182918 * page changes
29192919 *
2920 - * @return \type{\arrayof{\string}} the URLs
 2920+ * @return Array of String the URLs
29212921 */
29222922 public function getSquidURLs() {
29232923 global $wgContLang;
@@ -2952,8 +2952,8 @@
29532953 /**
29542954 * Move this page without authentication
29552955 *
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
29582958 */
29592959 public function moveNoAuth( &$nt ) {
29602960 return $this->moveTo( $nt, false );
@@ -2963,11 +2963,11 @@
29642964 * Check whether a given move operation would be valid.
29652965 * Returns true if ok, or a getUserPermissionsErrors()-like array otherwise
29662966 *
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
29692969 * 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
29722972 */
29732973 public function isValidMoveOperation( &$nt, $auth = true, $reason = '' ) {
29742974 global $wgUser;
@@ -3070,13 +3070,13 @@
30713071 /**
30723072 * Move a title to a new location
30733073 *
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
30763076 * 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.
30793079 * 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
30813081 */
30823082 public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true ) {
30833083 global $wgContLang;
@@ -3210,10 +3210,10 @@
32113211 * Move page to a title which is either a redirect to the
32123212 * source page or nonexistent
32133213 *
3214 - * @param $nt \type{Title} the page to move to, which should
 3214+ * @param $nt Title the page to move to, which should
32153215 * 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
32183218 * redirect at the old title. Ignored if the user doesn't
32193219 * have the suppressredirect right
32203220 */
@@ -3414,7 +3414,7 @@
34153415 * Checks if this page is just a one-rev redirect.
34163416 * Adds lock, so don't use just for light purposes.
34173417 *
3418 - * @return \type{\bool}
 3418+ * @return Bool
34193419 */
34203420 public function isSingleRevRedirect() {
34213421 $dbw = wfGetDB( DB_MASTER );
@@ -3451,8 +3451,8 @@
34523452 * Checks if $this can be moved to a given Title
34533453 * - Selects for update, so don't call it unless you mean business
34543454 *
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
34573457 */
34583458 public function isValidMoveTarget( $nt ) {
34593459 # Is it an existing file?
@@ -3493,7 +3493,7 @@
34943494 /**
34953495 * Can this title be added to a user's watchlist?
34963496 *
3497 - * @return \type{\bool} TRUE or FALSE
 3497+ * @return Bool TRUE or FALSE
34983498 */
34993499 public function isWatchable() {
35003500 return !$this->isExternal() && MWNamespace::isWatchable( $this->getNamespace() );
@@ -3503,7 +3503,7 @@
35043504 * Get categories to which this Title belongs and return an array of
35053505 * categories' names.
35063506 *
3507 - * @return \type{\array} array an array of parents in the form:
 3507+ * @return Array of parents in the form:
35083508 * $parent => $currentarticle
35093509 */
35103510 public function getParentCategories() {
@@ -3534,8 +3534,8 @@
35353535 /**
35363536 * Get a tree of parent categories
35373537 *
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
35403540 */
35413541 public function getParentCategoryTree( $children = array() ) {
35423542 $stack = array();
@@ -3563,7 +3563,7 @@
35643564 * Get an associative array for selecting this title from
35653565 * the "page" table
35663566 *
3567 - * @return \type{\array} Selection array
 3567+ * @return Array Selection array
35683568 */
35693569 public function pageCond() {
35703570 if ( $this->mArticleID > 0 ) {
@@ -3577,8 +3577,8 @@
35783578 /**
35793579 * Get the revision ID of the previous revision
35803580 *
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
35833583 * @return \twotypes{\int,\bool} Old revision ID, or FALSE if none exists
35843584 */
35853585 public function getPreviousRevisionID( $revId, $flags = 0 ) {
@@ -3596,8 +3596,8 @@
35973597 /**
35983598 * Get the revision ID of the next revision
35993599 *
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
36023602 * @return \twotypes{\int,\bool} Next revision ID, or FALSE if none exists
36033603 */
36043604 public function getNextRevisionID( $revId, $flags = 0 ) {
@@ -3615,7 +3615,7 @@
36163616 /**
36173617 * Get the first revision of the page
36183618 *
3619 - * @param $flags \type{\int} Title::GAID_FOR_UPDATE
 3619+ * @param $flags Int Title::GAID_FOR_UPDATE
36203620 * @return Revision (or NULL if page doesn't exist)
36213621 */
36223622 public function getFirstRevision( $flags = 0 ) {
@@ -3667,9 +3667,9 @@
36683668 * Get the number of revisions between the given revision IDs.
36693669 * Used for diffs and other things that really need it.
36703670 *
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.
36743674 */
36753675 public function countRevisionsBetween( $old, $new ) {
36763676 $dbr = wfGetDB( DB_SLAVE );
@@ -3685,11 +3685,11 @@
36863686 * Get the number of authors between the given revision IDs.
36873687 * Used for diffs and other things that really need it.
36883688 *
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
36943694 */
36953695 public function countAuthorsBetween( $fromRevId, $toRevId, $limit, $flags = 0 ) {
36963696 $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
@@ -3707,8 +3707,8 @@
37083708 /**
37093709 * Compare with another title.
37103710 *
3711 - * @param $title \type{Title}
3712 - * @return \type{\bool} TRUE or FALSE
 3711+ * @param $title Title
 3712+ * @return Bool TRUE or FALSE
37133713 */
37143714 public function equals( Title $title ) {
37153715 // Note: === is necessary for proper matching of number-like titles.
@@ -3733,7 +3733,7 @@
37343734 /**
37353735 * Return a string representation of this title
37363736 *
3737 - * @return \type{\string} String representation of this title
 3737+ * @return String String representation of this title
37383738 */
37393739 public function __toString() {
37403740 return $this->getPrefixedText();
@@ -3746,7 +3746,7 @@
37473747 * If you want to know if a title can be meaningfully viewed, you should
37483748 * probably call the isKnown() method instead.
37493749 *
3750 - * @return \type{\bool}
 3750+ * @return Bool
37513751 */
37523752 public function exists() {
37533753 return $this->getArticleId() != 0;
@@ -3766,7 +3766,7 @@
37673767 * existing code, but we might want to add an optional parameter to skip
37683768 * it and any other expensive checks.)
37693769 *
3770 - * @return \type{\bool}
 3770+ * @return Bool
37713771 */
37723772 public function isAlwaysKnown() {
37733773 if ( $this->mInterwiki != '' ) {
@@ -3797,7 +3797,7 @@
37983798 * links to the title should be rendered as "bluelinks" (as opposed to
37993799 * "redlinks" to non-existent pages).
38003800 *
3801 - * @return \type{\bool}
 3801+ * @return Bool
38023802 */
38033803 public function isKnown() {
38043804 return $this->isAlwaysKnown() || $this->exists();
@@ -3829,7 +3829,7 @@
38303830 /**
38313831 * Is this in a namespace that allows actual pages?
38323832 *
3833 - * @return \type{\bool}
 3833+ * @return Bool
38343834 * @internal note -- uses hardcoded namespace index instead of constants
38353835 */
38363836 public function canExist() {
@@ -3855,7 +3855,7 @@
38563856 * Get the last touched timestamp
38573857 *
38583858 * @param $db DatabaseBase: optional db
3859 - * @return \type{\string} Last touched timestamp
 3859+ * @return String Last touched timestamp
38603860 */
38613861 public function getTouched( $db = null ) {
38623862 $db = isset( $db ) ? $db : wfGetDB( DB_SLAVE );
@@ -3902,7 +3902,7 @@
39033903 /**
39043904 * Get the trackback URL for this page
39053905 *
3906 - * @return \type{\string} Trackback URL
 3906+ * @return String Trackback URL
39073907 */
39083908 public function trackbackURL() {
39093909 global $wgScriptPath, $wgServer, $wgScriptExtension;
@@ -3914,7 +3914,7 @@
39153915 /**
39163916 * Get the trackback RDF for this page
39173917 *
3918 - * @return \type{\string} Trackback RDF
 3918+ * @return String Trackback RDF
39193919 */
39203920 public function trackbackRDF() {
39213921 $url = htmlspecialchars( $this->getFullURL() );
@@ -3943,7 +3943,7 @@
39443944 * Generate strings used for xml 'id' names in monobook tabs
39453945 *
39463946 * @param $prepend string defaults to 'nstab-'
3947 - * @return \type{\string} XML 'id' name
 3947+ * @return String XML 'id' name
39483948 */
39493949 public function getNamespaceKey( $prepend = 'nstab-' ) {
39503950 global $wgContLang;
@@ -3982,7 +3982,7 @@
39833983 /**
39843984 * Returns true if this title resolves to the named special page
39853985 *
3986 - * @param $name \type{\string} The special page name
 3986+ * @param $name String The special page name
39873987 * @return boolean
39883988 */
39893989 public function isSpecial( $name ) {
@@ -3998,7 +3998,7 @@
39993999 /**
40004000 * If the Title refers to a special page alias which is not the local default,
40014001 *
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.
40034003 * Otherwise, returns $this.
40044004 */
40054005 public function fixSpecialName() {
@@ -4028,9 +4028,9 @@
40294029 /**
40304030 * Get all extant redirects to this Title
40314031 *
4032 - * @param $ns \twotypes{\int,\null} Single namespace to consider;
 4032+ * @param $ns Int|Null Single namespace to consider;
40334033 * NULL to consider all namespaces
4034 - * @return \type{\arrayof{Title}} Redirects to this title
 4034+ * @return Array of Title redirects to this title
40354035 */
40364036 public function getRedirectsHere( $ns = null ) {
40374037 $redirs = array();
@@ -4061,7 +4061,7 @@
40624062 /**
40634063 * Check if this Title is a valid redirect target
40644064 *
4065 - * @return \type{\bool}
 4065+ * @return Bool
40664066 */
40674067 public function isValidRedirectTarget() {
40684068 global $wgInvalidRedirectTargets;

Follow-up revisions

RevisionCommit summaryAuthorDate
r81380Follow-up r79682: more documentation tidyinghappy-melon11:00, 2 February 2011

Comments

#Comment by Nikerabbit (talk | contribs)   23:45, 5 January 2011

Is \þype really verboten?

* @param $ids Array of Int Array of IDs is barely readable both in the code and in the documentation!

#Comment by Happy-melon (talk | contribs)   15:42, 26 January 2011

\type Just Doesn't Work (TM) in doxygen, which is effectively 'weakly typed'; it's intended to be more free-flowing and less overtly marked-up. So I agree that there's scope for making the comments read more clearly; indeed that's what these changes are all about. But I hope you're not going to hold this rev on fixme until we fix bug 1... :P

#Comment by Nikerabbit (talk | contribs)   21:10, 27 January 2011

It works quite well, it's just wrapper for having <b> in the output anyway.

The reason I marked this as fixme is that this is less readable than what we had before:

-	 * @param $ids \type{\arrayof{\int}} Array of IDs
+	 * @param $ids Array of Int Array of IDs
#Comment by Happy-melon (talk | contribs)   23:51, 27 January 2011

The joys of automated find-and-replace... :D

#Comment by Happy-melon (talk | contribs)   11:01, 2 February 2011

I've been through and cleaned up wording in r81380.

Status & tagging log