From 58136809524b505b0b8f3c5bb54814d6c61956ae Mon Sep 17 00:00:00 2001 From: Reedy Date: Tue, 1 May 2012 22:03:50 +0100 Subject: [PATCH] Few documentation/type hint updates Change-Id: Ib2882cc03540403f74f68854fa76df375c1bb25a --- includes/Title.php | 14 +++++++++++--- includes/WikiPage.php | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 6764f8f8d1..d26f71c10d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -83,6 +83,7 @@ class Title { var $mRedirect = null; // /< Is the article at this title a redirect? var $mNotificationTimestamp = array(); // /< Associative array of user ID -> timestamp/false var $mBacklinkCache = null; // /< Cache of links to this title + var $mHasSubpage; // /< Whether a page has any subpages // @} @@ -119,7 +120,8 @@ class Title { * fied by a prefix. If you want to force a specific namespace even if * $text might begin with a namespace prefix, use makeTitle() or * makeTitleSafe(). - * @return Title, or null on an error. + * @throws MWException + * @return Title|null - Title or null on an error. */ public static function newFromText( $text, $defaultNamespace = NS_MAIN ) { if ( is_object( $text ) ) { @@ -858,6 +860,7 @@ class Title { * This is MUCH simpler than individually testing for equivilance * against both NS_USER and NS_USER_TALK, and is also forward compatible. * @since 1.19 + * @param $ns int * @return bool */ public function hasSubjectNamespace( $ns ) { @@ -1222,6 +1225,8 @@ class Title { * andthe wfArrayToCGI moved to getLocalURL(); * * @since 1.19 (r105919) + * @param $query + * @param $query2 bool * @return String */ private static function fixUrlQueryArgs( $query, $query2 = false ) { @@ -1404,6 +1409,8 @@ class Title { * See getLocalURL for the arguments. * * @see self::getLocalURL + * @param $query string + * @param $query2 bool|string * @return String the URL */ public function escapeLocalURL( $query = '', $query2 = false ) { @@ -2468,8 +2475,9 @@ class Title { /** * Get the expiry time for the restriction against a given action * + * @param $action * @return String|Bool 14-char timestamp, or 'infinity' if the page is protected forever - * or not protected at all, or false if the action is not recognised. + * or not protected at all, or false if the action is not recognised. */ public function getRestrictionExpiry( $action ) { if ( !$this->mRestrictionsLoaded ) { @@ -4467,7 +4475,7 @@ class Title { * $wgLang (such as special pages, which are in the user language). * * @since 1.18 - * @return object Language + * @return Language */ public function getPageLanguage() { global $wgLang; diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 2678f54328..42ba690691 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1718,7 +1718,7 @@ class WikiPage extends Page { * @param &$cascade Integer. Set to false if cascading protection isn't allowed. * @param $expiry Array: per restriction type expiration * @param $user User The user updating the restrictions - * @return bool true on success + * @return Status */ public function doUpdateRestrictions( array $limit, array $expiry, &$cascade, $reason, User $user ) { global $wgContLang; -- 2.20.1