From: Reedy Date: Wed, 6 Mar 2013 01:17:31 +0000 (+0000) Subject: Few minor parameter type hints in documentation X-Git-Tag: 1.31.0-rc.0~20446^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=7a2bc6d480526ba54b6c0f148b6b7bc57052e164;p=lhc%2Fweb%2Fwiklou.git Few minor parameter type hints in documentation Change-Id: Ibcaad4427375b9aa39bb2b333b72a0beb9a3620c --- diff --git a/includes/Revision.php b/includes/Revision.php index df1e43e94a..83c3c6e02c 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -1095,7 +1095,7 @@ class Revision implements IDBAccessObject { /** * Get previous revision for this title * - * @return Revision or null + * @return Revision|null */ public function getPrevious() { if( $this->getTitle() ) { diff --git a/includes/User.php b/includes/User.php index 6a95a8fa87..e3c11ccb56 100644 --- a/includes/User.php +++ b/includes/User.php @@ -857,7 +857,7 @@ class User { * @note This no longer clears uncached lazy-initialised properties; * the constructor does that instead. * - * @param $name string + * @param $name string|bool */ public function loadDefaults( $name = false ) { wfProfileIn( __METHOD__ ); @@ -2069,7 +2069,7 @@ class User { /** * Get the user's current token. - * @param $forceCreation Force the generation of a new token if the user doesn't have one (default=true for backwards compatibility) + * @param $forceCreation bool Force the generation of a new token if the user doesn't have one (default=true for backwards compatibility) * @return String Token */ public function getToken( $forceCreation = true ) { @@ -2980,7 +2980,7 @@ class User { * * @param $request WebRequest object to use; $wgRequest will be used if null * is passed. - * @param $secure Whether to force secure/insecure cookies or use default + * @param $secure bool Whether to force secure/insecure cookies or use default */ public function setCookies( $request = null, $secure = null ) { if ( $request === null ) { @@ -2988,7 +2988,9 @@ class User { } $this->load(); - if ( 0 == $this->mId ) return; + if ( 0 == $this->mId ) { + return; + } if ( !$this->mToken ) { // When token is empty or NULL generate a new one and then save it to the database // This allows a wiki to re-secure itself after a leak of it's user table or $wgSecretKey @@ -3510,11 +3512,10 @@ class User { /** * Generate a looking random token for various uses. * - * @param $salt String Optional salt value * @return String The new random token * @deprecated since 1.20; Use MWCryptRand for secure purposes or wfRandomString for pesudo-randomness */ - public static function generateToken( $salt = '' ) { + public static function generateToken() { return MWCryptRand::generateHex( 32 ); } @@ -4322,7 +4323,7 @@ class User { /** * Load the user options either from cache, the database or an array * - * @param $data Rows for the current user out of the user_properties table + * @param $data array Rows for the current user out of the user_properties table */ protected function loadOptions( $data = null ) { global $wgContLang;