jenkins-bot has submitted this change and it was merged. Change subject: Fixed some @params documentation (includes/[Article|Pref|Skin].php) ......................................................................
Fixed some @params documentation (includes/[Article|Pref|Skin].php) Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Change-Id: I6627ba0e76d3577c40bf2473e0f78a5ad7368634 --- M includes/Article.php M includes/Preferences.php M includes/Skin.php 3 files changed, 213 insertions(+), 214 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Article.php b/includes/Article.php index 5ebeb60..1537ea6 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -116,8 +116,8 @@ /** * Constructor and clear the article - * @param $title Title Reference to a Title object. - * @param $oldId Integer revision ID, null to fetch from request, zero for current + * @param Title $title Reference to a Title object. + * @param int $oldId Revision ID, null to fetch from request, zero for current */ public function __construct( Title $title, $oldId = null ) { $this->mOldId = $oldId; @@ -125,7 +125,7 @@ } /** - * @param $title Title + * @param Title $title * @return WikiPage */ protected function newPage( Title $title ) { @@ -134,7 +134,7 @@ /** * Constructor from a page id - * @param int $id article ID to load + * @param int $id Article ID to load * @return Article|null */ public static function newFromID( $id ) { @@ -147,9 +147,9 @@ /** * Create an Article object of the appropriate class for the given page. * - * @param $title Title - * @param $context IContextSource - * @return Article object + * @param Title $title + * @param IContextSource $context + * @return Article */ public static function newFromTitle( $title, IContextSource $context ) { if ( NS_MEDIA == $title->getNamespace() ) { @@ -179,9 +179,9 @@ /** * Create an Article object of the appropriate class for the given page. * - * @param $page WikiPage - * @param $context IContextSource - * @return Article object + * @param WikiPage $page + * @param IContextSource $context + * @return Article */ public static function newFromWikiPage( WikiPage $page, IContextSource $context ) { $article = self::newFromTitle( $page->getTitle(), $context ); @@ -192,7 +192,7 @@ /** * Tell the page view functions that this view was redirected * from another page on the wiki. - * @param $from Title object. + * @param Title $from */ public function setRedirectedFrom( Title $from ) { $this->mRedirectedFrom = $from; @@ -201,7 +201,7 @@ /** * Get the title object of the article * - * @return Title object of this page + * @return Title Title object of this page */ public function getTitle() { return $this->mPage->getTitle(); @@ -290,8 +290,7 @@ } /** - * @return int The oldid of the article that is to be shown, 0 for the - * current revision + * @return int The oldid of the article that is to be shown, 0 for the current revision */ public function getOldID() { if ( is_null( $this->mOldId ) ) { @@ -373,7 +372,7 @@ * uses this method to retrieve page text from the database, so the function * has to remain public for now. * - * @return mixed string containing article contents, or false if null + * @return string|bool string containing article contents, or false if null * @deprecated since 1.21, use WikiPage::getContent() instead */ function fetchContent() { #BC cruft! @@ -404,7 +403,7 @@ * @note Code that wants to retrieve page content from the database should * use WikiPage::getContent(). * - * @return Content|null|boolean false + * @return Content|null|bool * * @since 1.21 */ @@ -499,7 +498,7 @@ /** * Use this to fetch the rev ID used on page views * - * @return int revision ID of last article revision + * @return int Revision ID of last article revision */ public function getRevIdFetched() { if ( $this->mRevIdFetched ) { @@ -769,7 +768,7 @@ /** * Adjust title for pages with displaytitle, -{T|}- or language conversion - * @param $pOutput ParserOutput + * @param ParserOutput $pOutput */ public function adjustDisplayTitle( ParserOutput $pOutput ) { # Adjust the title if it was set by displaytitle, -{T|}- or language conversion @@ -831,7 +830,7 @@ * This is hooked by SyntaxHighlight_GeSHi to do syntax highlighting of these * page views. * - * @param bool $showCacheHint whether to show a message telling the user + * @param bool $showCacheHint Whether to show a message telling the user * to clear the browser cache (default: true). */ protected function showCssOrJsPage( $showCacheHint = true ) { @@ -863,9 +862,9 @@ /** * Get the robot policy to be used for the current view - * @param string $action the action= GET parameter - * @param $pOutput ParserOutput|null - * @return Array the policy that should be set + * @param string $action The action= GET parameter + * @param ParserOutput|null $pOutput + * @return array The policy that should be set * TODO: actions other than 'view' */ public function getRobotPolicy( $action, $pOutput = null ) { @@ -944,9 +943,9 @@ /** * Converts a String robot policy into an associative array, to allow * merging of several policies using array_merge(). - * @param $policy Mixed, returns empty array on null/false/'', transparent + * @param array|string $policy Returns empty array on null/false/'', transparent * to already-converted arrays, converts String. - * @return Array: 'index' => \<indexpolicy\>, 'follow' => \<followpolicy\> + * @return array 'index' => \<indexpolicy\>, 'follow' => \<followpolicy\> */ public static function formatRobotPolicy( $policy ) { if ( is_array( $policy ) ) { @@ -975,7 +974,7 @@ * the output. Returns true if the header was needed, false if this is not * a redirect view. Handles both local and remote redirects. * - * @return boolean + * @return bool */ public function showRedirectedFromHeader() { global $wgRedirectSources; @@ -1277,7 +1276,7 @@ * If the revision requested for view is deleted, check permissions. * Send either an error message or a warning header to the output. * - * @return boolean true if the view is allowed, false if not. + * @return bool true if the view is allowed, false if not. */ public function showDeletedRevisionHeader() { if ( !$this->mRevision->isDeleted( Revision::DELETED_TEXT ) ) { @@ -1320,7 +1319,7 @@ * Revision as of \<date\>; view current revision * \<- Previous version | Next Version -\> * - * @param int $oldid revision ID of this article revision + * @param int $oldid Revision ID of this article revision */ public function setOldSubtitle( $oldid = 0 ) { if ( !wfRunHooks( 'DisplayOldSubtitle', array( &$this, &$oldid ) ) ) { @@ -1445,10 +1444,10 @@ * Chances are you should just be using the ParserOutput from * WikitextContent::getParserOutput instead of calling this for redirects. * - * @param $target Title|Array of destination(s) to redirect - * @param $appendSubtitle Boolean [optional] - * @param $forceKnown Boolean: should the image be shown as a bluelink regardless of existence? - * @return string containing HMTL with redirect link + * @param Title|array $target Destination(s) to redirect + * @param bool $appendSubtitle [optional] + * @param bool $forceKnown Should the image be shown as a bluelink regardless of existence? + * @return string Containing HMTL with redirect link */ public function viewRedirect( $target, $appendSubtitle = true, $forceKnown = false ) { $lang = $this->getTitle()->getPageLanguage(); @@ -1467,9 +1466,9 @@ * * @since 1.23 * @param Language $lang - * @param Title|array $target destination(s) to redirect + * @param Title|array $target Destination(s) to redirect * @param bool $forceKnown Should the image be shown as a bluelink regardless of existence? - * @return string containing HMTL with redirect link + * @return string Containing HMTL with redirect link */ public static function getRedirectHeaderHtml( Language $lang, $target, $forceKnown = false ) { global $wgStylePath; @@ -1658,7 +1657,7 @@ /** * Output deletion confirmation dialog * @todo FIXME: Move to another file? - * @param string $reason prefilled reason + * @param string $reason Prefilled reason */ public function confirmDelete( $reason ) { wfDebug( "Article::confirmDelete\n" ); @@ -1826,7 +1825,7 @@ * output to the client that is necessary for this request. * (that is, it has sent a cached version of the page) * - * @return boolean true if cached version send, false otherwise + * @return bool true if cached version send, false otherwise */ protected function tryFileCache() { static $called = false; @@ -1882,9 +1881,9 @@ * * @since 1.16 (r52326) for LiquidThreads * - * @param $oldid mixed integer Revision ID or null - * @param $user User The relevant user - * @return ParserOutput or false if the given revision ID is not found + * @param int|null $oldid Revision ID or null + * @param User $user The relevant user + * @return ParserOutput|bool ParserOutput or false if the given revision ID is not found */ public function getParserOutput( $oldid = null, User $user = null ) { //XXX: bypasses mParserOptions and thus setParserOptions() @@ -1928,7 +1927,7 @@ /** * Sets the context this Article is executed in * - * @param $context IContextSource + * @param IContextSource $context * @since 1.18 */ public function setContext( $context ) { @@ -2006,7 +2005,7 @@ * raw WikiPage fields for backwards compatibility. * * @param string $fname Field name - * @param $fvalue mixed New value + * @param mixed $fvalue New value */ public function __set( $fname, $fvalue ) { if ( property_exists( $this->mPage, $fname ) ) { @@ -2039,11 +2038,11 @@ // ****** B/C functions to work-around PHP silliness with __call and references ****** // /** - * @param $limit array - * @param $expiry array - * @param $cascade bool - * @param $reason string - * @param $user User + * @param array $limit + * @param array $expiry + * @param bool $cascade + * @param string $reason + * @param User $user * @return Status */ public function doUpdateRestrictions( array $limit, array $expiry, &$cascade, @@ -2053,10 +2052,10 @@ } /** - * @param $limit array - * @param $reason string - * @param $cascade int - * @param $expiry array + * @param array $limit + * @param string $reason + * @param int $cascade + * @param array $expiry * @return bool */ public function updateRestrictions( $limit = array(), $reason = '', @@ -2072,11 +2071,11 @@ } /** - * @param $reason string - * @param $suppress bool - * @param $id int - * @param $commit bool - * @param $error string + * @param string $reason + * @param bool $suppress + * @param int $id + * @param bool $commit + * @param string $error * @return bool */ public function doDeleteArticle( $reason, $suppress = false, $id = 0, @@ -2086,12 +2085,12 @@ } /** - * @param $fromP - * @param $summary - * @param $token - * @param $bot - * @param $resultDetails - * @param $user User + * @param string $fromP + * @param string $summary + * @param string $token + * @param bool $bot + * @param array $resultDetails + * @param User|null $user * @return array */ public function doRollback( $fromP, $summary, $token, $bot, &$resultDetails, User $user = null ) { @@ -2100,11 +2099,11 @@ } /** - * @param $fromP - * @param $summary - * @param $bot - * @param $resultDetails - * @param $guser User + * @param string $fromP + * @param string $summary + * @param bool $bot + * @param array $resultDetails + * @param User|null $guser * @return array */ public function commitRollback( $fromP, $summary, $bot, &$resultDetails, User $guser = null ) { @@ -2113,7 +2112,7 @@ } /** - * @param $hasHistory bool + * @param bool $hasHistory * @return mixed */ public function generateReason( &$hasHistory ) { @@ -2132,30 +2131,30 @@ } /** - * @param $title Title + * @param Title $title */ public static function onArticleCreate( $title ) { WikiPage::onArticleCreate( $title ); } /** - * @param $title Title + * @param Title $title */ public static function onArticleDelete( $title ) { WikiPage::onArticleDelete( $title ); } /** - * @param $title Title + * @param Title $title */ public static function onArticleEdit( $title ) { WikiPage::onArticleEdit( $title ); } /** - * @param $oldtext - * @param $newtext - * @param $flags + * @param string $oldtext + * @param string $newtext + * @param int $flags * @return string * @deprecated since 1.21, use ContentHandler::getAutosummary() instead */ diff --git a/includes/Preferences.php b/includes/Preferences.php index 4b91386..493626a 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -71,8 +71,8 @@ /** * @throws MWException - * @param $user User - * @param $context IContextSource + * @param User $user + * @param IContextSource $context * @return array|null */ static function getPreferences( $user, IContextSource $context ) { @@ -143,10 +143,10 @@ /** * Pull option from a user account. Handles stuff like array-type preferences. * - * @param $name - * @param $info - * @param $user User - * @return array|String + * @param string $name + * @param array $info + * @param User $user + * @return array|string */ static function getOptionFromUser( $name, $info, $user ) { $val = $user->getOption( $name ); @@ -186,9 +186,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences * @return void */ static function profilePreferences( $user, IContextSource $context, &$defaultPreferences ) { @@ -562,9 +562,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences * @return void */ static function skinPreferences( $user, IContextSource $context, &$defaultPreferences ) { @@ -606,9 +606,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences Array + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences */ static function filesPreferences( $user, IContextSource $context, &$defaultPreferences ) { ## Files ##################################### @@ -627,9 +627,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences * @return void */ static function datetimePreferences( $user, IContextSource $context, &$defaultPreferences ) { @@ -700,9 +700,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences Array + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences */ static function renderingPreferences( $user, IContextSource $context, &$defaultPreferences ) { ## Diffs #################################### @@ -760,9 +760,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences Array + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences */ static function editingPreferences( $user, IContextSource $context, &$defaultPreferences ) { global $wgAllowUserCssPrefs; @@ -848,9 +848,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences Array + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences */ static function rcPreferences( $user, IContextSource $context, &$defaultPreferences ) { global $wgRCMaxAge, $wgRCShowWatchingUsers; @@ -905,9 +905,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences */ static function watchlistPreferences( $user, IContextSource $context, &$defaultPreferences ) { global $wgUseRCPatrol, $wgEnableAPI, $wgRCMaxAge; @@ -1009,9 +1009,9 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $defaultPreferences Array + * @param User $user + * @param IContextSource $context + * @param array $defaultPreferences */ static function searchPreferences( $user, IContextSource $context, &$defaultPreferences ) { global $wgContLang; @@ -1046,9 +1046,9 @@ } /** - * @param $user User The User object - * @param $context IContextSource - * @return Array: text/links to display as key; $skinkey as value + * @param User $user The User object + * @param IContextSource $context + * @return array Text/links to display as key; $skinkey as value */ static function generateSkinOptions( $user, IContextSource $context ) { global $wgDefaultSkin, $wgAllowUserCss, $wgAllowUserJs; @@ -1104,7 +1104,7 @@ } /** - * @param $context IContextSource + * @param IContextSource $context * @return array */ static function getDateOptions( IContextSource $context ) { @@ -1139,7 +1139,7 @@ } /** - * @param $context IContextSource + * @param IContextSource $context * @return array */ static function getImageSizes( IContextSource $context ) { @@ -1157,7 +1157,7 @@ } /** - * @param $context IContextSource + * @param IContextSource $context * @return array */ static function getThumbSizes( IContextSource $context ) { @@ -1175,9 +1175,9 @@ } /** - * @param $signature string - * @param $alldata array - * @param $form HTMLForm + * @param string $signature + * @param array $alldata + * @param HTMLForm $form * @return bool|string */ static function validateSignature( $signature, $alldata, $form ) { @@ -1200,9 +1200,9 @@ } /** - * @param $signature string - * @param $alldata array - * @param $form HTMLForm + * @param string $signature + * @param array $alldata + * @param HTMLForm $form * @return string */ static function cleanSignature( $signature, $alldata, $form ) { @@ -1218,10 +1218,10 @@ } /** - * @param $user User - * @param $context IContextSource - * @param $formClass string - * @param array $remove array of items to remove + * @param User $user + * @param IContextSource $context + * @param string $formClass + * @param array $remove Array of items to remove * @return HtmlForm */ static function getFormObject( @@ -1260,7 +1260,7 @@ } /** - * @param $context IContextSource + * @param IContextSource $context * @return array */ static function getTimezoneOptions( IContextSource $context ) { @@ -1334,8 +1334,8 @@ } /** - * @param $value - * @param $alldata + * @param string $value + * @param array $alldata * @return int */ static function filterIntval( $value, $alldata ) { @@ -1343,8 +1343,8 @@ } /** - * @param $tz - * @param $alldata + * @param string $tz + * @param array $alldata * @return string */ static function filterTimezoneInput( $tz, $alldata ) { @@ -1377,8 +1377,8 @@ /** * Handle the form submission if everything validated properly * - * @param $formData - * @param $form PreferencesForm + * @param array $formData + * @param PreferencesForm $form * @return bool|Status|string */ static function tryFormSubmit( $formData, $form ) { @@ -1437,8 +1437,8 @@ } /** - * @param $formData - * @param $form PreferencesForm + * @param array $formData + * @param PreferencesForm $form * @return Status */ public static function tryUISubmit( $formData, $form ) { @@ -1468,9 +1468,9 @@ * right. * * @deprecated since 1.20; use User::setEmailWithConfirmation() instead. - * @param $user User + * @param User $user * @param string $newaddr New email address - * @return Array (true on success or Status on failure, info string) + * @return array (true on success or Status on failure, info string) */ public static function trySetUserEmail( User $user, $newaddr ) { wfDeprecated( __METHOD__, '1.20' ); @@ -1485,7 +1485,7 @@ /** * @deprecated since 1.19 - * @param $user User + * @param User $user * @return array */ public static function loadOldSearchNs( $user ) { @@ -1513,7 +1513,7 @@ private $modifiedUser; /** - * @param $user User + * @param User $user */ public function setModifiedUser( $user ) { $this->modifiedUser = $user; @@ -1541,8 +1541,8 @@ } /** - * @param $html string - * @return String + * @param string $html + * @return string */ function wrapForm( $html ) { $html = Xml::tags( 'div', array( 'id' => 'preferences' ), $html ); @@ -1551,7 +1551,7 @@ } /** - * @return String + * @return string */ function getButtons() { if ( !$this->getModifiedUser()->isAllowedAny( 'editmyprivateinfo', 'editmyoptions' ) ) { @@ -1574,7 +1574,7 @@ /** * Separate multi-option preferences into multiple preferences, since we * have to store them separately - * @param $data array + * @param array $data * @return array */ function filterDataForSubmit( $data ) { @@ -1603,7 +1603,7 @@ /** * Get the "<legend>" for a given section key. Normally this is the * prefs-$key message but we'll allow extensions to override it. - * @param $key string + * @param string $key * @return string */ function getLegend( $key ) { diff --git a/includes/Skin.php b/includes/Skin.php index 59c2242..f63d4d2 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -39,7 +39,7 @@ /** * Fetch the set of available skins. - * @return array associative array of strings + * @return array Associative array of strings */ static function getSkinNames() { global $wgValidSkinNames; @@ -77,7 +77,7 @@ /** * Fetch the skinname messages for available skins. - * @return array of strings + * @return string[] */ static function getSkinNameMessages() { $messages = array(); @@ -193,14 +193,14 @@ } /** - * @return string skin name + * @return string Skin name */ public function getSkinName() { return $this->skinname; } /** - * @param $out OutputPage + * @param OutputPage $out */ function initPage( OutputPage $out ) { wfProfileIn( __METHOD__ ); @@ -214,7 +214,7 @@ * Defines the ResourceLoader modules that should be added to the skin * It is recommended that skins wishing to override call parent::getDefaultModules() * and substitute out any modules they wish to change by using a key to look them up - * @return Array of modules with helper keys for easy overriding + * @return array Array of modules with helper keys for easy overriding */ public function getDefaultModules() { global $wgIncludeLegacyJavaScript, $wgPreloadJavaScriptMwUtil, $wgUseAjax, @@ -296,7 +296,7 @@ /** * Get the current revision ID * - * @return Integer + * @return int */ public function getRevisionId() { return $this->getOutput()->getRevisionId(); @@ -305,7 +305,7 @@ /** * Whether the revision displayed is the latest revision of the page * - * @return Boolean + * @return bool */ public function isRevisionCurrent() { $revID = $this->getRevisionId(); @@ -315,7 +315,7 @@ /** * Set the "relevant" title * @see self::getRelevantTitle() - * @param $t Title object to use + * @param Title $t Title object to use */ public function setRelevantTitle( $t ) { $this->mRelevantTitle = $t; @@ -341,7 +341,7 @@ /** * Set the "relevant" user * @see self::getRelevantUser() - * @param $u User object to use + * @param User $u User object to use */ public function setRelevantUser( $u ) { $this->mRelevantUser = $u; @@ -377,12 +377,12 @@ /** * Outputs the HTML generated by other functions. - * @param $out OutputPage + * @param OutputPage $out */ abstract function outputPage( OutputPage $out = null ); /** - * @param $data array + * @param array $data * @return string */ static function makeVariablesScript( $data ) { @@ -399,7 +399,7 @@ * Make a "<script>" tag containing global variables * * @deprecated since 1.19 - * @param $unused + * @param mixed $unused * @return string HTML fragment */ public static function makeGlobalVariablesScript( $unused ) { @@ -432,15 +432,15 @@ * Calling this method with an $out of anything but the same OutputPage * inside ->getOutput() is deprecated. The $out arg is kept * for compatibility purposes with skins. - * @param $out OutputPage + * @param OutputPage $out * @todo delete */ abstract function setupSkinUserCss( OutputPage $out ); /** * TODO: document - * @param $title Title - * @return String + * @param Title $title + * @return string */ function getPageClasses( $title ) { $numeric = 'ns-' . $title->getNamespace(); @@ -482,8 +482,8 @@ * This will be called by OutputPage::headElement when it is creating the * "<body>" tag, skins can override it if they have a need to add in any * body attributes or classes of their own. - * @param $out OutputPage - * @param $bodyAttrs Array + * @param OutputPage $out + * @param array $bodyAttrs */ function addToBodyAttributes( $out, &$bodyAttrs ) { // does nothing by default @@ -491,7 +491,7 @@ /** * URL to the logo - * @return String + * @return string */ function getLogo() { global $wgLogo; @@ -565,8 +565,8 @@ /** * Render the array as a series of links. - * @param array $tree categories tree returned by Title::getParentCategoryTree - * @return String separated by >, terminate with "\n" + * @param array $tree Categories tree returned by Title::getParentCategoryTree + * @return string Separated by >, terminate with "\n" */ function drawCategoryBrowser( $tree ) { $return = ''; @@ -622,7 +622,7 @@ * The output of this function gets processed in SkinTemplate::outputPage() for * the SkinTemplate based skins, all other skins should directly echo it. * - * @return String, empty by default, if not changed by any hook function. + * @return string Empty by default, if not changed by any hook function. */ protected function afterContentHook() { $data = ''; @@ -648,7 +648,7 @@ /** * Generate debug data HTML for displaying at the bottom of the main content * area. - * @return String HTML containing debug data, if enabled (otherwise empty). + * @return string HTML containing debug data, if enabled (otherwise empty). */ protected function generateDebugHTML() { return MWDebug::getHTMLDebugLog(); @@ -657,7 +657,7 @@ /** * This gets called shortly before the "</body>" tag. * - * @return String HTML-wrapped JS code to be put before "</body>" + * @return string HTML-wrapped JS code to be put before "</body>" */ function bottomScripts() { // TODO and the suckage continues. This function is really just a wrapper around @@ -687,7 +687,7 @@ } /** - * @return String + * @return string */ function getUndeleteLink() { $action = $this->getRequest()->getVal( 'action', 'view' ); @@ -769,7 +769,7 @@ /** * Returns true if the IP should be shown in the header - * @return Bool + * @return bool */ function showIPinHeader() { global $wgShowIPinHeader; @@ -777,7 +777,7 @@ } /** - * @return String + * @return string */ function getSearchLink() { $searchPage = SpecialPage::getTitleFor( 'Search' ); @@ -792,7 +792,7 @@ } /** - * @param $type string + * @param string $type * @return string */ function getCopyright( $type = 'detect' ) { @@ -886,7 +886,7 @@ /** * Get the timestamp of the latest revision, formatted in user language * - * @return String + * @return string */ protected function lastModified() { $timestamp = $this->getOutput()->getRevisionTimestamp(); @@ -912,7 +912,7 @@ } /** - * @param $align string + * @param string $align * @return string */ function logoText( $align = '' ) { @@ -935,8 +935,8 @@ /** * Renders a $wgFooterIcons icon according to the method's arguments * @param array $icon The icon to build the html for, see $wgFooterIcons for the format of this array - * @param bool|String $withImage Whether to use the icon's image or output a text-only footericon - * @return String HTML + * @param bool|string $withImage Whether to use the icon's image or output a text-only footericon + * @return string HTML */ function makeFooterIcon( $icon, $withImage = 'withImage' ) { if ( is_string( $icon ) ) { @@ -995,7 +995,7 @@ /** * Gets the link to the wiki's privacy policy page. - * @return String HTML + * @return string HTML */ function privacyLink() { return $this->footerLink( 'privacy', 'privacypage' ); @@ -1003,7 +1003,7 @@ /** * Gets the link to the wiki's about page. - * @return String HTML + * @return string HTML */ function aboutLink() { return $this->footerLink( 'aboutsite', 'aboutpage' ); @@ -1011,7 +1011,7 @@ /** * Gets the link to the wiki's general disclaimers page. - * @return String HTML + * @return string HTML */ function disclaimerLink() { return $this->footerLink( 'disclaimers', 'disclaimerpage' ); @@ -1035,7 +1035,7 @@ } /** - * @param $id User|int + * @param User|int $id * @return bool */ function showEmailUser( $id ) { @@ -1053,7 +1053,7 @@ * This method returns a url resolved using the configured skin style path * and includes the style version inside of the url. * @param string $name The name or path of a skin resource file - * @return String The fully resolved style path url including styleversion + * @return string The fully resolved style path url including styleversion */ function getCommonStylePath( $name ) { global $wgStylePath, $wgStyleVersion; @@ -1065,7 +1065,7 @@ * This method returns a url resolved using the configured skin style path * and includes the style version inside of the url. * @param string $name The name or path of a skin resource file - * @return String The fully resolved style path url including styleversion + * @return string The fully resolved style path url including styleversion */ function getSkinStylePath( $name ) { global $wgStylePath, $wgStyleVersion; @@ -1075,8 +1075,8 @@ /* these are used extensively in SkinTemplate, but also some other places */ /** - * @param $urlaction string - * @return String + * @param string $urlaction + * @return string */ static function makeMainPageUrl( $urlaction = '' ) { $title = Title::newMainPage(); @@ -1093,8 +1093,8 @@ * * @param string $name Name of the Special page * @param string $urlaction Query to append - * @param $proto Protocol to use or null for a local URL - * @return String + * @param string|null $proto Protocol to use or null for a local URL + * @return string */ static function makeSpecialUrl( $name, $urlaction = '', $proto = null ) { $title = SpecialPage::getSafeTitleFor( $name ); @@ -1106,10 +1106,10 @@ } /** - * @param $name string - * @param $subpage string - * @param $urlaction string - * @return String + * @param string $name + * @param string $subpage + * @param string $urlaction + * @return string */ static function makeSpecialUrlSubpage( $name, $subpage, $urlaction = '' ) { $title = SpecialPage::getSafeTitleFor( $name, $subpage ); @@ -1117,9 +1117,9 @@ } /** - * @param $name string - * @param $urlaction string - * @return String + * @param string $name + * @param string $urlaction + * @return string */ static function makeI18nUrl( $name, $urlaction = '' ) { $title = Title::newFromText( wfMessage( $name )->inContentLanguage()->text() ); @@ -1128,9 +1128,9 @@ } /** - * @param $name string - * @param $urlaction string - * @return String + * @param string $name + * @param string $urlaction + * @return string */ static function makeUrl( $name, $urlaction = '' ) { $title = Title::newFromText( $name ); @@ -1142,8 +1142,8 @@ /** * If url string starts with http, consider as external URL, else * internal - * @param $name String - * @return String URL + * @param string $name + * @return string URL */ static function makeInternalOrExternalUrl( $name ) { if ( preg_match( '/^(?i:' . wfUrlProtocols() . ')/', $name ) ) { @@ -1155,10 +1155,10 @@ /** * this can be passed the NS number as defined in Language.php - * @param $name - * @param $urlaction string - * @param $namespace int - * @return String + * @param string $name + * @param string $urlaction + * @param int $namespace + * @return string */ static function makeNSUrl( $name, $urlaction = '', $namespace = NS_MAIN ) { $title = Title::makeTitleSafe( $namespace, $name ); @@ -1169,8 +1169,8 @@ /** * these return an array with the 'href' and boolean 'exists' - * @param $name - * @param $urlaction string + * @param string $name + * @param string $urlaction * @return array */ static function makeUrlDetails( $name, $urlaction = '' ) { @@ -1186,8 +1186,8 @@ /** * Make URL details where the article exists (or at least it's convenient to think so) * @param string $name Article name - * @param $urlaction String - * @return Array + * @param string $urlaction + * @return array */ static function makeKnownUrlDetails( $name, $urlaction = '' ) { $title = Title::newFromText( $name ); @@ -1202,8 +1202,8 @@ /** * make sure we have some title to operate on * - * @param $title Title - * @param $name string + * @param Title $title + * @param string $name */ static function checkTitle( &$title, $name ) { if ( !is_object( $title ) ) { @@ -1267,8 +1267,8 @@ * * This is just a wrapper around addToSidebarPlain() for backwards compatibility * - * @param $bar array - * @param $message String + * @param array $bar + * @param string $message */ function addToSidebar( &$bar, $message ) { $this->addToSidebarPlain( $bar, wfMessage( $message )->inContentLanguage()->plain() ); @@ -1277,9 +1277,9 @@ /** * Add content from plain text * @since 1.17 - * @param $bar array - * @param $text string - * @return Array + * @param array $bar + * @param string $text + * @return array */ function addToSidebarPlain( &$bar, $text ) { $lines = explode( "\n", $text ); @@ -1385,7 +1385,7 @@ /** * Gets new talk page messages for the current user and returns an * appropriate alert message (or an empty string if there are no messages) - * @return String + * @return string */ function getNewtalks() { @@ -1477,8 +1477,8 @@ /** * Get a cached notice * - * @param string $name message name, or 'default' for $wgSiteNotice - * @return String: HTML fragment + * @param string $name Message name, or 'default' for $wgSiteNotice + * @return string HTML fragment */ private function getCachedNotice( $name ) { global $wgRenderHashAppend, $parserMemc, $wgContLang; @@ -1532,7 +1532,7 @@ /** * Get a notice based on page's namespace * - * @return String: HTML fragment + * @return string HTML fragment */ function getNamespaceNotice() { wfProfileIn( __METHOD__ ); @@ -1552,7 +1552,7 @@ /** * Get the site notice * - * @return String: HTML fragment + * @return string HTML fragment */ function getSiteNotice() { wfProfileIn( __METHOD__ ); @@ -1583,13 +1583,13 @@ * Create a section edit link. This supersedes editSectionLink() and * editSectionLinkForOther(). * - * @param $nt Title The title being linked to (may not be the same as + * @param Title $nt The title being linked to (may not be the same as * the current page, if the section is included from a template) * @param string $section The designation of the section being pointed to, * to be included in the link, like "§ion=$section" * @param string $tooltip The tooltip to use for the link: will be escaped * and wrapped in the 'editsectionhint' message - * @param $lang string Language code + * @param string $lang Language code * @return string HTML to use for edit link */ public function doEditSectionLink( Title $nt, $section, $tooltip = null, $lang = false ) { -- To view, visit https://gerrit.wikimedia.org/r/129117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6627ba0e76d3577c40bf2473e0f78a5ad7368634 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: Daniel Friesen <dan...@nadir-seen-fire.com> Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: TTO <at.li...@live.com.au> Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits