Merge "Avoid uncommitted transaction notices in thumb.php and img_auth.php"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 22 Apr 2014 15:45:58 +0000 (15:45 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 22 Apr 2014 15:45:58 +0000 (15:45 +0000)
130 files changed:
includes/AjaxResponse.php
includes/AuthPlugin.php
includes/AutoLoader.php
includes/Autopromote.php
includes/CacheHelper.php
includes/Category.php
includes/CategoryViewer.php
includes/Categoryfinder.php
includes/ChangeTags.php
includes/ChangesFeed.php
includes/Cookie.php
includes/EditPage.php
includes/Fallback.php
includes/Feed.php
includes/FeedUtils.php
includes/FileDeleteForm.php
includes/HistoryBlob.php
includes/Html.php
includes/HttpFunctions.php
includes/ImagePage.php
includes/Init.php
includes/Licenses.php
includes/LinkFilter.php
includes/Linker.php
includes/MWTimestamp.php
includes/MagicWord.php
includes/Message.php
includes/MessageBlobStore.php
includes/MimeMagic.php
includes/Namespace.php
includes/OutputHandler.php
includes/PageQueryPage.php
includes/Pager.php
includes/PathRouter.php
includes/PrefixSearch.php
includes/ProtectionForm.php
includes/QueryPage.php
includes/RevisionList.php
includes/Sanitizer.php
includes/SiteConfiguration.php
includes/SiteStats.php
includes/SkinTemplate.php
includes/SquidPurgeClient.php
includes/StatCounter.php
includes/Status.php
includes/StubObject.php
includes/UserMailer.php
includes/UserRightsProxy.php
includes/WatchedItem.php
includes/Wiki.php
includes/WikiMap.php
includes/filerepo/file/LocalFile.php
includes/htmlform/HTMLButtonField.php
includes/htmlform/HTMLCheckField.php
includes/htmlform/HTMLCheckMatrix.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/HTMLMultiSelectField.php
includes/htmlform/HTMLNestedFilterable.php
includes/htmlform/HTMLRadioField.php
includes/htmlform/HTMLSelectAndOtherField.php
includes/htmlform/HTMLSelectOrOtherField.php
includes/jobqueue/Job.php
includes/jobqueue/JobQueue.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueFederated.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobQueueRedis.php
includes/jobqueue/jobs/DoubleRedirectJob.php
includes/jobqueue/jobs/RefreshLinksJob2.php
includes/jobqueue/jobs/UploadFromUrlJob.php
includes/media/BMP.php
includes/media/Bitmap_ClientOnly.php
includes/media/DjVu.php
includes/media/DjVuImage.php
includes/media/ExifBitmap.php
includes/media/FormatMetadata.php
includes/media/MediaHandler.php
includes/media/MediaTransformOutput.php
includes/media/SVG.php
includes/media/SVGMetadataExtractor.php
includes/media/XMP.php
includes/media/XMPValidate.php
includes/parser/CacheTime.php
includes/parser/CoreParserFunctions.php
includes/parser/CoreTagHooks.php
includes/parser/DateFormatter.php
includes/parser/LinkHolderArray.php
includes/parser/Parser.php
includes/parser/ParserCache.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php
includes/parser/Parser_DiffTest.php
includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/StripState.php
includes/parser/Tidy.php
includes/profiler/Profiler.php
includes/profiler/ProfilerStandard.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderFilePageModule.php
includes/resourceloader/ResourceLoaderLanguageDataModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderNoscriptModule.php
includes/resourceloader/ResourceLoaderSiteModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php
includes/resourceloader/ResourceLoaderUserGroupsModule.php
includes/resourceloader/ResourceLoaderUserModule.php
includes/resourceloader/ResourceLoaderUserOptionsModule.php
includes/resourceloader/ResourceLoaderUserTokensModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/search/SearchEngine.php
includes/search/SearchHighlighter.php
includes/search/SearchMssql.php
includes/search/SearchMySQL.php
includes/search/SearchOracle.php
includes/search/SearchPostgres.php
includes/search/SearchResult.php
includes/search/SearchResultSet.php
includes/search/SearchSqlite.php
includes/specials/SpecialSearch.php
languages/FakeConverter.php [new file with mode: 0644]
languages/Language.php
languages/LanguageConverter.php
languages/i18n/en.json
maintenance/generateJsonI18n.php

index 4b5ca75..a3808a5 100644 (file)
@@ -48,7 +48,7 @@ class AjaxResponse {
 
        /**
         * Date for the HTTP header Last-modified
-        * @var string|false $mLastModified
+        * @var string|bool $mLastModified
         */
        private $mLastModified;
 
@@ -71,7 +71,7 @@ class AjaxResponse {
        private $mText;
 
        /**
-        * @param $text string|null
+        * @param string|null $text
         */
        function __construct( $text = null ) {
                $this->mCacheDuration = null;
@@ -90,7 +90,7 @@ class AjaxResponse {
 
        /**
         * Set the number of seconds to get the response cached by a proxy
-        * @param $duration int
+        * @param int $duration
         */
        function setCacheDuration( $duration ) {
                $this->mCacheDuration = $duration;
@@ -98,7 +98,7 @@ class AjaxResponse {
 
        /**
         * Set the HTTP Vary header
-        * @param $vary string
+        * @param string $vary
         */
        function setVary( $vary ) {
                $this->mVary = $vary;
@@ -106,7 +106,7 @@ class AjaxResponse {
 
        /**
         * Set the HTTP response code
-        * @param $code string
+        * @param string $code
         */
        function setResponseCode( $code ) {
                $this->mResponseCode = $code;
@@ -114,7 +114,7 @@ class AjaxResponse {
 
        /**
         * Set the HTTP header Content-Type
-        * @param $type string
+        * @param string $type
         */
        function setContentType( $type ) {
                $this->mContentType = $type;
@@ -129,7 +129,7 @@ class AjaxResponse {
 
        /**
         * Add content to the response
-        * @param $text string
+        * @param string $text
         */
        function addText( $text ) {
                if ( ! $this->mDisabled && $text ) {
@@ -206,7 +206,7 @@ class AjaxResponse {
         * possible. If successful, the AjaxResponse is disabled so that
         * any future call to AjaxResponse::printText() have no effect.
         *
-        * @param $timestamp string
+        * @param string $timestamp
         * @return bool Returns true if the response code was set to 304 Not Modified.
         */
        function checkLastModified( $timestamp ) {
@@ -262,8 +262,8 @@ class AjaxResponse {
        }
 
        /**
-        * @param $mckey string
-        * @param $touched int
+        * @param string $mckey
+        * @param int $touched
         * @return bool
         */
        function loadFromMemcached( $mckey, $touched ) {
@@ -290,8 +290,8 @@ class AjaxResponse {
        }
 
        /**
-        * @param $mckey string
-        * @param $expiry int
+        * @param string $mckey
+        * @param int $expiry
         * @return bool
         */
        function storeInMemcached( $mckey, $expiry = 86400 ) {
index 217744e..0ce3cf9 100644 (file)
@@ -204,8 +204,8 @@ class AuthPlugin {
         * Update user information in the external authentication database.
         * Return true if successful.
         *
-        * @param $user User object.
-        * @return Boolean
+        * @param User $user User object.
+        * @return bool
         */
        public function updateExternalDB( $user ) {
                return true;
index 97a3246..077c72c 100644 (file)
@@ -1123,7 +1123,7 @@ $wgAutoloadLocalClasses = array(
 
        # languages
        'ConverterRule' => 'languages/ConverterRule.php',
-       'FakeConverter' => 'languages/Language.php',
+       'FakeConverter' => 'languages/FakeConverter.php',
        'Language' => 'languages/Language.php',
        'LanguageConverter' => 'languages/LanguageConverter.php',
        'CLDRPluralRuleConverter' => 'languages/utils/CLDRPluralRuleConverter.php',
@@ -1257,8 +1257,8 @@ class AutoLoader {
         * Sanitizer that have define()s outside of their class definition. Of course
         * this wouldn't be necessary if everything in MediaWiki was class-based. Sigh.
         *
-        * @param $class string
-        * @return Boolean Return the results of class_exists() so we know if we were successful
+        * @param string $class
+        * @return bool Return the results of class_exists() so we know if we were successful
         */
        static function loadClass( $class ) {
                return class_exists( $class );
index 197ad9c..81f3b7a 100644 (file)
@@ -29,7 +29,7 @@ class Autopromote {
        /**
         * Get the groups for the given user based on $wgAutopromote.
         *
-        * @param $user User The user to get the groups for
+        * @param User $user The user to get the groups for
         * @return array Array of groups to promote to.
         */
        public static function getAutopromoteGroups( User $user ) {
@@ -53,8 +53,8 @@ class Autopromote {
         *
         * Does not return groups the user already belongs to or has once belonged.
         *
-        * @param $user User The user to get the groups for
-        * @param string $event key in $wgAutopromoteOnce (each one has groups/criteria)
+        * @param User $user The user to get the groups for
+        * @param string $event Key in $wgAutopromoteOnce (each one has groups/criteria)
         *
         * @return array Groups the user should be promoted to.
         *
@@ -99,8 +99,8 @@ class Autopromote {
         * This function evaluates the former type recursively, and passes off to
         * self::checkCondition for evaluation of the latter type.
         *
-        * @param $cond Mixed: a condition, possibly containing other conditions
-        * @param $user User The user to check the conditions against
+        * @param mixed $cond A condition, possibly containing other conditions
+        * @param User $user The user to check the conditions against
         * @return bool Whether the condition is true
         */
        private static function recCheckCondition( $cond, User $user ) {
@@ -156,7 +156,7 @@ class Autopromote {
         * APCOND_AGE.  Other types will throw an exception if no extension evaluates them.
         *
         * @param array $cond A condition, which must not contain other conditions
-        * @param $user User The user to check the condition against
+        * @param User $user The user to check the condition against
         * @throws MWException
         * @return bool Whether the condition is true for the user
         */
index cfa4160..695eac3 100644 (file)
@@ -32,7 +32,7 @@ interface ICacheHelper {
         * Sets if the cache should be enabled or not.
         *
         * @since 1.20
-        * @param boolean $cacheEnabled
+        * @param bool $cacheEnabled
         */
        function setCacheEnabled( $cacheEnabled );
 
@@ -42,8 +42,8 @@ interface ICacheHelper {
         *
         * @since 1.20
         *
-        * @param integer|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
-        * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
+        * @param int|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
+        * @param bool|null $cacheEnabled Sets if the cache should be enabled or not.
         */
        function startCache( $cacheExpiry = null, $cacheEnabled = null );
 
@@ -77,7 +77,7 @@ interface ICacheHelper {
         *
         * @since 1.20
         *
-        * @param integer $cacheExpiry
+        * @param int $cacheExpiry
         */
        function setExpiry( $cacheExpiry );
 }
@@ -105,7 +105,7 @@ class CacheHelper implements ICacheHelper {
         * The time to live for the cache, in seconds or a unix timestamp indicating the point of expiry.
         *
         * @since 1.20
-        * @var integer
+        * @var int
         */
        protected $cacheExpiry = 3600;
 
@@ -124,7 +124,7 @@ class CacheHelper implements ICacheHelper {
         * Null if this information is not available yet.
         *
         * @since 1.20
-        * @var boolean|null
+        * @var bool|null
         */
        protected $hasCached = null;
 
@@ -132,7 +132,7 @@ class CacheHelper implements ICacheHelper {
         * If the cache is enabled or not.
         *
         * @since 1.20
-        * @var boolean
+        * @var bool
         */
        protected $cacheEnabled = true;
 
@@ -156,7 +156,7 @@ class CacheHelper implements ICacheHelper {
         * Sets if the cache should be enabled or not.
         *
         * @since 1.20
-        * @param boolean $cacheEnabled
+        * @param bool $cacheEnabled
         */
        public function setCacheEnabled( $cacheEnabled ) {
                $this->cacheEnabled = $cacheEnabled;
@@ -168,8 +168,8 @@ class CacheHelper implements ICacheHelper {
         *
         * @since 1.20
         *
-        * @param integer|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
-        * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
+        * @param int|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
+        * @param bool|null $cacheEnabled Sets if the cache should be enabled or not.
         */
        public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
                if ( is_null( $this->hasCached ) ) {
@@ -192,7 +192,7 @@ class CacheHelper implements ICacheHelper {
         * @since 1.20
         *
         * @param IContextSource $context
-        * @param boolean $includePurgeLink
+        * @param bool $includePurgeLink
         *
         * @return string
         */
@@ -328,7 +328,7 @@ class CacheHelper implements ICacheHelper {
         *
         * @since 1.20
         *
-        * @param integer $cacheExpiry
+        * @param int $cacheExpiry
         */
        public function setExpiry( $cacheExpiry ) {
                $this->cacheExpiry = $cacheExpiry;
@@ -378,7 +378,7 @@ class CacheHelper implements ICacheHelper {
         *
         * @since 1.20
         *
-        * @param $handlerFunction
+        * @param callable $handlerFunction
         */
        public function setOnInitializedHandler( $handlerFunction ) {
                $this->onInitHandler = $handlerFunction;
index e326ce2..e235e4e 100644 (file)
@@ -129,8 +129,8 @@ class Category {
        /**
         * Factory function.
         *
-        * @param $title Title for the category page
-        * @return Category|bool on a totally invalid name
+        * @param Title $title Title for the category page
+        * @return Category|bool On a totally invalid name
         */
        public static function newFromTitle( $title ) {
                $cat = new self();
@@ -144,7 +144,7 @@ class Category {
        /**
         * Factory function.
         *
-        * @param $id Integer: a category id
+        * @param int $id A category id
         * @return Category
         */
        public static function newFromID( $id ) {
@@ -156,11 +156,11 @@ class Category {
        /**
         * Factory function, for constructing a Category object from a result set
         *
-        * @param $row Result set row, must contain the cat_xxx fields. If the
+        * @param object $row Result set row, must contain the cat_xxx fields. If the
         *   fields are null, the resulting Category object will represent an empty
         *   category if a title object was given. If the fields are null and no
         *   title was given, this method fails and returns false.
-        * @param Title $title optional title object for the category represented by
+        * @param Title $title Optional title object for the category represented by
         *   the given row. May be provided if it is already known, to avoid having
         *   to re-create a title object later.
         * @return Category
@@ -253,9 +253,9 @@ class Category {
        /**
         * Fetch a TitleArray of up to $limit category members, beginning after the
         * category sort key $offset.
-        * @param $limit integer
-        * @param $offset string
-        * @return TitleArray object for category members.
+        * @param int $limit
+        * @param string $offset
+        * @return TitleArray TitleArray object for category members.
         */
        public function getMembers( $limit = false, $offset = '' ) {
                wfProfileIn( __METHOD__ );
index 7f213c3..cee3f5b 100644 (file)
@@ -29,12 +29,12 @@ class CategoryViewer extends ContextSource {
                $imgsNoGallery;
 
        /**
-        * @var Array
+        * @var array
         */
        var $nextPage;
 
        /**
-        * @var Array
+        * @var array
         */
        var $flip;
 
@@ -69,12 +69,12 @@ class CategoryViewer extends ContextSource {
         * Constructor
         *
         * @since 1.19 $context is a second, required parameter
-        * @param $title Title
-        * @param $context IContextSource
+        * @param Title $title
+        * @param IContextSource $context
         * @param array $from An array with keys page, subcat,
         *        and file for offset of results of each section (since 1.17)
         * @param array $until An array with 3 keys for until of each section (since 1.17)
-        * @param $query Array
+        * @param array $query
         */
        function __construct( $title, IContextSource $context, $from = array(),
                $until = array(), $query = array()
@@ -162,9 +162,9 @@ class CategoryViewer extends ContextSource {
 
        /**
         * Add a subcategory to the internal lists, using a Category object
-        * @param $cat Category
-        * @param $sortkey
-        * @param $pageLength
+        * @param Category $cat
+        * @param string $sortkey
+        * @param int $pageLength
         */
        function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) {
                // Subcategory; strip the 'Category' namespace from the link text.
@@ -210,10 +210,10 @@ class CategoryViewer extends ContextSource {
 
        /**
         * Add a page in the image namespace
-        * @param $title Title
-        * @param $sortkey
-        * @param $pageLength
-        * @param $isRedirect bool
+        * @param Title $title
+        * @param string $sortkey
+        * @param int $pageLength
+        * @param bool $isRedirect
         */
        function addImage( Title $title, $sortkey, $pageLength, $isRedirect = false ) {
                global $wgContLang;
@@ -240,10 +240,10 @@ class CategoryViewer extends ContextSource {
 
        /**
         * Add a miscellaneous page
-        * @param $title
-        * @param $sortkey
-        * @param $pageLength
-        * @param $isRedirect bool
+        * @param Title $title
+        * @param string $sortkey
+        * @param int $pageLength
+        * @param bool $isRedirect
         */
        function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
                global $wgContLang;
@@ -474,10 +474,10 @@ class CategoryViewer extends ContextSource {
         * Format a list of articles chunked by letter, either as a
         * bullet list or a columnar format, depending on the length.
         *
-        * @param $articles Array
-        * @param $articles_start_char Array
-        * @param $cutoff Int
-        * @return String
+        * @param array $articles
+        * @param array $articles_start_char
+        * @param int $cutoff
+        * @return string
         * @private
         */
        function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
@@ -507,9 +507,9 @@ class CategoryViewer extends ContextSource {
         * More distant TODO: Scrap this and use CSS columns, whenever IE finally
         * supports those.
         *
-        * @param $articles Array
-        * @param $articles_start_char Array
-        * @return String
+        * @param array $articles
+        * @param array $articles_start_char
+        * @return string
         * @private
         */
        static function columnList( $articles, $articles_start_char ) {
@@ -563,9 +563,9 @@ class CategoryViewer extends ContextSource {
 
        /**
         * Format a list of articles chunked by letter in a bullet list.
-        * @param $articles Array
-        * @param $articles_start_char Array
-        * @return String
+        * @param array $articles
+        * @param array $articles_start_char
+        * @return string
         * @private
         */
        static function shortList( $articles, $articles_start_char ) {
@@ -590,7 +590,7 @@ class CategoryViewer extends ContextSource {
         * @param string $last The 'from' parameter for the generated URL
         * @param string $type A prefix for parameters, 'page' or 'subcat' or
         *     'file'
-        * @return String HTML
+        * @return string HTML
         */
        private function pagingLinks( $first, $last, $type = '' ) {
                $prevLink = $this->msg( 'prevn' )->numParams( $this->limit )->escaped();
index 6ef224b..720f6f8 100644 (file)
@@ -64,8 +64,8 @@ class Categoryfinder {
 
        /**
         * Initializes the instance. Do this prior to calling run().
-        * @param $article_ids Array of article IDs
-        * @param $categories FIXME
+        * @param array $article_ids Array of article IDs
+        * @param array $categories FIXME
         * @param string $mode FIXME, default 'AND'.
         * @todo FIXME: $categories/$mode
         */
@@ -113,7 +113,7 @@ class Categoryfinder {
         * This functions recurses through the parent representation, trying to match the conditions
         * @param int $id The article/category to check
         * @param array $conds The array of categories to match
-        * @param array $path used to check for recursion loops
+        * @param array $path Used to check for recursion loops
         * @return bool Does this match the conditions?
         */
        function check( $id, &$conds, $path = array() ) {
index f73ec1f..3818c96 100644 (file)
@@ -65,8 +65,8 @@ class ChangeTags {
         *
         * @param string $tag tag
         *
-        * @return String: Short description of the tag from "mediawiki:tag-$tag" if this message exists,
-        *                 html-escaped version of $tag otherwise
+        * @return string Short description of the tag from "mediawiki:tag-$tag" if this message exists,
+        *   html-escaped version of $tag otherwise
         */
        public static function tagDescription( $tag ) {
                $msg = wfMessage( "tag-$tag" );
@@ -77,13 +77,13 @@ class ChangeTags {
         * Add tags to a change given its rc_id, rev_id and/or log_id
         *
         * @param string|array $tags Tags to add to the change
-        * @param $rc_id int: rc_id of the change to add the tags to
-        * @param $rev_id int: rev_id of the change to add the tags to
-        * @param $log_id int: log_id of the change to add the tags to
+        * @param int $rc_id rc_id of the change to add the tags to
+        * @param int $rev_id rev_id of the change to add the tags to
+        * @param int $log_id Log_id of the change to add the tags to
         * @param string $params params to put in the ct_params field of table 'change_tag'
         *
         * @throws MWException
-        * @return bool: false if no changes are made, otherwise true
+        * @return bool false if no changes are made, otherwise true
         *
         * @exception MWException when $rc_id, $rev_id and $log_id are all null
         */
@@ -192,9 +192,9 @@ class ChangeTags {
         *
         * @param string|array $tables Table names, see DatabaseBase::select
         * @param string|array $fields Fields used in query, see DatabaseBase::select
-        * @param string|array $conds conditions used in query, see DatabaseBase::select
-        * @param $join_conds Array: join conditions, see DatabaseBase::select
-        * @param array $options options, see Database::select
+        * @param string|array $conds Conditions used in query, see DatabaseBase::select
+        * @param array $join_conds Join conditions, see DatabaseBase::select
+        * @param array $options Options, see Database::select
         * @param bool|string $filter_tag Tag to select on
         *
         * @throws MWException When unable to determine appropriate JOIN condition for tagging
@@ -238,12 +238,12 @@ class ChangeTags {
         * Build a text box to select a change tag
         *
         * @param string $selected tag to select by default
-        * @param $fullForm Boolean:
+        * @param bool $fullForm
         *        - if false, then it returns an array of (label, form).
         *        - if true, it returns an entire form around the selector.
-        * @param $title Title object to send the form to.
+        * @param Title $title Title object to send the form to.
         *        Used when, and only when $fullForm is true.
-        * @return String or array:
+        * @return string|array
         *        - if $fullForm is false: Array with
         *        - if $fullForm is true: String, html fragment
         */
@@ -297,7 +297,7 @@ class ChangeTags {
         *
         * Tries memcached first.
         *
-        * @return Array of strings: tags
+        * @return array Array of strings: tags
         */
        public static function listDefinedTags() {
                // Caching...
index a5e5364..fb491e5 100644 (file)
@@ -31,8 +31,8 @@ class ChangesFeed {
        /**
         * Constructor
         *
-        * @param string $format feed's format (either 'rss' or 'atom')
-        * @param string $type type of feed (for cache keys)
+        * @param string $format Feed's format (either 'rss' or 'atom')
+        * @param string $type Type of feed (for cache keys)
         */
        public function __construct( $format, $type ) {
                $this->format = $format;
@@ -42,10 +42,10 @@ class ChangesFeed {
        /**
         * Get a ChannelFeed subclass object to use
         *
-        * @param string $title feed's title
-        * @param string $description feed's description
-        * @param string $url url of origin page
-        * @return ChannelFeed subclass or false on failure
+        * @param string $title Feed's title
+        * @param string $description Feed's description
+        * @param string $url Url of origin page
+        * @return ChannelFeed|bool ChannelFeed subclass or false on failure
         */
        public function getFeedObject( $title, $description, $url ) {
                global $wgSitename, $wgLanguageCode, $wgFeedClasses;
@@ -112,9 +112,9 @@ class ChangesFeed {
        /**
         * Save to feed result to $messageMemc
         *
-        * @param string $feed feed's content
-        * @param string $timekey memcached key of the last modification
-        * @param string $key memcached key of the content
+        * @param string $feed Feed's content
+        * @param string $timekey Memcached key of the last modification
+        * @param string $key Memcached key of the content
         */
        public function saveToCache( $feed, $timekey, $key ) {
                global $messageMemc;
@@ -126,10 +126,10 @@ class ChangesFeed {
        /**
         * Try to load the feed result from $messageMemc
         *
-        * @param $lastmod Integer: timestamp of the last item in the recentchanges table
-        * @param string $timekey memcached key of the last modification
-        * @param string $key memcached key of the content
-        * @return string|bool feed's content on cache hit or false on cache miss
+        * @param int $lastmod Timestamp of the last item in the recentchanges table
+        * @param string $timekey Memcached key of the last modification
+        * @param string $key Memcached key of the content
+        * @return string|bool Feed's content on cache hit or false on cache miss
         */
        public function loadFromCache( $lastmod, $timekey, $key ) {
                global $wgFeedCacheTimeout, $wgOut, $messageMemc;
@@ -163,8 +163,8 @@ class ChangesFeed {
 
        /**
         * Generate the feed items given a row from the database, printing the feed.
-        * @param $rows DatabaseBase resource with recentchanges rows
-        * @param $feed Feed object
+        * @param object $rows DatabaseBase resource with recentchanges rows
+        * @param Feed $feed
         */
        public static function generateFeed( $rows, &$feed ) {
                wfProfileIn( __METHOD__ );
@@ -179,7 +179,7 @@ class ChangesFeed {
 
        /**
         * Generate the feed items given a row from the database.
-        * @param $rows DatabaseBase resource with recentchanges rows
+        * @param object $rows DatabaseBase resource with recentchanges rows
         */
        public static function buildItems( $rows ) {
                wfProfileIn( __METHOD__ );
index e0a11a2..b8d34e2 100644 (file)
@@ -43,8 +43,8 @@ class Cookie {
         * cookies. Used internally after a request to parse the
         * Set-Cookie headers.
         *
-        * @param string $value the value of the cookie
-        * @param array $attr possible key/values:
+        * @param string $value The value of the cookie
+        * @param array $attr Possible key/values:
         *        expires A date string
         *        path    The path this cookie is used on
         *        domain  Domain this cookie is used on
@@ -85,9 +85,9 @@ class Cookie {
         * @todo fixme fails to detect 2-letter top-level domains for single-domain use (probably
         * not a big problem in practice, but there are test cases)
         *
-        * @param string $domain the domain to validate
+        * @param string $domain The domain to validate
         * @param string $originDomain (optional) the domain the cookie originates from
-        * @return Boolean
+        * @return bool
         */
        public static function validateCookieDomain( $domain, $originDomain = null ) {
                // Don't allow a trailing dot
@@ -149,9 +149,9 @@ class Cookie {
        /**
         * Serialize the cookie jar into a format useful for HTTP Request headers.
         *
-        * @param string $path the path that will be used. Required.
-        * @param string $domain the domain that will be used. Required.
-        * @return String
+        * @param string $path The path that will be used. Required.
+        * @param string $domain The domain that will be used. Required.
+        * @return string
         */
        public function serializeToHttpRequest( $path, $domain ) {
                $ret = '';
@@ -166,7 +166,7 @@ class Cookie {
        }
 
        /**
-        * @param $domain
+        * @param string $domain
         * @return bool
         */
        protected function canServeDomain( $domain ) {
@@ -189,7 +189,7 @@ class Cookie {
        }
 
        /**
-        * @param $path
+        * @param string $path
         * @return bool
         */
        protected function canServePath( $path ) {
@@ -210,6 +210,9 @@ class CookieJar {
        /**
         * Set a cookie in the cookie jar. Make sure only one cookie per-name exists.
         * @see Cookie::set()
+        * @param string $name
+        * @param string $value
+        * @param array $attr
         */
        public function setCookie( $name, $value, $attr ) {
                /* cookies: case insensitive, so this should work.
@@ -226,6 +229,8 @@ class CookieJar {
 
        /**
         * @see Cookie::serializeToHttpRequest
+        * @param string $path
+        * @param string $domain
         * @return string
         */
        public function serializeToHttpRequest( $path, $domain ) {
@@ -245,8 +250,8 @@ class CookieJar {
        /**
         * Parse the content of an Set-Cookie HTTP Response header.
         *
-        * @param $cookie String
-        * @param string $domain cookie's domain
+        * @param string $cookie
+        * @param string $domain Cookie's domain
         * @return null
         */
        public function parseCookieResponseHeader( $cookie, $domain ) {
index c266996..c2803b6 100644 (file)
@@ -225,7 +225,7 @@ class EditPage {
 
        /**
         * Has a summary been preset using GET parameter &summary= ?
-        * @var Bool
+        * @var bool
         */
        var $hasPresetSummary = false;
 
@@ -266,7 +266,7 @@ class EditPage {
        public $allowNonTextContent = false;
 
        /**
-        * @param $article Article
+        * @param Article $article
         */
        public function __construct( Article $article ) {
                $this->mArticle = $article;
@@ -296,7 +296,7 @@ class EditPage {
        /**
         * Set the context Title object
         *
-        * @param $title Title object or null
+        * @param Title|null $title Title object or null
         */
        public function setContextTitle( $title ) {
                $this->mContextTitle = $title;
@@ -307,7 +307,7 @@ class EditPage {
         * If not set, $wgTitle will be returned. This behavior might change in
         * the future to return $this->mTitle instead.
         *
-        * @return Title object
+        * @return Title
         */
        public function getContextTitle() {
                if ( is_null( $this->mContextTitle ) ) {
@@ -487,8 +487,8 @@ class EditPage {
         *   "View source for ..." page displaying the source code after the error message.
         *
         * @since 1.19
-        * @param array $permErrors of permissions errors, as returned by
-        *                    Title::getUserPermissionsErrors().
+        * @param array $permErrors Array of permissions errors, as returned by
+        *    Title::getUserPermissionsErrors().
         * @throws PermissionsError
         */
        protected function displayPermissionsError( array $permErrors ) {
@@ -625,7 +625,7 @@ class EditPage {
 
        /**
         * This function collects the form data and uses it to populate various member variables.
-        * @param $request WebRequest
+        * @param WebRequest $request
         * @throws ErrorPageError
         */
        function importFormData( &$request ) {
@@ -819,7 +819,7 @@ class EditPage {
         * this method should be overridden and return the page text that will be used
         * for saving, preview parsing and so on...
         *
-        * @param $request WebRequest
+        * @param WebRequest $request
         */
        protected function importContentFormData( &$request ) {
                return; // Don't do anything, EditPage already extracted wpTextbox1
@@ -828,7 +828,7 @@ class EditPage {
        /**
         * Initialise form fields in the object
         * Called on the first invocation, e.g. when a user clicks an edit link
-        * @return bool -- if the requested section is valid
+        * @return bool If the requested section is valid
         */
        function initialiseForm() {
                global $wgUser;
@@ -864,8 +864,8 @@ class EditPage {
        /**
         * Fetch initial editing page content.
         *
-        * @param $def_text string|bool
-        * @return mixed string on success, $def_text for invalid sections
+        * @param string|bool $def_text
+        * @return string|bool string on success, $def_text for invalid sections
         * @private
         * @deprecated since 1.21, get WikiPage::getContent() instead.
         */
@@ -887,7 +887,7 @@ class EditPage {
        /**
         * @param Content|null $def_content The default value to return
         *
-        * @return mixed Content on success, $def_content for invalid sections
+        * @return Content|null Content on success, $def_content for invalid sections
         *
         * @since 1.21
         */
@@ -1074,7 +1074,7 @@ class EditPage {
        /**
         * Use this method before edit() to preload some text into the edit box
         *
-        * @param $text string
+        * @param string $text
         * @deprecated since 1.21, use setPreloadedContent() instead.
         */
        public function setPreloadedText( $text ) {
@@ -1088,7 +1088,7 @@ class EditPage {
        /**
         * Use this method before edit() to preload some content into the edit box
         *
-        * @param $content Content
+        * @param Content $content
         *
         * @since 1.21
         */
@@ -1102,7 +1102,7 @@ class EditPage {
         *
         * @param string $preload representing the title to preload from.
         *
-        * @return String
+        * @return string
         *
         * @deprecated since 1.21, use getPreloadedContent() instead
         */
@@ -1119,8 +1119,8 @@ class EditPage {
         * Get the contents to be preloaded into the box, either set by
         * an earlier setPreloadText() or by loading the given page.
         *
-        * @param string $preload representing the title to preload from.
-        * @param Array $params Parameters to use (interface-message style) in the preloaded text
+        * @param string $preload Representing the title to preload from.
+        * @param array $params Parameters to use (interface-message style) in the preloaded text
         *
         * @return Content
         *
@@ -1186,7 +1186,7 @@ class EditPage {
        /**
         * Make sure the form isn't faking a user's credentials.
         *
-        * @param $request WebRequest
+        * @param WebRequest $request
         * @return bool
         * @private
         */
@@ -1345,7 +1345,7 @@ class EditPage {
        /**
         * Run hooks that can filter edits just before they get saved.
         *
-        * @param Content $content the Content to filter.
+        * @param Content $content The Content to filter.
         * @param Status $status For reporting the outcome to the caller
         * @param User $user The user performing the edit
         *
@@ -1393,14 +1393,14 @@ class EditPage {
        /**
         * Attempt submission (no UI)
         *
-        * @param array $result array to add statuses to, currently with the possible keys:
+        * @param array $result Array to add statuses to, currently with the possible keys:
         *  spam - string - Spam string from content if any spam is detected by matchSpamRegex
         *  sectionanchor - string - Section anchor for a section save
         *  nullEdit - boolean - Set if doEditContent is OK.  True if null edit, false otherwise.
         *  redirect - boolean -  Set if doEditContent is OK.  True if resulting revision is a redirect
         * @param bool $bot True if edit is being made under the bot right.
         *
-        * @return Status object, possibly with a message, but always with one of the AS_* constants in $status->value,
+        * @return Status Status object, possibly with a message, but always with one of the AS_* constants in $status->value,
         *
         * FIXME: This interface is TERRIBLE, but hard to get rid of due to various error display idiosyncrasies. There are
         * also lots of cases where error metadata is set in the object and retrieved later instead of being returned, e.g.
@@ -1866,7 +1866,7 @@ class EditPage {
        /**
         * Attempts to merge text content with base and current revisions
         *
-        * @param $editText string
+        * @param string $editText
         *
         * @return bool
         * @deprecated since 1.21, use mergeChangesIntoContent() instead
@@ -1892,7 +1892,7 @@ class EditPage {
         *
         * @since 1.21
         *
-        * @param $editContent
+        * @param Content $editContent
         *
         * @return bool
         */
@@ -1948,9 +1948,9 @@ class EditPage {
        /**
         * Check given input text against $wgSpamRegex, and return the text of the first match.
         *
-        * @param $text string
+        * @param string $text
         *
-        * @return string|bool matching string or false
+        * @return string|bool Matching string or false
         */
        public static function matchSpamRegex( $text ) {
                global $wgSpamRegex;
@@ -1962,9 +1962,9 @@ class EditPage {
        /**
         * Check given input text against $wgSummarySpamRegex, and return the text of the first match.
         *
-        * @param $text string
+        * @param string $text
         *
-        * @return string|bool matching string or false
+        * @return string|bool Matching string or false
         */
        public static function matchSummarySpamRegex( $text ) {
                global $wgSummarySpamRegex;
@@ -1973,8 +1973,8 @@ class EditPage {
        }
 
        /**
-        * @param $text string
-        * @param $regexes array
+        * @param string $text
+        * @param array $regexes
         * @return bool|string
         */
        protected static function matchSpamRegexInternal( $text, $regexes ) {
@@ -2153,7 +2153,7 @@ class EditPage {
         * content.
         *
         * @param Content|null|bool|string $content
-        * @return String the editable text form of the content.
+        * @return string The editable text form of the content.
         *
         * @throws MWException if $content is not an instance of TextContent and $this->allowNonTextContent is not true.
         */
@@ -2206,7 +2206,7 @@ class EditPage {
 
        /**
         * Send the edit form and related headers to $wgOut
-        * @param $formCallback Callback|null that takes an OutputPage parameter; will be called
+        * @param callable|null $formCallback That takes an OutputPage parameter; will be called
         *     during form output near the top, for captchas and the like.
         */
        function showEditForm( $formCallback = null ) {
@@ -2401,7 +2401,7 @@ class EditPage {
         * Extract the section title from current section text, if any.
         *
         * @param string $text
-        * @return Mixed|string or false
+        * @return string|bool string or false
         */
        public static function extractSectionTitle( $text ) {
                preg_match( "/^(=+)(.+)\\1\\s*(\n|$)/i", $text, $matches );
@@ -2576,8 +2576,8 @@ class EditPage {
         *
         * @param string $summary The value of the summary input
         * @param string $labelText The html to place inside the label
-        * @param array $inputAttrs of attrs to use on the input
-        * @param array $spanLabelAttrs of attrs to use on the span inside the label
+        * @param array $inputAttrs Array of attrs to use on the input
+        * @param array $spanLabelAttrs Array of attrs to use on the span inside the label
         *
         * @return array An array in the format array( $label, $input )
         */
@@ -2637,7 +2637,7 @@ class EditPage {
         * @param bool $isSubjectPreview true if this is the section subject/title
         *   up top, or false if this is the comment summary
         *   down below the textarea
-        * @param string $summary the text of the summary to display
+        * @param string $summary The text of the summary to display
         * @return string
         */
        protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) {
@@ -2710,8 +2710,8 @@ HTML
         * The $textoverride method can be used by subclasses overriding showContentForm
         * to pass back to this method.
         *
-        * @param array $customAttribs of html attributes to use in the textarea
-        * @param string $textoverride optional text to override $this->textarea1 with
+        * @param array $customAttribs Array of html attributes to use in the textarea
+        * @param string $textoverride Optional text to override $this->textarea1 with
         */
        protected function showTextbox1( $customAttribs = null, $textoverride = null ) {
                if ( $this->wasDeletedSinceLastEdit() && $this->formtype == 'save' ) {
@@ -2817,7 +2817,7 @@ HTML
         * Append preview output to $wgOut.
         * Includes category rendering if this is a category page.
         *
-        * @param string $text the HTML to be output for the preview.
+        * @param string $text The HTML to be output for the preview.
         */
        protected function showPreview( $text ) {
                global $wgOut;
@@ -2946,8 +2946,7 @@ HTML
         * Get the copyright warning, by default returns wikitext
         *
         * @param Title $title
-        * @param string $format output format, valid values are any function of
-        *                       a Message object
+        * @param string $format Output format, valid values are any function of a Message object
         * @return string
         */
        public static function getCopyrightWarning( $title, $format = 'plain' ) {
@@ -3106,7 +3105,7 @@ HTML
         * variable in the constructor is not enough. This can be used when the
         * EditPage lives inside of a Special page rather than a custom page action.
         *
-        * @param $title Title object for which is being edited (where we go to for &action= links)
+        * @param Title $title Title object for which is being edited (where we go to for &action= links)
         * @return string
         */
        protected function getActionURL( Title $title ) {
@@ -3118,6 +3117,7 @@ HTML
         * Note that we rely on the logging table, which hasn't been always there,
         * but that doesn't matter, because this only applies to brand new
         * deletes.
+        * @return bool
         */
        protected function wasDeletedSinceLastEdit() {
                if ( $this->deletedSinceEdit !== null ) {
@@ -3313,7 +3313,7 @@ HTML
        }
 
        /**
-        * @return Array
+        * @return array
         */
        function getTemplates() {
                if ( $this->preview || $this->section != '' ) {
@@ -3494,7 +3494,7 @@ HTML
         * minor and watch
         *
         * @param int $tabindex Current tabindex
-        * @param array $checked of checkbox => bool, where bool indicates the checked
+        * @param array $checked Array of checkbox => bool, where bool indicates the checked
         *                 status of the checkbox
         *
         * @return array
@@ -3673,7 +3673,7 @@ HTML
        /**
         * Show "your edit contains spam" page with your diff and text
         *
-        * @param $match string|Array|bool Text (or array of texts) which triggered one or more filters
+        * @param string|array|bool $match Text (or array of texts) which triggered one or more filters
         */
        public function spamPageWithContent( $match = false ) {
                global $wgOut, $wgLang;
index cdf6c88..e38bdf1 100644 (file)
@@ -26,9 +26,9 @@
 class Fallback {
 
        /**
-        * @param $from
-        * @param $to
-        * @param $string
+        * @param string $from
+        * @param string $to
+        * @param string $string
         * @return string
         */
        public static function iconv( $from, $to, $string ) {
@@ -57,9 +57,9 @@ class Fallback {
         * can be up to 100x slower than native if the text is heavily
         * multibyte and we have to slog through a few hundred kb.
         *
-        * @param $str
-        * @param $start
-        * @param $count string
+        * @param string $str
+        * @param int $start
+        * @param string $count
         *
         * @return string
         */
@@ -78,8 +78,8 @@ class Fallback {
        }
 
        /**
-        * @param $str
-        * @param $splitPos
+        * @param string $str
+        * @param int $splitPos
         * @return int
         */
        public static function mb_substr_split_unicode( $str, $splitPos ) {
@@ -130,7 +130,7 @@ class Fallback {
        /**
         * Fallback implementation of mb_strlen, hardcoded to UTF-8.
         * @param string $str
-        * @param string $enc optional encoding; ignored
+        * @param string $enc Optional encoding; ignored
         * @return int
         */
        public static function mb_strlen( $str, $enc = '' ) {
@@ -151,10 +151,10 @@ class Fallback {
 
        /**
         * Fallback implementation of mb_strpos, hardcoded to UTF-8.
-        * @param $haystack String
-        * @param $needle String
-        * @param string $offset optional start position
-        * @param string $encoding optional encoding; ignored
+        * @param string $haystack
+        * @param string $needle
+        * @param string $offset Optional start position
+        * @param string $encoding Optional encoding; ignored
         * @return int
         */
        public static function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
@@ -172,8 +172,8 @@ class Fallback {
 
        /**
         * Fallback implementation of mb_strrpos, hardcoded to UTF-8.
-        * @param $haystack String
-        * @param $needle String
+        * @param string $haystack
+        * @param string $needle
         * @param string $offset optional start position
         * @param string $encoding optional encoding; ignored
         * @return int
index d5a9553..1b99519 100644 (file)
@@ -53,11 +53,11 @@ class FeedItem {
         * Constructor
         *
         * @param string|Title $title Item's title
-        * @param $description String
+        * @param string $description
         * @param string $url URL uniquely designating the item.
         * @param string $date Item's date
         * @param string $author Author's user name
-        * @param $comments String
+        * @param string $comments
         */
        function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) {
                $this->title = $title;
@@ -72,8 +72,8 @@ class FeedItem {
        /**
         * Encode $string so that it can be safely embedded in a XML document
         *
-        * @param string $string string to encode
-        * @return String
+        * @param string $string String to encode
+        * @return string
         */
        public function xmlEncode( $string ) {
                $string = str_replace( "\r\n", "\n", $string );
@@ -84,7 +84,7 @@ class FeedItem {
        /**
         * Get the unique id of this item
         *
-        * @return String
+        * @return string
         */
        public function getUniqueId() {
                if ( $this->uniqueId ) {
@@ -95,8 +95,8 @@ class FeedItem {
        /**
         * set the unique id of an item
         *
-        * @param string $uniqueId unique id for the item
-        * @param $rssIsPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
+        * @param string $uniqueId Unique id for the item
+        * @param bool $rssIsPermalink Set to true if the guid (unique id) is a permalink (RSS feeds only)
         */
        public function setUniqueId( $uniqueId, $rssIsPermalink = false ) {
                $this->uniqueId = $uniqueId;
@@ -106,7 +106,7 @@ class FeedItem {
        /**
         * Get the title of this item; already xml-encoded
         *
-        * @return String
+        * @return string
         */
        public function getTitle() {
                return $this->xmlEncode( $this->title );
@@ -115,7 +115,7 @@ class FeedItem {
        /**
         * Get the URL of this item; already xml-encoded
         *
-        * @return String
+        * @return string
         */
        public function getUrl() {
                return $this->xmlEncode( $this->url );
@@ -124,7 +124,7 @@ class FeedItem {
        /**
         * Get the description of this item; already xml-encoded
         *
-        * @return String
+        * @return string
         */
        public function getDescription() {
                return $this->xmlEncode( $this->description );
@@ -133,7 +133,7 @@ class FeedItem {
        /**
         * Get the language of this item
         *
-        * @return String
+        * @return string
         */
        public function getLanguage() {
                global $wgLanguageCode;
@@ -143,7 +143,7 @@ class FeedItem {
        /**
         * Get the title of this item
         *
-        * @return String
+        * @return string
         */
        public function getDate() {
                return $this->date;
@@ -152,7 +152,7 @@ class FeedItem {
        /**
         * Get the author of this item; already xml-encoded
         *
-        * @return String
+        * @return string
         */
        public function getAuthor() {
                return $this->xmlEncode( $this->author );
@@ -161,7 +161,7 @@ class FeedItem {
        /**
         * Get the comment of this item; already xml-encoded
         *
-        * @return String
+        * @return string
         */
        public function getComments() {
                return $this->xmlEncode( $this->comments );
@@ -171,7 +171,7 @@ class FeedItem {
         * Quickie hack... strip out wikilinks to more legible form from the comment.
         *
         * @param string $text wikitext
-        * @return String
+        * @return string
         */
        public static function stripComment( $text ) {
                return preg_replace( '/\[\[([^]]*\|)?([^]]+)\]\]/', '\2', $text );
@@ -190,7 +190,6 @@ abstract class ChannelFeed extends FeedItem {
         * @code
         * print "<feed>";
         * @endcode
-        * @param $item
         */
        abstract public function outHeader();
 
@@ -200,7 +199,7 @@ abstract class ChannelFeed extends FeedItem {
         * @code
         * print "<item>...</item>";
         * @endcode
-        * @param $item
+        * @param FeedItem $item
         */
        abstract public function outItem( $item );
 
@@ -274,8 +273,8 @@ class RSSFeed extends ChannelFeed {
        /**
         * Format a date given a timestamp
         *
-        * @param $ts Integer: timestamp
-        * @return String: date string
+        * @param int $ts Timestamp
+        * @return string Date string
         */
        function formatTime( $ts ) {
                return gmdate( 'D, d M Y H:i:s \G\M\T', wfTimestamp( TS_UNIX, $ts ) );
@@ -301,7 +300,7 @@ class RSSFeed extends ChannelFeed {
 
        /**
         * Output an RSS 2.0 item
-        * @param $item FeedItem: item to be output
+        * @param FeedItem $item Item to be output
         */
        function outItem( $item ) {
        ?>
@@ -386,7 +385,7 @@ class AtomFeed extends ChannelFeed {
 
        /**
         * Output a given item.
-        * @param $item
+        * @param FeedItem $item
         */
        function outItem( $item ) {
                global $wgMimeType;
index 22cb52b..d407a0e 100644 (file)
@@ -33,8 +33,8 @@ class FeedUtils {
         * If the feed should be purged; $timekey and $key will be removed from
         * $messageMemc
         *
-        * @param string $timekey cache key of the timestamp of the last item
-        * @param string $key cache key of feed's content
+        * @param string $timekey Cache key of the timestamp of the last item
+        * @param string $key Cache key of feed's content
         */
        public static function checkPurge( $timekey, $key ) {
                global $wgRequest, $wgUser, $messageMemc;
@@ -49,7 +49,7 @@ class FeedUtils {
         * Check whether feeds can be used and that $type is a valid feed type
         *
         * @param string $type feed type, as requested by the user
-        * @return Boolean
+        * @return bool
         */
        public static function checkFeedOutput( $type ) {
                global $wgOut, $wgFeed, $wgFeedClasses;
@@ -70,8 +70,8 @@ class FeedUtils {
        /**
         * Format a diff for the newsfeed
         *
-        * @param $row Object: row from the recentchanges table
-        * @return String
+        * @param object $row Row from the recentchanges table
+        * @return string
         */
        public static function formatDiff( $row ) {
                $titleObj = Title::makeTitle( $row->rc_namespace, $row->rc_title );
@@ -94,13 +94,13 @@ class FeedUtils {
        /**
         * Really format a diff for the newsfeed
         *
-        * @param $title Title object
-        * @param $oldid Integer: old revision's id
-        * @param $newid Integer: new revision's id
-        * @param $timestamp Integer: new revision's timestamp
-        * @param string $comment new revision's comment
-        * @param string $actiontext text of the action; in case of log event
-        * @return String
+        * @param Title $title Title object
+        * @param int $oldid Old revision's id
+        * @param int $newid New revision's id
+        * @param int $timestamp New revision's timestamp
+        * @param string $comment New revision's comment
+        * @param string $actiontext Text of the action; in case of log event
+        * @return string
         */
        public static function formatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext = '' ) {
                global $wgFeedDiffCutoff, $wgLang;
@@ -214,9 +214,9 @@ class FeedUtils {
         * Generates a diff link. Used when the full diff is not wanted for example
         * when $wgFeedDiffCutoff is 0.
         *
-        * @param $title Title object: used to generate the diff URL
-        * @param $newid Integer newid for this diff
-        * @param $oldid Integer|null oldid for the diff. Null means it is a new article
+        * @param Title $title Title object: used to generate the diff URL
+        * @param int $newid Newid for this diff
+        * @param int|null $oldid Oldid for the diff. Null means it is a new article
         * @return string
         */
        protected static function getDiffLink( Title $title, $newid, $oldid = null ) {
@@ -237,8 +237,8 @@ class FeedUtils {
         * Might be 'cleaner' to use DOM or XSLT or something,
         * but *gack* it's a pain in the ass.
         *
-        * @param string $text diff's HTML output
-        * @return String: modified HTML
+        * @param string $text Diff's HTML output
+        * @return string Modified HTML
         */
        public static function applyDiffStyle( $text ) {
                $styles = array(
index 444d26f..44aaeb4 100644 (file)
@@ -303,8 +303,8 @@ class FileDeleteForm {
         * showing an appropriate message depending upon whether
         * it's a current file or an old version
         *
-        * @param string $message message base
-        * @return String
+        * @param string $message Message base
+        * @return string
         */
        private function prepareMessage( $message ) {
                global $wgLang;
@@ -336,6 +336,7 @@ class FileDeleteForm {
        /**
         * Is the provided `oldimage` value valid?
         *
+        * @param string $oldimage
         * @return bool
         */
        public static function isValidOldSpec( $oldimage ) {
@@ -349,9 +350,9 @@ class FileDeleteForm {
         * value was provided, does it correspond to an
         * existing, local, old version of this file?
         *
-        * @param $file File
-        * @param $oldfile File
-        * @param $oldimage File
+        * @param File $file
+        * @param File $oldfile
+        * @param File $oldimage
         * @return bool
         */
        public static function haveDeletableFile( &$file, &$oldfile, $oldimage ) {
index a3ed700..da54673 100644 (file)
@@ -32,18 +32,18 @@ interface HistoryBlob
         * You must call setLocation() on the stub object before storing it to the
         * database
         *
-        * @param $text string
+        * @param string $text
         *
-        * @return String: the key for getItem()
+        * @return string The key for getItem()
         */
        function addItem( $text );
 
        /**
         * Get item by key, or false if the key is not present
         *
-        * @param $key string
+        * @param string $key
         *
-        * @return String or false
+        * @return string|bool
         */
        function getItem( $key );
 
@@ -55,14 +55,14 @@ interface HistoryBlob
         *
         * Default text is not required for two-part external storage URLs.
         *
-        * @param $text string
+        * @param string $text
         */
        function setText( $text );
 
        /**
         * Get default text. This is called from Revision::getRevisionText()
         *
-        * @return String
+        * @return string
         */
        function getText();
 }
@@ -88,7 +88,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
        }
 
        /**
-        * @param $text string
+        * @param string $text
         * @return string
         */
        public function addItem( $text ) {
@@ -102,7 +102,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
        }
 
        /**
-        * @param $hash string
+        * @param string $hash
         * @return array|bool
         */
        public function getItem( $hash ) {
@@ -115,7 +115,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
        }
 
        /**
-        * @param $text string
+        * @param string $text
         * @return void
         */
        public function setText( $text ) {
@@ -134,7 +134,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
        /**
         * Remove an item
         *
-        * @param $hash string
+        * @param string $hash
         */
        public function removeItem( $hash ) {
                $this->mSize -= strlen( $this->mItems[$hash] );
@@ -200,8 +200,8 @@ class HistoryBlobStub {
        var $mOldId, $mHash, $mRef;
 
        /**
-        * @param string $hash the content hash of the text
-        * @param $oldid Integer the old_id for the CGZ object
+        * @param string $hash The content hash of the text
+        * @param int $oldid The old_id for the CGZ object
         */
        function __construct( $hash = '', $oldid = 0 ) {
                $this->mHash = $hash;
@@ -210,6 +210,7 @@ class HistoryBlobStub {
        /**
         * Sets the location (old_id) of the main object to which this object
         * points
+        * @param int $id
         */
        function setLocation( $id ) {
                $this->mOldId = $id;
@@ -217,6 +218,7 @@ class HistoryBlobStub {
 
        /**
         * Sets the location (old_id) of the referring object
+        * @param string $id
         */
        function setReferrer( $id ) {
                $this->mRef = $id;
@@ -224,6 +226,7 @@ class HistoryBlobStub {
 
        /**
         * Gets the location of the referring object
+        * @return string
         */
        function getReferrer() {
                return $this->mRef;
@@ -298,7 +301,7 @@ class HistoryBlobCurStub {
        var $mCurId;
 
        /**
-        * @param $curid Integer: the cur_id pointed to
+        * @param int $curid The cur_id pointed to
         */
        function __construct( $curid = 0 ) {
                $this->mCurId = $curid;
@@ -308,7 +311,7 @@ class HistoryBlobCurStub {
         * Sets the location (cur_id) of the main object to which this object
         * points
         *
-        * @param $id int
+        * @param int $id
         */
        function setLocation( $id ) {
                $this->mCurId = $id;
@@ -390,7 +393,7 @@ class DiffHistoryBlob implements HistoryBlob {
 
        /**
         * @throws MWException
-        * @param $text string
+        * @param string $text
         * @return int
         */
        function addItem( $text ) {
@@ -405,7 +408,7 @@ class DiffHistoryBlob implements HistoryBlob {
        }
 
        /**
-        * @param $key string
+        * @param string $key
         * @return string
         */
        function getItem( $key ) {
@@ -413,7 +416,7 @@ class DiffHistoryBlob implements HistoryBlob {
        }
 
        /**
-        * @param $text string
+        * @param string $text
         */
        function setText( $text ) {
                $this->mDefaultKey = $this->addItem( $text );
@@ -502,8 +505,8 @@ class DiffHistoryBlob implements HistoryBlob {
        }
 
        /**
-        * @param $t1
-        * @param $t2
+        * @param string $t1
+        * @param string $t2
         * @return string
         */
        function diff( $t1, $t2 ) {
@@ -516,8 +519,8 @@ class DiffHistoryBlob implements HistoryBlob {
        }
 
        /**
-        * @param $base
-        * @param $diff
+        * @param string $base
+        * @param string $diff
         * @return bool|string
         */
        function patch( $base, $diff ) {
@@ -580,7 +583,7 @@ class DiffHistoryBlob implements HistoryBlob {
         * the bytes backwards and initialised with 0 instead of 1. See bug 34428.
         *
         * @param string $s
-        * @return string|bool: false if the hash extension is not available
+        * @return string|bool false if the hash extension is not available
         */
        function xdiffAdler32( $s ) {
                if ( !function_exists( 'hash' ) ) {
index b1d4f00..2a8c9b1 100644 (file)
@@ -139,9 +139,9 @@ class Html {
         * Identical to rawElement(), but HTML-escapes $contents (like
         * Xml::element()).
         *
-        * @param $element string
-        * @param $attribs array
-        * @param $contents string
+        * @param string $element
+        * @param array $attribs
+        * @param string $contents
         *
         * @return string
         */
@@ -158,8 +158,8 @@ class Html {
         * Identical to rawElement(), but has no third parameter and omits the end
         * tag (and the self-closing '/' in XML mode for empty elements).
         *
-        * @param $element string
-        * @param $attribs array
+        * @param string $element
+        * @param array $attribs
         *
         * @return string
         */
@@ -267,7 +267,7 @@ class Html {
         * to the input array (currently per the HTML 5 draft as of 2009-09-06).
         *
         * @param string $element Name of the element, e.g., 'a'
-        * @param array $attribs  Associative array of attributes, e.g., array(
+        * @param array $attribs Associative array of attributes, e.g., array(
         *   'href' => 'http://www.mediawiki.org/' ).  See expandAttributes() for
         *   further documentation.
         * @return array An array of attributes functionally identical to $attribs
@@ -583,7 +583,7 @@ class Html {
         * Output a "<script>" tag linking to the given URL, e.g.,
         * "<script src=foo.js></script>".
         *
-        * @param $url string
+        * @param string $url
         * @return string Raw HTML
         */
        public static function linkedScript( $url ) {
@@ -598,7 +598,7 @@ class Html {
         * contains literal "</style>" (admittedly unlikely).
         *
         * @param string $contents CSS
-        * @param $media mixed A media type string, like 'screen'
+        * @param string $media A media type string, like 'screen'
         * @return string Raw HTML
         */
        public static function inlineStyle( $contents, $media = 'all' ) {
@@ -618,8 +618,8 @@ class Html {
         * Output a "<link rel=stylesheet>" linking to the given URL for the given
         * media type (if any).
         *
-        * @param $url string
-        * @param $media mixed A media type string, like 'screen'
+        * @param string $url
+        * @param string $media A media type string, like 'screen'
         * @return string Raw HTML
         */
        public static function linkedStyle( $url, $media = 'all' ) {
@@ -854,11 +854,11 @@ class Html {
        /**
         * Get HTML for an info box with an icon.
         *
-        * @param string $text wikitext, get this with wfMessage()->plain()
-        * @param string $icon icon name, file in skins/common/images
-        * @param string $alt alternate text for the icon
-        * @param string $class additional class name to add to the wrapper div
-        * @param $useStylePath
+        * @param string $text Wikitext, get this with wfMessage()->plain()
+        * @param string $icon Icon name, file in skins/common/images
+        * @param string $alt Alternate text for the icon
+        * @param string $class Additional class name to add to the wrapper div
+        * @param bool $useStylePath
         *
         * @return string
         */
index 1fd437e..c9dd0c0 100644 (file)
@@ -55,7 +55,7 @@ class Http {
         *                                  to avoid attacks on intranet services accessible by HTTP.
         *    - userAgent           A user agent, if you want to override the default
         *                          MediaWiki/$wgVersion
-        * @return Mixed: (bool)false on failure or a string on success
+        * @return string|bool (bool)false on failure or a string on success
         */
        public static function request( $method, $url, $options = array() ) {
                wfDebug( "HTTP: $method: $url\n" );
@@ -85,9 +85,9 @@ class Http {
         * Simple wrapper for Http::request( 'GET' )
         * @see Http::request()
         *
-        * @param $url
-        * @param $timeout string
-        * @param $options array
+        * @param string $url
+        * @param string $timeout
+        * @param array $options
         * @return string
         */
        public static function get( $url, $timeout = 'default', $options = array() ) {
@@ -99,8 +99,8 @@ class Http {
         * Simple wrapper for Http::request( 'POST' )
         * @see Http::request()
         *
-        * @param $url
-        * @param $options array
+        * @param string $url
+        * @param array $options
         * @return string
         */
        public static function post( $url, $options = array() ) {
@@ -110,8 +110,8 @@ class Http {
        /**
         * Check if the URL can be served by localhost
         *
-        * @param string $url full url to check
-        * @return Boolean
+        * @param string $url Full url to check
+        * @return bool
         */
        public static function isLocalURL( $url ) {
                global $wgCommandLineMode, $wgConf;
@@ -150,7 +150,7 @@ class Http {
 
        /**
         * A standard user-agent we can use for external requests.
-        * @return String
+        * @return string
         */
        public static function userAgent() {
                global $wgVersion;
@@ -166,8 +166,8 @@ class Http {
         *
         * @todo FIXME this is wildly inaccurate and fails to actually check most stuff
         *
-        * @param $uri Mixed: URI to check for validity
-        * @return Boolean
+        * @param string $uri URI to check for validity
+        * @return bool
         */
        public static function isValidURI( $uri ) {
                return preg_match(
@@ -217,7 +217,7 @@ class MWHttpRequest {
        public $status;
 
        /**
-        * @param string $url url to use. If protocol-relative, will be expanded to an http:// URL
+        * @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL
         * @param array $options (optional) extra params to pass (see Http::request())
         */
        protected function __construct( $url, $options = array() ) {
@@ -276,7 +276,7 @@ class MWHttpRequest {
 
        /**
         * Generate a new request object
-        * @param string $url url to use
+        * @param string $url Url to use
         * @param array $options (optional) extra params to pass (see Http::request())
         * @throws MWException
         * @return CurlHttpRequest|PhpHttpRequest
@@ -310,7 +310,7 @@ class MWHttpRequest {
        /**
         * Get the body, or content, of the response to the request
         *
-        * @return String
+        * @return string
         */
        public function getContent() {
                return $this->content;
@@ -319,7 +319,7 @@ class MWHttpRequest {
        /**
         * Set the parameters of the request
         *
-        * @param $args Array
+        * @param array $args
         * @todo overload the args param
         */
        public function setData( $args ) {
@@ -352,7 +352,7 @@ class MWHttpRequest {
 
        /**
         * Set the user agent
-        * @param $UA string
+        * @param string $UA
         */
        public function setUserAgent( $UA ) {
                $this->setHeader( 'User-Agent', $UA );
@@ -360,8 +360,8 @@ class MWHttpRequest {
 
        /**
         * Set an arbitrary header
-        * @param $name
-        * @param $value
+        * @param string $name
+        * @param string $value
         */
        public function setHeader( $name, $value ) {
                // I feel like I should normalize the case here...
@@ -405,7 +405,7 @@ class MWHttpRequest {
         * bytes are reported handled than were passed to you, the HTTP fetch
         * will be aborted.
         *
-        * @param $callback Callback
+        * @param callable $callback
         * @throws MWException
         */
        public function setCallback( $callback ) {
@@ -419,8 +419,8 @@ class MWHttpRequest {
         * A generic callback to read the body of the response from a remote
         * server.
         *
-        * @param $fh handle
-        * @param $content String
+        * @param resource $fh
+        * @param string $content
         * @return int
         */
        public function read( $fh, $content ) {
@@ -507,7 +507,7 @@ class MWHttpRequest {
         * (see RFC2616, section 10, http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
         * for a list of status codes.)
         *
-        * @return Integer
+        * @return int
         */
        public function getStatus() {
                if ( !$this->respHeaders ) {
@@ -520,7 +520,7 @@ class MWHttpRequest {
        /**
         * Returns true if the last status code was a redirect.
         *
-        * @return Boolean
+        * @return bool
         */
        public function isRedirect() {
                if ( !$this->respHeaders ) {
@@ -542,7 +542,7 @@ class MWHttpRequest {
         * (e.g. Set-Cookie) can appear more than once the, each value of
         * the associative array is an array of the values given.
         *
-        * @return Array
+        * @return array
         */
        public function getResponseHeaders() {
                if ( !$this->respHeaders ) {
@@ -555,8 +555,8 @@ class MWHttpRequest {
        /**
         * Returns the value of the given response header.
         *
-        * @param $header String
-        * @return String
+        * @param string $header
+        * @return string
         */
        public function getResponseHeader( $header ) {
                if ( !$this->respHeaders ) {
@@ -574,7 +574,7 @@ class MWHttpRequest {
        /**
         * Tells the MWHttpRequest object to use this pre-loaded CookieJar.
         *
-        * @param $jar CookieJar
+        * @param CookieJar $jar
         */
        public function setCookieJar( $jar ) {
                $this->cookieJar = $jar;
@@ -598,9 +598,9 @@ class MWHttpRequest {
         * cookies. Used internally after a request to parse the
         * Set-Cookie headers.
         * @see Cookie::set
-        * @param $name
-        * @param $value null
-        * @param $attr null
+        * @param string $name
+        * @param mixed $value
+        * @param array $attr
         */
        public function setCookie( $name, $value = null, $attr = null ) {
                if ( !$this->cookieJar ) {
@@ -705,8 +705,8 @@ class CurlHttpRequest extends MWHttpRequest {
        protected $headerText = "";
 
        /**
-        * @param $fh
-        * @param $content
+        * @param resource $fh
+        * @param string $content
         * @return int
         */
        protected function readHeader( $fh, $content ) {
@@ -821,7 +821,7 @@ class CurlHttpRequest extends MWHttpRequest {
 class PhpHttpRequest extends MWHttpRequest {
 
        /**
-        * @param $url string
+        * @param string $url
         * @return string
         */
        protected function urlToTcp( $url ) {
index a83217d..8444223 100644 (file)
@@ -40,7 +40,7 @@ class ImagePage extends Article {
        var $mExtraDescription = false;
 
        /**
-        * @param $title Title
+        * @param Title $title
         * @return WikiFilePage
         */
        protected function newPage( Title $title ) {
@@ -50,7 +50,7 @@ class ImagePage extends Article {
 
        /**
         * Constructor from a page id
-        * @param int $id article ID to load
+        * @param int $id Article ID to load
         * @return ImagePage|null
         */
        public static function newFromID( $id ) {
@@ -61,7 +61,7 @@ class ImagePage extends Article {
        }
 
        /**
-        * @param $file File:
+        * @param File $file
         * @return void
         */
        public function setFile( $file ) {
@@ -227,8 +227,8 @@ class ImagePage extends Article {
        /**
         * Create the TOC
         *
-        * @param $metadata Boolean: whether or not to show the metadata link
-        * @return String
+        * @param bool $metadata Whether or not to show the metadata link
+        * @return string
         */
        protected function showTOC( $metadata ) {
                $r = array(
@@ -250,8 +250,8 @@ class ImagePage extends Article {
         *
         * @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata().
         *
-        * @param array $metadata the array containing the Exif data
-        * @return String The metadata table. This is treated as Wikitext (!)
+        * @param array $metadata The array containing the Exif data
+        * @return string The metadata table. This is treated as Wikitext (!)
         */
        protected function makeMetadataTable( $metadata ) {
                $r = "<div class=\"mw-imagepage-section-metadata\">";
@@ -609,8 +609,8 @@ EOT
        /**
         * Creates an thumbnail of specified size and returns an HTML link to it
         * @param array $params Scaler parameters
-        * @param $width int
-        * @param $height int
+        * @param int $width
+        * @param int $height
         * @return string
         */
        private function makeSizeLink( $params, $width, $height ) {
@@ -723,8 +723,8 @@ EOT
        }
 
        /**
-        * @param $target
-        * @param $limit
+        * @param string $target
+        * @param int $limit
         * @return ResultWrapper
         */
        protected function queryImageLinks( $target, $limit ) {
@@ -916,7 +916,7 @@ EOT
        /**
         * Display an error with a wikitext description
         *
-        * @param $description String
+        * @param string $description
         */
        function showError( $description ) {
                $out = $this->getContext()->getOutput();
@@ -931,9 +931,9 @@ EOT
         * Callback for usort() to do link sorts by (namespace, title)
         * Function copied from Title::compare()
         *
-        * @param $a object page to compare with
-        * @param $b object page to compare with
-        * @return Integer: result of string comparison, or namespace comparison
+        * @param object $a Object page to compare with
+        * @param object $b Object page to compare with
+        * @return int Result of string comparison, or namespace comparison
         */
        protected function compare( $a, $b ) {
                if ( $a->page_namespace == $b->page_namespace ) {
@@ -946,7 +946,7 @@ EOT
        /**
         * Returns the corresponding $wgImageLimits entry for the selected user option
         *
-        * @param $user User
+        * @param User $user
         * @param string $optionName Name of a option to check, typically imagesize or thumbsize
         * @return array
         * @since 1.21
@@ -974,10 +974,10 @@ EOT
        /**
         * Output a drop-down box for language options for the file
         *
-        * @param Array $langChoices Array of string language codes
-        * @param String $curLang Language code file is being viewed in.
-        * @param String $defaultLang Language code that image is rendered in by default
-        * @return String HTML to insert underneath image.
+        * @param array $langChoices Array of string language codes
+        * @param string $curLang Language code file is being viewed in.
+        * @param string $defaultLang Language code that image is rendered in by default
+        * @return string HTML to insert underneath image.
         */
        protected function doRenderLangOpt( array $langChoices, $curLang, $defaultLang ) {
                global $wgScript;
@@ -1096,7 +1096,7 @@ class ImageHistoryList extends ContextSource {
        }
 
        /**
-        * @param $navLinks string
+        * @param string $navLinks
         * @return string
         */
        public function beginImageHistoryList( $navLinks = '' ) {
@@ -1116,7 +1116,7 @@ class ImageHistoryList extends ContextSource {
        }
 
        /**
-        * @param $navLinks string
+        * @param string $navLinks
         * @return string
         */
        public function endImageHistoryList( $navLinks = '' ) {
@@ -1124,8 +1124,8 @@ class ImageHistoryList extends ContextSource {
        }
 
        /**
-        * @param $iscur
-        * @param $file File
+        * @param bool $iscur
+        * @param File $file
         * @return string
         */
        public function imageHistoryLine( $iscur, $file ) {
@@ -1285,7 +1285,7 @@ class ImageHistoryList extends ContextSource {
        }
 
        /**
-        * @param $file File
+        * @param File $file
         * @return string
         */
        protected function getThumbForLine( $file ) {
@@ -1320,7 +1320,7 @@ class ImageHistoryList extends ContextSource {
        }
 
        /**
-        * @param $enable bool
+        * @param bool $enable
         */
        protected function preventClickjacking( $enable = true ) {
                $this->preventClickjacking = $enable;
@@ -1379,7 +1379,7 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager {
        }
 
        /**
-        * @param $row object
+        * @param object $row
         * @return string
         */
        function formatRow( $row ) {
@@ -1493,7 +1493,7 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager {
        }
 
        /**
-        * @param $enable bool
+        * @param bool $enable
         */
        protected function preventClickjacking( $enable = true ) {
                $this->preventClickjacking = $enable;
index dd5e2d7..5b1dc83 100644 (file)
@@ -55,7 +55,7 @@ class MWInit {
         * Get a fully-qualified path for a source file relative to $IP.
         * @deprecated since 1.22
         *
-        * @param $file string
+        * @param string $file
         *
         * @return string
         */
@@ -66,7 +66,7 @@ class MWInit {
 
        /**
         * @deprecated since 1.22
-        * @param $file string
+        * @param string $file
         * @return string
         */
        static function compiledPath( $file ) {
@@ -76,7 +76,7 @@ class MWInit {
 
        /**
         * @deprecated since 1.22
-        * @param $file string
+        * @param string $file
         * @return string
         */
        static function extCompiledPath( $file ) {
@@ -87,7 +87,7 @@ class MWInit {
         * Deprecated wrapper for class_exists()
         * @deprecated since 1.22
         *
-        * @param $class string
+        * @param string $class
         *
         * @return bool
         */
@@ -99,8 +99,8 @@ class MWInit {
         * Deprecated wrapper for method_exists()
         * @deprecated since 1.22
         *
-        * @param $class string
-        * @param $method string
+        * @param string $class
+        * @param string $method
         *
         * @return bool
         */
@@ -112,7 +112,7 @@ class MWInit {
         * Deprecated wrapper for function_exists()
         * @deprecated since 1.22
         *
-        * @param $function string
+        * @param string $function
         *
         * @return bool
         */
@@ -124,9 +124,9 @@ class MWInit {
         * Deprecated wrapper for call_user_func_array()
         * @deprecated since 1.22
         *
-        * @param $className string
-        * @param $methodName string
-        * @param $args array
+        * @param string $className
+        * @param string $methodName
+        * @param array $args
         *
         * @return mixed
         */
index 6c582aa..e3db5b4 100644 (file)
@@ -47,7 +47,7 @@ class Licenses extends HTMLFormField {
        /**
         * Constructor
         *
-        * @param $params array
+        * @param array $params
         */
        public function __construct( $params ) {
                parent::__construct( $params );
@@ -89,7 +89,7 @@ class Licenses extends HTMLFormField {
        }
 
        /**
-        * @param $str
+        * @param string $str
         * @return array
         */
        protected function trimStars( $str ) {
@@ -98,9 +98,9 @@ class Licenses extends HTMLFormField {
        }
 
        /**
-        * @param $list
-        * @param $path
-        * @param $item
+        * @param array $list
+        * @param array $path
+        * @param mixed $item
         */
        protected function stackItem( &$list, $path, $item ) {
                $position =& $list;
@@ -113,8 +113,8 @@ class Licenses extends HTMLFormField {
        }
 
        /**
-        * @param $tagset
-        * @param $depth int
+        * @param array $tagset
+        * @param int $depth
         */
        protected function makeHtml( $tagset, $depth = 0 ) {
                foreach ( $tagset as $key => $val ) {
@@ -139,10 +139,10 @@ class Licenses extends HTMLFormField {
        }
 
        /**
-        * @param $message
-        * @param $value
-        * @param $attribs null
-        * @param $depth int
+        * @param string $message
+        * @param string $value
+        * @param null|array $attribs
+        * @param int $depth
         * @return string
         */
        protected function outputOption( $message, $value, $attribs = null, $depth = 0 ) {
@@ -171,7 +171,7 @@ class Licenses extends HTMLFormField {
        /**
         * Accessor for $this->html
         *
-        * @param $value bool
+        * @param bool $value
         *
         * @return string
         */
index 48d5cd8..340ae8f 100644 (file)
@@ -35,9 +35,9 @@ class LinkFilter {
        /**
         * Check whether $content contains a link to $filterEntry
         *
-        * @param $content Content: content to check
-        * @param string $filterEntry domainparts, see makeRegex() for more details
-        * @return Integer: 0 if no match or 1 if there's at least one match
+        * @param Content $content Content to check
+        * @param string $filterEntry Domainparts, see makeRegex() for more details
+        * @return int 0 if no match or 1 if there's at least one match
         */
        static function matchEntry( Content $content, $filterEntry ) {
                if ( !( $content instanceof TextContent ) ) {
@@ -58,7 +58,7 @@ class LinkFilter {
         *
         * @param string $filterEntry URL, if it begins with "*.", it'll be
         *        replaced to match any subdomain
-        * @return String: regex pattern, for preg_match()
+        * @return string Regex pattern, for preg_match()
         */
        private static function makeRegex( $filterEntry ) {
                $regex = '!http://';
@@ -87,9 +87,9 @@ class LinkFilter {
         * This function does the same as wfMakeUrlIndexes(), except it also takes care
         * of adding wildcards
         *
-        * @param String $filterEntry domainparts
-        * @param String $protocol protocol (default http://)
-        * @return Array to be passed to DatabaseBase::buildLike() or false on error
+        * @param string $filterEntry Domainparts
+        * @param string $protocol Protocol (default http://)
+        * @return array Array to be passed to DatabaseBase::buildLike() or false on error
         */
        public static function makeLikeArray( $filterEntry, $protocol = 'http://' ) {
                $db = wfGetDB( DB_MASTER );
@@ -171,8 +171,8 @@ class LinkFilter {
         * Filters an array returned by makeLikeArray(), removing everything past first
         * pattern placeholder.
         *
-        * @param array $arr array to filter
-        * @return array filtered array
+        * @param array $arr Array to filter
+        * @return array Filtered array
         */
        public static function keepOneWildcard( $arr ) {
                if ( !is_array( $arr ) ) {
index 0805f70..cfa0158 100644 (file)
@@ -41,7 +41,7 @@ class Linker {
         * Get the appropriate HTML attributes to add to the "a" element of an
         * external link, as created by [wikisyntax].
         *
-        * @param string $class the contents of the class attribute; if an empty
+        * @param string $class The contents of the class attribute; if an empty
         *   string is passed, which is the default value, defaults to 'external'.
         * @return string
         * @deprecated since 1.18 Just pass the external class directly to something using Html::expandAttributes
@@ -54,10 +54,10 @@ class Linker {
        /**
         * Get the appropriate HTML attributes to add to the "a" element of an interwiki link.
         *
-        * @param string $title the title text for the link, URL-encoded (???) but
+        * @param string $title The title text for the link, URL-encoded (???) but
         *   not HTML-escaped
-        * @param string $unused unused
-        * @param string $class the contents of the class attribute; if an empty
+        * @param string $unused Unused
+        * @param string $class The contents of the class attribute; if an empty
         *   string is passed, which is the default value, defaults to 'external'.
         * @return string
         */
@@ -76,10 +76,10 @@ class Linker {
        /**
         * Get the appropriate HTML attributes to add to the "a" element of an internal link.
         *
-        * @param string $title the title text for the link, URL-encoded (???) but
+        * @param string $title The title text for the link, URL-encoded (???) but
         *   not HTML-escaped
-        * @param string $unused unused
-        * @param string $class the contents of the class attribute, default none
+        * @param string $unused Unused
+        * @param string $class The contents of the class attribute, default none
         * @return string
         */
        static function getInternalLinkAttributes( $title, $unused = null, $class = '' ) {
@@ -92,7 +92,7 @@ class Linker {
         * Get the appropriate HTML attributes to add to the "a" element of an internal
         * link, given the Title object for the page we want to link to.
         *
-        * @param $nt Title
+        * @param Title $nt
         * @param string $unused Unused
         * @param string $class The contents of the class attribute, default none
         * @param string|bool $title Optional (unescaped) string to use in the title
@@ -109,8 +109,8 @@ class Linker {
        /**
         * Common code for getLinkAttributesX functions
         *
-        * @param $title string
-        * @param $class string
+        * @param string $title
+        * @param string $class
         *
         * @return string
         */
@@ -271,10 +271,10 @@ class Linker {
        /**
         * Returns the Url used to link to a Title
         *
-        * @param $target Title
+        * @param Title $target
         * @param array $query query parameters
-        * @param $options Array
-        * @return String
+        * @param array $options
+        * @return string
         */
        private static function linkUrl( $target, $query, $options ) {
                wfProfileIn( __METHOD__ );
@@ -310,9 +310,9 @@ class Linker {
        /**
         * Returns the array of attributes used when linking to the Title $target
         *
-        * @param $target Title
-        * @param $attribs
-        * @param $options
+        * @param Title $target
+        * @param array $attribs
+        * @param array $options
         *
         * @return array
         */
@@ -374,7 +374,7 @@ class Linker {
        /**
         * Default text of the links to the Title $target
         *
-        * @param $target Title
+        * @param Title $target
         *
         * @return string
         */
@@ -397,7 +397,7 @@ class Linker {
         * as the bold link text. The calling sequence is the same as the other make*LinkObj static functions,
         * despite $query not being used.
         *
-        * @param $nt Title
+        * @param Title $nt
         * @param string $html [optional]
         * @param string $query [optional]
         * @param string $trail [optional]
@@ -419,7 +419,7 @@ class Linker {
         * This should be called after a method like Title::makeTitleSafe() returned
         * a value indicating that the title object is invalid.
         *
-        * @param $context IContextSource context to use to get the messages
+        * @param IContextSource $context Context to use to get the messages
         * @param int $namespace Namespace number
         * @param string $title Text of the title, without the namespace part
         * @return string
@@ -441,7 +441,7 @@ class Linker {
        }
 
        /**
-        * @param $title Title
+        * @param Title $title
         * @return Title
         */
        static function normaliseSpecialPage( Title $title ) {
@@ -461,7 +461,7 @@ class Linker {
         * Returns the filename part of an url.
         * Used as alternative text for external images.
         *
-        * @param $url string
+        * @param string $url
         *
         * @return string
         */
@@ -479,8 +479,8 @@ class Linker {
         * Return the code for images which were added via external links,
         * via Parser::maybeMakeExternalImage().
         *
-        * @param $url
-        * @param $alt
+        * @param string $url
+        * @param string $alt
         *
         * @return string
         */
@@ -504,10 +504,10 @@ class Linker {
         * Given parameters derived from [[Image:Foo|options...]], generate the
         * HTML that that syntax inserts in the page.
         *
-        * @param $parser Parser object
-        * @param $title Title object of the file (not the currently viewed page)
-        * @param $file File object, or false if it doesn't exist
-        * @param array $frameParams associative array of parameters external to the media handler.
+        * @param Parser $parser
+        * @param Title $title Title object of the file (not the currently viewed page)
+        * @param File $file File object, or false if it doesn't exist
+        * @param array $frameParams Associative array of parameters external to the media handler.
         *     Boolean parameters are indicated by presence or absence, the value is arbitrary and
         *     will often be false.
         *          thumbnail       If present, downscale and frame
@@ -713,15 +713,15 @@ class Linker {
 
        /**
         * Make HTML for a thumbnail including image, border and caption
-        * @param $title Title object
-        * @param $file File object or false if it doesn't exist
-        * @param $label String
-        * @param $alt String
-        * @param $align String
-        * @param $params Array
-        * @param $framed Boolean
-        * @param $manualthumb String
-        * @return mixed
+        * @param Title $title
+        * @param File|bool $file File object or false if it doesn't exist
+        * @param string $label
+        * @param string $alt
+        * @param string $align
+        * @param array $params
+        * @param bool $framed
+        * @param string $manualthumb
+        * @return string
         */
        public static function makeThumbLinkObj( Title $title, $file, $label = '', $alt,
                $align = 'right', $params = array(), $framed = false, $manualthumb = ""
@@ -741,13 +741,13 @@ class Linker {
        }
 
        /**
-        * @param $title Title
-        * @param $file File
+        * @param Title $title
+        * @param File $file
         * @param array $frameParams
         * @param array $handlerParams
         * @param bool $time
         * @param string $query
-        * @return mixed
+        * @return string
         */
        public static function makeThumbLink2( Title $title, $file, $frameParams = array(),
                $handlerParams = array(), $time = false, $query = ""
@@ -874,7 +874,7 @@ class Linker {
         *
         * @param File $file
         * @param MediaTransformOutput $thumb
-        * @param array $hp image parameters
+        * @param array $hp Image parameters
         */
        public static function processResponsiveImages( $file, $thumb, $hp ) {
                global $wgResponsiveImages;
@@ -903,11 +903,11 @@ class Linker {
         * Make a "broken" link to an image
         *
         * @param Title $title
-        * @param string $label link label (plain text)
-        * @param string $query query string
+        * @param string $label Link label (plain text)
+        * @param string $query Query string
         * @param string $unused1 Unused parameter kept for b/c
         * @param string $unused2 Unused parameter kept for b/c
-        * @param bool $time a file of a certain timestamp was requested
+        * @param bool $time A file of a certain timestamp was requested
         * @return string
         */
        public static function makeBrokenImageLinkObj( $title, $label = '', $query = '', $unused1 = '', $unused2 = '', $time = false ) {
@@ -1025,6 +1025,8 @@ class Linker {
         * a message key from the link text.
         * Usage example: Linker::specialLink( 'Recentchanges' )
         *
+        * @param string $name
+        * @param string $key
         * @return string
         */
        public static function specialLink( $name, $key = '' ) {
@@ -1209,7 +1211,7 @@ class Linker {
         * Generate a user link if the current user is allowed to view it
         * @param Revision $rev
         * @param bool $isPublic Show only if all users can see it
-        * @return String HTML fragment
+        * @return string HTML fragment
         */
        public static function revUserLink( $rev, $isPublic = false ) {
                if ( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) {
@@ -1265,7 +1267,7 @@ class Linker {
         * @param string $comment
         * @param Title|null $title Title object (to generate link to the section in autocomment) or null
         * @param bool $local Whether section links should refer to local page
-        * @return mixed|String
+        * @return mixed|string
         */
        public static function formatComment( $comment, $title = null, $local = false ) {
                wfProfileIn( __METHOD__ );
@@ -1317,7 +1319,7 @@ class Linker {
 
        /**
         * Helper function for Linker::formatAutocomments
-        * @param $match
+        * @param array $match
         * @return string
         */
        private static function formatAutocommentsCallback( $match ) {
@@ -1410,7 +1412,7 @@ class Linker {
        }
 
        /**
-        * @param $match
+        * @param array $match
         * @return mixed
         */
        protected static function formatLinksInCommentCallback( $match ) {
@@ -1482,9 +1484,9 @@ class Linker {
        }
 
        /**
-        * @param $contextTitle Title
-        * @param $target
-        * @param $text
+        * @param Title $contextTitle
+        * @param string $target
+        * @param string $text
         * @return string
         */
        public static function normalizeSubpageLink( $contextTitle, $target, &$text ) {
@@ -1610,7 +1612,7 @@ class Linker {
        }
 
        /**
-        * @param $size
+        * @param int $size
         * @return string
         */
        public static function formatRevisionSize( $size ) {
@@ -1635,6 +1637,7 @@ class Linker {
        /**
         * Finish one or more sublevels on the Table of Contents
         *
+        * @param int $level
         * @return string
         */
        public static function tocUnindent( $level ) {
@@ -1644,6 +1647,11 @@ class Linker {
        /**
         * parameter level defines if we are on an indentation level
         *
+        * @param string $anchor
+        * @param string $tocline
+        * @param string $tocnumber
+        * @param string $level
+        * @param string|bool $sectionIndex
         * @return string
         */
        public static function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
@@ -1720,10 +1728,10 @@ class Linker {
         * @param string $attribs Any attributes for the headline, starting with
         *   a space and ending with '>'
         *   This *must* be at least '>' for no attribs
-        * @param string $anchor the anchor to give the headline (the bit after the #)
-        * @param string $html html for the text of the header
+        * @param string $anchor The anchor to give the headline (the bit after the #)
+        * @param string $html Html for the text of the header
         * @param string $link HTML to add for the section edit link
-        * @param bool|string $legacyAnchor a second, optional anchor to give for
+        * @param bool|string $legacyAnchor A second, optional anchor to give for
         *   backward compatibility (false to omit)
         *
         * @return string HTML headline
@@ -1742,6 +1750,7 @@ class Linker {
        /**
         * Split a link trail, return the "inside" portion and the remainder of the trail
         * as a two-element array
+        * @param string $trail
         * @return array
         */
        static function splitTrail( $trail ) {
@@ -1778,9 +1787,9 @@ class Linker {
         *
         * If the option noBrackets is set the rollback link wont be enclosed in []
         *
-        * @param $rev Revision object
-        * @param $context IContextSource context to use or null for the main context.
-        * @param $options array
+        * @param Revision $rev
+        * @param IContextSource $context Context to use or null for the main context.
+        * @param array $options
         * @return string
         */
        public static function generateRollback( $rev, IContextSource $context = null, $options = array( 'verify' ) ) {
@@ -1815,9 +1824,9 @@ class Linker {
         * Returns null if $wgShowRollbackEditCount is disabled or false if $verify
         * is set and the user is the only contributor of the page.
         *
-        * @param $rev Revision object
+        * @param Revision $rev
         * @param bool $verify Try to verify that this revision can really be rolled back
-        * @return integer|bool|null
+        * @return int|bool|null
         */
        public static function getRollbackEditCount( $rev, $verify ) {
                global $wgShowRollbackEditCount;
@@ -2040,7 +2049,7 @@ class Linker {
         *
         * @param array $hiddencats Array of hidden categories from Article::getHiddenCategories
         *   or similar
-        * @return String HTML output
+        * @return string HTML output
         */
        public static function formatHiddenCategories( $hiddencats ) {
                wfProfileIn( __METHOD__ );
@@ -2066,7 +2075,7 @@ class Linker {
         * unit (B, KB, MB or GB) according to the magnitude in question
         *
         * @param int $size Size to format
-        * @return String
+        * @return string
         */
        public static function formatSize( $size ) {
                global $wgLang;
@@ -2080,7 +2089,7 @@ class Linker {
         * element than the id, for reverse-compatibility, etc.)
         *
         * @param string $name Id of the element, minus prefixes.
-        * @param string|null $options null or the string 'withaccess' to add an access-
+        * @param string|null $options Null or the string 'withaccess' to add an access-
         *   key hint
         * @return string Contents of the title attribute (which you must HTML-
         *   escape), or false for no title attribute
@@ -2244,11 +2253,11 @@ class Linker {
         *
         * @param Title $nt The title object to make the link from, e.g. from Title::newFromText.
         * @param string $text Link text
-        * @param string $query optional query part
-        * @param string $trail optional trail. Alphabetic characters at the start of this string will
+        * @param string $query Optional query part
+        * @param string $trail Optional trail. Alphabetic characters at the start of this string will
         *   be included in the link text. Other characters will be appended after
         *   the end of the link.
-        * @param string $prefix optional prefix. As trail, only before instead of after.
+        * @param string $prefix Optional prefix. As trail, only before instead of after.
         * @return string
         */
        static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
@@ -2309,6 +2318,7 @@ class Linker {
 
        /**
         * Returns the attributes for the tooltip and access key.
+        * @param string $name
         * @return array
         */
        public static function tooltipAndAccesskeyAttribs( $name ) {
@@ -2330,6 +2340,8 @@ class Linker {
 
        /**
         * Returns raw bits of HTML, use titleAttrib()
+        * @param string $name
+        * @param array|null $options
         * @return null|string
         */
        public static function tooltip( $name, $options = null ) {
index 9de2c0a..c745164 100644 (file)
@@ -332,7 +332,7 @@ class MWTimestamp {
         * Set the timezone of this timestamp to the specified timezone.
         *
         * @since 1.22
-        * @param String $timezone Timezone to set
+        * @param string $timezone Timezone to set
         * @throws TimestampException
         */
        public function setTimezone( $timezone ) {
index e301cea..56786f1 100644 (file)
@@ -231,7 +231,7 @@ class MagicWord {
        /**
         * Factory: creates an object representing an ID
         *
-        * @param $id
+        * @param int $id
         *
         * @return MagicWord
         */
@@ -269,7 +269,7 @@ class MagicWord {
        /**
         * Allow external reads of TTL array
         *
-        * @param $id int
+        * @param int $id
         * @return array
         */
        static function getCacheTTL( $id ) {
@@ -304,7 +304,7 @@ class MagicWord {
        /**
         * Initialises this object with an ID
         *
-        * @param $id
+        * @param int $id
         * @throws MWException
         */
        function load( $id ) {
@@ -351,8 +351,8 @@ class MagicWord {
         * first string is longer, the same length or shorter than the second
         * string.
         *
-        * @param $s1 string
-        * @param $s2 string
+        * @param string $s1
+        * @param string $s2
         *
         * @return int
         */
@@ -435,7 +435,7 @@ class MagicWord {
        /**
         * Returns true if the text contains the word
         *
-        * @param $text string
+        * @param string $text
         *
         * @return bool
         */
@@ -446,7 +446,7 @@ class MagicWord {
        /**
         * Returns true if the text starts with the word
         *
-        * @param $text string
+        * @param string $text
         *
         * @return bool
         */
@@ -457,7 +457,7 @@ class MagicWord {
        /**
         * Returns true if the text matched the word
         *
-        * @param $text string
+        * @param string $text
         *
         * @return bool
         * @since 1.23
@@ -472,7 +472,7 @@ class MagicWord {
         * part in the regex and the matched variable part ($1) if there
         * is one.
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -501,7 +501,7 @@ class MagicWord {
         * Returns true if the text matches the word, and alters the
         * input string, removing all instances of the word
         *
-        * @param $text string
+        * @param string $text
         *
         * @return bool
         */
@@ -512,7 +512,7 @@ class MagicWord {
        }
 
        /**
-        * @param $text
+        * @param string $text
         * @return bool
         */
        function matchStartAndRemove( &$text ) {
@@ -534,9 +534,9 @@ class MagicWord {
        /**
         * Replaces the word with something else
         *
-        * @param $replacement
-        * @param $subject
-        * @param $limit int
+        * @param string $replacement
+        * @param string $subject
+        * @param int $limit
         *
         * @return string
         */
@@ -551,8 +551,8 @@ class MagicWord {
         * Calls back a function to determine what to replace xxx with
         * Input word must contain $1
         *
-        * @param $text string
-        * @param $callback
+        * @param string $text
+        * @param callable $callback
         *
         * @return string
         */
@@ -589,7 +589,7 @@ class MagicWord {
        /**
         * Accesses the synonym list directly
         *
-        * @param $i int
+        * @param int $i
         *
         * @return string
         */
@@ -621,9 +621,9 @@ class MagicWord {
         * $result. The return value is true if something was replaced.
         * @todo Should this be static? It doesn't seem to be used at all
         *
-        * @param $magicarr
-        * @param $subject
-        * @param $result
+        * @param array $magicarr
+        * @param string $subject
+        * @param string $result
         *
         * @return bool
         */
@@ -644,8 +644,8 @@ class MagicWord {
         * Adds all the synonyms of this MagicWord to an array, to allow quick
         * lookup in a list of magic words
         *
-        * @param $array
-        * @param $value
+        * @param array $array
+        * @param string $value
         */
        function addToArray( &$array, $value ) {
                global $wgContLang;
@@ -680,7 +680,7 @@ class MagicWordArray {
        var $matches;
 
        /**
-        * @param $names array
+        * @param array $names
         */
        function __construct( $names = array() ) {
                $this->names = $names;
@@ -689,7 +689,7 @@ class MagicWordArray {
        /**
         * Add a magic word by name
         *
-        * @param $name string
+        * @param string $name
         */
        public function add( $name ) {
                $this->names[] = $name;
@@ -699,7 +699,7 @@ class MagicWordArray {
        /**
         * Add a number of magic words by name
         *
-        * @param $names array
+        * @param array $names
         */
        public function addArray( $names ) {
                $this->names = array_merge( $this->names, array_values( $names ) );
@@ -824,7 +824,7 @@ class MagicWordArray {
         * Returns array(magic word ID, parameter value)
         * If there is no parameter value, that element will be false.
         *
-        * @param $m array
+        * @param array $m
         *
         * @throws MWException
         * @return array
@@ -855,7 +855,7 @@ class MagicWordArray {
         * parameter in the second element.
         * Both elements are false if there was no match.
         *
-        * @param $text string
+        * @param string $text
         *
         * @return array
         */
@@ -876,7 +876,7 @@ class MagicWordArray {
         * Match some text, without parameter capture
         * Returns the magic word name, or false if there was no capture
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string|bool False on failure
         */
@@ -897,7 +897,7 @@ class MagicWordArray {
         * Returns an associative array, ID => param value, for all items that match
         * Removes the matched items from the input string (passed by reference)
         *
-        * @param $text string
+        * @param string $text
         *
         * @return array
         */
@@ -924,7 +924,7 @@ class MagicWordArray {
         * Return false if no match found and $text is not modified.
         * Does not match parameters.
         *
-        * @param $text string
+        * @param string $text
         *
         * @return int|bool False on failure
         */
index f46c872..31fbb07 100644 (file)
@@ -443,7 +443,7 @@ class Message {
         *
         * @since 1.22
         *
-        * @param number|number[] [$param,...] Time period parameters, or a single argument that is
+        * @param int|int[] [$param,...] Time period parameters, or a single argument that is
         * an array of time period parameters.
         *
         * @return Message $this
@@ -508,7 +508,7 @@ class Message {
         *
         * @since 1.19
         *
-        * @param $context IContextSource
+        * @param IContextSource $context
         *
         * @return Message $this
         */
@@ -604,7 +604,7 @@ class Message {
         *
         * @since 1.18
         *
-        * @param $title Title object
+        * @param Title $title
         *
         * @return Message $this
         */
@@ -890,7 +890,7 @@ class Message {
         * @param string $message The message text.
         * @param string $type Either "before" or "after".
         *
-        * @return String
+        * @return string
         */
        protected function replaceParameters( $message, $type = 'before' ) {
                $replacementKeys = array();
index 7e1c745..f5b346c 100644 (file)
@@ -36,7 +36,7 @@ class MessageBlobStore {
        /**
         * Get the message blobs for a set of modules
         *
-        * @param $resourceLoader ResourceLoader object
+        * @param ResourceLoader $resourceLoader
         * @param array $modules Array of module objects keyed by module name
         * @param string $lang Language code
         * @return array An array mapping module names to message blobs
@@ -68,9 +68,9 @@ class MessageBlobStore {
         * present, it is not regenerated; instead, the preexisting blob
         * is fetched and returned.
         *
-        * @param string $name module name
-        * @param $module ResourceLoaderModule object
-        * @param string $lang language code
+        * @param string $name Module name
+        * @param ResourceLoaderModule $module
+        * @param string $lang Language code
         * @return mixed Message blob or false if the module has no messages
         */
        public static function insertMessageBlob( $name, ResourceLoaderModule $module, $lang ) {
@@ -125,10 +125,10 @@ class MessageBlobStore {
        /**
         * Update the message blob for a given module in a given language
         *
-        * @param string $name module name
-        * @param $module ResourceLoaderModule object
-        * @param string $lang language code
-        * @return String Regenerated message blob, or null if there was no blob for the given module/language pair
+        * @param string $name Module name
+        * @param ResourceLoaderModule $module
+        * @param string $lang Language code
+        * @return string Regenerated message blob, or null if there was no blob for the given module/language pair
         */
        public static function updateModule( $name, ResourceLoaderModule $module, $lang ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -195,7 +195,7 @@ class MessageBlobStore {
        /**
         * Update a single message in all message blobs it occurs in.
         *
-        * @param string $key message key
+        * @param string $key Message key
         */
        public static function updateMessage( $key ) {
                try {
@@ -256,9 +256,9 @@ class MessageBlobStore {
        /**
         * Create an update queue for updateMessage()
         *
-        * @param string $key message key
-        * @param array $prevUpdates updates queue to refresh or null to build a fresh update queue
-        * @return Array: updates queue
+        * @param string $key Message key
+        * @param array $prevUpdates Updates queue to refresh or null to build a fresh update queue
+        * @return array Updates queue
         */
        private static function getUpdatesForMessage( $key, $prevUpdates = null ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -307,10 +307,10 @@ class MessageBlobStore {
        /**
         * Reencode a message blob with the updated value for a message
         *
-        * @param string $blob message blob (JSON object)
-        * @param string $key message key
-        * @param string $lang language code
-        * @return Message blob with $key replaced with its new value
+        * @param string $blob Message blob (JSON object)
+        * @param string $key Message key
+        * @param string $lang Language code
+        * @return string Message blob with $key replaced with its new value
         */
        private static function reencodeBlob( $blob, $key, $lang ) {
                $decoded = FormatJson::decode( $blob, true );
@@ -323,9 +323,9 @@ class MessageBlobStore {
         * Get the message blobs for a set of modules from the database.
         * Modules whose blobs are not in the database are silently dropped.
         *
-        * @param $resourceLoader ResourceLoader object
-        * @param array $modules of module names
-        * @param string $lang language code
+        * @param ResourceLoader $resourceLoader
+        * @param array $modules Array of module names
+        * @param string $lang Language code
         * @throws MWException
         * @return array Array mapping module names to blobs
         */
@@ -361,9 +361,9 @@ class MessageBlobStore {
        /**
         * Generate the message blob for a given module in a given language.
         *
-        * @param $module ResourceLoaderModule object
-        * @param string $lang language code
-        * @return String: JSON object
+        * @param ResourceLoaderModule $module
+        * @param string $lang Language code
+        * @return string JSON object
         */
        private static function generateMessageBlob( ResourceLoaderModule $module, $lang ) {
                $messages = array();
index b5c0c7d..3448c6a 100644 (file)
@@ -348,7 +348,7 @@ class MimeMagic {
         * separated string or null if the mime type was unrecognized. Resolves
         * mime type aliases.
         *
-        * @param $mime string
+        * @param string $mime
         * @return string|null
         */
        public function getExtensionsForType( $mime ) {
@@ -374,7 +374,7 @@ class MimeMagic {
         * Returns a list of mime types for a given file extension as a space
         * separated string or null if the extension was unrecognized.
         *
-        * @param $ext string
+        * @param string $ext
         * @return string|null
         */
        public function getTypesForExtension( $ext ) {
@@ -388,7 +388,7 @@ class MimeMagic {
         * Returns a single mime type for a given file extension or null if unknown.
         * This is always the first type from the list returned by getTypesForExtension($ext).
         *
-        * @param $ext string
+        * @param string $ext
         * @return string|null
         */
        public function guessTypesForExtension( $ext ) {
@@ -409,8 +409,8 @@ class MimeMagic {
         * match was found, null if the mime type is unknown, and false if the
         * mime type is known but no matches where found.
         *
-        * @param $extension string
-        * @param $mime string
+        * @param string $extension
+        * @param string $mime
         * @return bool|null
         */
        public function isMatchingExtension( $extension, $mime ) {
@@ -430,7 +430,7 @@ class MimeMagic {
         * Returns true if the mime type is known to represent an image format
         * supported by the PHP GD library.
         *
-        * @param $mime string
+        * @param string $mime
         *
         * @return bool
         */
@@ -458,6 +458,7 @@ class MimeMagic {
         *
         * @todo Be more accurate when using fancy mime detector plugins;
         *       right now this is the bare minimum getimagesize() list.
+        * @param string $extension
         * @return bool
         */
        function isRecognizableExtension( $extension ) {
@@ -493,10 +494,10 @@ class MimeMagic {
         * If $mime is "application/x-opc+zip" and isMatchingExtension( $ext, $mime )
         * gives true, return the result of guessTypesForExtension($ext).
         *
-        * @param string $mime the mime type, typically guessed from a file's content.
-        * @param string $ext the file extension, as taken from the file name
+        * @param string $mime The mime type, typically guessed from a file's content.
+        * @param string $ext The file extension, as taken from the file name
         *
-        * @return string the mime type
+        * @return string The mime type
         */
        public function improveTypeFromExtension( $mime, $ext ) {
                if ( $mime === 'unknown/unknown' ) {
@@ -535,12 +536,12 @@ class MimeMagic {
         * detection (namely XML based formats like XHTML or SVG, as well as ZIP
         * based formats like OPC/ODF files).
         *
-        * @param string $file the file to check
+        * @param string $file The file to check
         * @param string|bool $ext The file extension, or true (default) to extract it from the filename.
         *   Set it to false to ignore the extension. DEPRECATED! Set to false, use
         *   improveTypeFromExtension($mime, $ext) later to improve mime type.
         *
-        * @return string the mime type of $file
+        * @return string The mime type of $file
         */
        public function guessMimeType( $file, $ext = true ) {
                if ( $ext ) { // TODO: make $ext default to false. Or better, remove it.
@@ -855,7 +856,7 @@ class MimeMagic {
         *   Set it to false to ignore the extension. DEPRECATED! Set to false, use
         *   improveTypeFromExtension($mime, $ext) later to improve mime type.
         *
-        * @return string the mime type of $file
+        * @return string The mime type of $file
         */
        private function detectMimeType( $file, $ext = true ) {
                global $wgMimeDetectorCommand;
@@ -950,11 +951,11 @@ class MimeMagic {
         * @todo analyse file if need be
         * @todo look at multiple extension, separately and together.
         *
-        * @param string $path full path to the image file, in case we have to look at the contents
+        * @param string $path Full path to the image file, in case we have to look at the contents
         *        (if null, only the mime type is used to determine the media type code).
-        * @param string $mime mime type. If null it will be guessed using guessMimeType.
+        * @param string $mime Mime type. If null it will be guessed using guessMimeType.
         *
-        * @return (int?string?) a value to be used with the MEDIATYPE_xxx constants.
+        * @return string A value to be used with the MEDIATYPE_xxx constants.
         */
        function getMediaType( $path = null, $mime = null ) {
                if ( !$mime && !$path ) {
@@ -1040,6 +1041,7 @@ class MimeMagic {
         *
         * This function relies on the mapping defined by $this->mMediaTypes
         * @access private
+        * @param string $extMime
         * @return int|string
         */
        function findMediaType( $extMime ) {
@@ -1075,10 +1077,10 @@ class MimeMagic {
         * Get the MIME types that various versions of Internet Explorer would
         * detect from a chunk of the content.
         *
-        * @param string $fileName the file name (unused at present)
-        * @param string $chunk the first 256 bytes of the file
-        * @param string $proposed the MIME type proposed by the server
-        * @return Array
+        * @param string $fileName The file name (unused at present)
+        * @param string $chunk The first 256 bytes of the file
+        * @param string $proposed The MIME type proposed by the server
+        * @return array
         */
        public function getIEMimeTypes( $fileName, $chunk, $proposed ) {
                $ca = $this->getIEContentAnalyzer();
index ce585ce..78c4643 100644 (file)
@@ -45,8 +45,8 @@ class MWNamespace {
         * Special namespaces are defined in includes/Defines.php and have
         * a value below 0 (ex: NS_SPECIAL = -1 , NS_MEDIA = -2)
         *
-        * @param $index
-        * @param $method
+        * @param int $index
+        * @param string $method
         *
         * @throws MWException
         * @return bool
@@ -61,7 +61,7 @@ class MWNamespace {
        /**
         * Can pages in the given namespace be moved?
         *
-        * @param int $index namespace index
+        * @param int $index Namespace index
         * @return bool
         */
        public static function isMovable( $index ) {
@@ -80,7 +80,7 @@ class MWNamespace {
        /**
         * Is the given namespace is a subject (non-talk) namespace?
         *
-        * @param int $index namespace index
+        * @param int $index Namespace index
         * @return bool
         * @since 1.19
         */
@@ -101,7 +101,7 @@ class MWNamespace {
        /**
         * Is the given namespace a talk namespace?
         *
-        * @param int $index namespace index
+        * @param int $index Namespace index
         * @return bool
         */
        public static function isTalk( $index ) {
@@ -112,7 +112,7 @@ class MWNamespace {
        /**
         * Get the talk namespace index for a given namespace
         *
-        * @param int $index namespace index
+        * @param int $index Namespace index
         * @return int
         */
        public static function getTalk( $index ) {
@@ -145,8 +145,8 @@ class MWNamespace {
         * For talk namespaces, returns the subject (non-talk) namespace
         * For subject (non-talk) namespaces, returns the talk namespace
         *
-        * @param int $index namespace index
-        * @return int or null if no associated namespace could be found
+        * @param int $index Namespace index
+        * @return int|null If no associated namespace could be found
         */
        public static function getAssociated( $index ) {
                self::isMethodValidFor( $index, __METHOD__ );
@@ -163,7 +163,7 @@ class MWNamespace {
        /**
         * Returns whether the specified namespace exists
         *
-        * @param $index
+        * @param int $index
         *
         * @return bool
         * @since 1.19
@@ -210,7 +210,7 @@ class MWNamespace {
         * Returns array of all defined namespaces with their canonical
         * (English) names.
         *
-        * @param bool $rebuild rebuild namespace list (default = false). Used for testing.
+        * @param bool $rebuild Rebuild namespace list (default = false). Used for testing.
         *
         * @return array
         * @since 1.17
@@ -231,8 +231,8 @@ class MWNamespace {
        /**
         * Returns the canonical (English) name for a given index
         *
-        * @param int $index namespace index
-        * @return string or false if no canonical definition.
+        * @param int $index Namespace index
+        * @return string|false If no canonical definition.
         */
        public static function getCanonicalName( $index ) {
                $nslist = self::getCanonicalNamespaces();
@@ -247,7 +247,7 @@ class MWNamespace {
         * Returns the index for a given canonical name, or NULL
         * The input *must* be converted to lower case first
         *
-        * @param string $name namespace name
+        * @param string $name Namespace name
         * @return int
         */
        public static function getCanonicalIndex( $name ) {
@@ -287,7 +287,7 @@ class MWNamespace {
        /**
         * Can this namespace ever have a talk namespace?
         *
-        * @param int $index namespace index
+        * @param int $index Namespace index
         * @return bool
         */
        public static function canTalk( $index ) {
@@ -298,7 +298,7 @@ class MWNamespace {
         * Does this namespace contain content, for the purposes of calculating
         * statistics, etc?
         *
-        * @param int $index index to check
+        * @param int $index Index to check
         * @return bool
         */
        public static function isContent( $index ) {
@@ -309,7 +309,7 @@ class MWNamespace {
        /**
         * Can pages in a namespace be watched?
         *
-        * @param $index Int
+        * @param int $index
         * @return bool
         */
        public static function isWatchable( $index ) {
@@ -329,7 +329,7 @@ class MWNamespace {
 
        /**
         * Get a list of all namespace indices which are considered to contain content
-        * @return array of namespace indices
+        * @return array Array of namespace indices
         */
        public static function getContentNamespaces() {
                global $wgContentNamespaces;
@@ -347,7 +347,7 @@ class MWNamespace {
         * List all namespace indices which are considered subject, aka not a talk
         * or special namespace. See also MWNamespace::isSubject
         *
-        * @return array of namespace indices
+        * @return array Array of namespace indices
         */
        public static function getSubjectNamespaces() {
                return array_filter(
@@ -360,7 +360,7 @@ class MWNamespace {
         * List all namespace indices which are considered talks, aka not a subject
         * or special namespace. See also MWNamespace::isTalk
         *
-        * @return array of namespace indices
+        * @return array Array of namespace indices
         */
        public static function getTalkNamespaces() {
                return array_filter(
@@ -425,7 +425,7 @@ class MWNamespace {
         *
         * @since 1.21
         * @param int $index Index to check
-        * @return null|string default model name for the given namespace, if set
+        * @return null|string Default model name for the given namespace, if set
         */
        public static function getNamespaceContentModel( $index ) {
                global $wgNamespaceContentModels;
index 3860b8e..c783fd3 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * Standard output handler for use with ob_start
  *
- * @param $s string
+ * @param string $s
  *
  * @return string
  */
@@ -94,7 +94,7 @@ function wfRequestExtension() {
  * Handler that compresses data with gzip if allowed by the Accept header.
  * Unlike ob_gzhandler, it works for HEAD requests too.
  *
- * @param $s string
+ * @param string $s
  *
  * @return string
  */
@@ -145,7 +145,7 @@ function wfGzipHandler( $s ) {
 /**
  * Mangle flash policy tags which open up the site to XSS attacks.
  *
- * @param $s string
+ * @param string $s
  *
  * @return string
  */
@@ -161,7 +161,7 @@ function wfMangleFlashPolicy( $s ) {
 /**
  * Add a Content-Length header if possible. This makes it cooperate with squid better.
  *
- * @param $length int
+ * @param int $length
  */
 function wfDoContentLength( $length ) {
        if ( !headers_sent() && isset( $_SERVER['SERVER_PROTOCOL'] ) && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) {
@@ -172,7 +172,7 @@ function wfDoContentLength( $length ) {
 /**
  * Replace the output with an error if the HTML is not valid
  *
- * @param $s string
+ * @param string $s
  *
  * @return string
  */
index 02a883a..afc0227 100644 (file)
@@ -32,7 +32,7 @@ abstract class PageQueryPage extends QueryPage {
         * like page existence and information for stub color and redirect hints.
         * This should be done for live data and cached data.
         *
-        * @param $db DatabaseBase connection
+        * @param DatabaseBase $db
         * @param ResultWrapper $res
         */
        public function preprocessResults( $db, $res ) {
index 747d2c1..33bf067 100644 (file)
@@ -244,7 +244,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Set the offset from an other source than the request
         *
-        * @param $offset Int|String
+        * @param int|string $offset
         */
        function setOffset( $offset ) {
                $this->mOffset = $offset;
@@ -255,7 +255,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         *
         * Verifies limit is between 1 and 5000
         *
-        * @param $limit Int|String
+        * @param int|string $limit
         */
        function setLimit( $limit ) {
                $limit = (int)$limit;
@@ -282,7 +282,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * in the result or not. By default this is not the case, but when the
         * offset is user-supplied this might be wanted.
         *
-        * @param $include bool
+        * @param bool $include
         */
        public function setIncludeOffset( $include ) {
                $this->mIncludeOffset = $include;
@@ -292,10 +292,10 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Extract some useful data from the result object for use by
         * the navigation bar, put it into $this
         *
-        * @param $isFirst bool: False if there are rows before those fetched (i.e.
+        * @param bool $isFirst False if there are rows before those fetched (i.e.
         *     if a "previous" link would make sense)
-        * @param $limit Integer: exact query limit
-        * @param $res ResultWrapper
+        * @param int $limit Exact query limit
+        * @param ResultWrapper $res
         */
        function extractResultInfo( $isFirst, $limit, ResultWrapper $res ) {
                $numRows = $res->numRows();
@@ -349,7 +349,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Get some text to go in brackets in the "function name" part of the SQL comment
         *
-        * @return String
+        * @return string
         */
        function getSqlComment() {
                return get_class( $this );
@@ -359,9 +359,9 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Do a query with specified parameters, rather than using the object
         * context
         *
-        * @param string $offset index offset, inclusive
-        * @param $limit Integer: exact query limit
-        * @param $descending Boolean: query direction, false for ascending, true for descending
+        * @param string $offset Index offset, inclusive
+        * @param int $limit Exact query limit
+        * @param bool $descending Query direction, false for ascending, true for descending
         * @return ResultWrapper
         */
        public function reallyDoQuery( $offset, $limit, $descending ) {
@@ -372,9 +372,9 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Build variables to use by the database wrapper.
         *
-        * @param string $offset index offset, inclusive
-        * @param $limit Integer: exact query limit
-        * @param $descending Boolean: query direction, false for ascending, true for descending
+        * @param string $offset Index offset, inclusive
+        * @param int $limit Exact query limit
+        * @param bool $descending Query direction, false for ascending, true for descending
         * @return array
         */
        protected function buildQueryInfo( $offset, $limit, $descending ) {
@@ -407,7 +407,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Pre-process results; useful for performing batch existence checks, etc.
         *
-        * @param $result ResultWrapper
+        * @param ResultWrapper $result
         */
        protected function preprocessResults( $result ) {}
 
@@ -415,7 +415,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Get the formatted result list. Calls getStartBody(), formatRow() and
         * getEndBody(), concatenates the results and returns them.
         *
-        * @return String
+        * @return string
         */
        public function getBody() {
                if ( !$this->mQueryDone ) {
@@ -455,11 +455,11 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Make a self-link
         *
-        * @param string $text text displayed on the link
-        * @param array $query associative array of parameter to be in the query string
-        * @param string $type value of the "rel" attribute
+        * @param string $text Text displayed on the link
+        * @param array $query Associative array of parameter to be in the query string
+        * @param string $type Value of the "rel" attribute
         *
-        * @return String: HTML fragment
+        * @return string HTML fragment
         */
        function makeLink( $text, array $query = null, $type = null ) {
                if ( $query === null ) {
@@ -497,7 +497,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Hook into getBody(), allows text to be inserted at the start. This
         * will be called even if there are no rows in the result set.
         *
-        * @return String
+        * @return string
         */
        protected function getStartBody() {
                return '';
@@ -506,7 +506,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Hook into getBody() for the end of the list
         *
-        * @return String
+        * @return string
         */
        protected function getEndBody() {
                return '';
@@ -516,7 +516,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Hook into getBody(), for the bit between the start and the
         * end when there are no rows
         *
-        * @return String
+        * @return string
         */
        protected function getEmptyBody() {
                return '';
@@ -546,7 +546,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Get the number of rows in the result set
         *
-        * @return Integer
+        * @return int
         */
        function getNumRows() {
                if ( !$this->mQueryDone ) {
@@ -558,7 +558,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Get a URL query array for the prev, next, first and last links.
         *
-        * @return Array
+        * @return array
         */
        function getPagingQueries() {
                if ( !$this->mQueryDone ) {
@@ -597,7 +597,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Returns whether to show the "navigation bar"
         *
-        * @return Boolean
+        * @return bool
         */
        function isNavigationBarShown() {
                if ( !$this->mQueryDone ) {
@@ -613,9 +613,9 @@ abstract class IndexPager extends ContextSource implements Pager {
         * $linkTexts will be used. Both $linkTexts and $disabledTexts are arrays
         * of HTML.
         *
-        * @param $linkTexts Array
-        * @param $disabledTexts Array
-        * @return Array
+        * @param array $linkTexts
+        * @param array $disabledTexts
+        * @return array
         */
        function getPagingLinks( $linkTexts, $disabledTexts = array() ) {
                $queries = $this->getPagingQueries();
@@ -675,7 +675,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         *    options => option array
         *    join_conds => JOIN conditions
         *
-        * @return Array
+        * @return array
         */
        abstract function getQueryInfo();
 
@@ -689,7 +689,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Needless to say, it's really not a good idea to use a non-unique index
         * for this!  That won't page right.
         *
-        * @return string|Array
+        * @return string|array
         */
        abstract function getIndexField();
 
@@ -707,7 +707,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * page_len,page_id avoids temp tables (given a page_len index). This would
         * also work if page_id was non-unique but we had a page_len,page_id index.
         *
-        * @return Array
+        * @return array
         */
        protected function getExtraSortFields() {
                return array();
@@ -730,7 +730,7 @@ abstract class IndexPager extends ContextSource implements Pager {
         * particular instantiation, which is a single value.  This is the set of
         * all defaults for the class.
         *
-        * @return Boolean
+        * @return bool
         */
        protected function getDefaultDirections() {
                return false;
@@ -747,7 +747,7 @@ abstract class AlphabeticPager extends IndexPager {
         * Shamelessly stolen bits from ReverseChronologicalPager,
         * didn't want to do class magic as may be still revamped
         *
-        * @return String HTML
+        * @return string HTML
         */
        function getNavigationBar() {
                if ( !$this->isNavigationBarShown() ) {
@@ -816,7 +816,7 @@ abstract class AlphabeticPager extends IndexPager {
         * array whose keys must exactly match the keys of the array returned
         * by getIndexField(), and whose values are message keys.
         *
-        * @return Array
+        * @return array
         */
        protected function getOrderTypeMessages() {
                return null;
@@ -1024,7 +1024,7 @@ abstract class TablePager extends IndexPager {
        /**
         * @protected
         * @param stdClass $row
-        * @return String HTML
+        * @return string HTML
         */
        function formatRow( $row ) {
                $this->mCurrentRow = $row; // In case formatValue etc need to know
@@ -1052,8 +1052,8 @@ abstract class TablePager extends IndexPager {
         *
         * @protected
         *
-        * @param $row Object: the database result row
-        * @return String
+        * @param object $row The database result row
+        * @return string
         */
        function getRowClass( $row ) {
                return '';
@@ -1064,8 +1064,8 @@ abstract class TablePager extends IndexPager {
         *
         * @protected
         *
-        * @param $row Object: the database result row
-        * @return Array of attribute => value
+        * @param object $row The database result row
+        * @return array Array of attribute => value
         */
        function getRowAttrs( $row ) {
                $class = $this->getRowClass( $row );
@@ -1086,7 +1086,7 @@ abstract class TablePager extends IndexPager {
         *
         * @param string $field The column
         * @param string $value The cell contents
-        * @return Array of attr => value
+        * @return array Array of attr => value
         */
        function getCellAttrs( $field, $value ) {
                return array( 'class' => 'TablePager_col_' . $field );
@@ -1126,7 +1126,7 @@ abstract class TablePager extends IndexPager {
 
        /**
         * A navigation bar with images
-        * @return String HTML
+        * @return string HTML
         */
        public function getNavigationBar() {
                global $wgStylePath;
@@ -1184,8 +1184,8 @@ abstract class TablePager extends IndexPager {
        /**
         * Get a "<select>" element which has options for each of the allowed limits
         *
-        * @param $attribs String: Extra attributes to set
-        * @return String: HTML fragment
+        * @param string $attribs Extra attributes to set
+        * @return string HTML fragment
         */
        public function getLimitSelect( $attribs = array() ) {
                $select = new XmlSelect( 'limit', false, $this->mLimit );
@@ -1232,8 +1232,8 @@ abstract class TablePager extends IndexPager {
         * Resubmits all defined elements of the query string, except for a
         * blacklist, passed in the $blacklist parameter.
         *
-        * @param array $blacklist parameters from the request query which should not be resubmitted
-        * @return String: HTML fragment
+        * @param array $blacklist Parameters from the request query which should not be resubmitted
+        * @return string HTML fragment
         */
        function getHiddenFields( $blacklist = array() ) {
                $blacklist = (array)$blacklist;
@@ -1251,7 +1251,7 @@ abstract class TablePager extends IndexPager {
        /**
         * Get a form containing a limit selection dropdown
         *
-        * @return String: HTML fragment
+        * @return string HTML fragment
         */
        function getLimitForm() {
                global $wgScript;
@@ -1285,7 +1285,7 @@ abstract class TablePager extends IndexPager {
         * Return true if the named field should be sortable by the UI, false
         * otherwise
         *
-        * @param $field String
+        * @param string $field
         */
        abstract function isFieldSortable( $field );
 
@@ -1298,8 +1298,8 @@ abstract class TablePager extends IndexPager {
         *
         * @protected
         *
-        * @param string $name the database field name
-        * @param string $value the value retrieved from the database
+        * @param string $name The database field name
+        * @param string $value The value retrieved from the database
         */
        abstract function formatValue( $name, $value );
 
@@ -1317,7 +1317,7 @@ abstract class TablePager extends IndexPager {
         * field name, for use in the table header. The description should be plain
         * text, it will be HTML-escaped later.
         *
-        * @return Array
+        * @return array
         */
        abstract function getFieldNames();
 }
index d367e4d..e5979b8 100644 (file)
@@ -82,10 +82,10 @@ class PathRouter {
         * This is in a separate method so that add() can handle the difference between
         * a single string $path and an array() $path that contains multiple path
         * patterns each with an associated $key to pass on.
-        * @param $path string
-        * @param $params array
-        * @param $options array
-        * @param $key null|string
+        * @param string $path
+        * @param array $params
+        * @param array $options
+        * @param null|string $key
         */
        protected function doAdd( $path, $params, $options, $key = null ) {
                // Make sure all paths start with a /
@@ -170,9 +170,9 @@ class PathRouter {
        /**
         * Add a new path pattern to the path router with the strict option on
         * @see self::add
-        * @param $path string|array
-        * @param $params array
-        * @param $options array
+        * @param string|array $path
+        * @param array $params
+        * @param array $options
         */
        public function addStrict( $path, $params = array(), $options = array() ) {
                $options['strict'] = true;
@@ -192,7 +192,7 @@ class PathRouter {
        }
 
        /**
-        * @param $pattern object
+        * @param object $pattern
         * @return float|int
         */
        protected static function makeWeight( $pattern ) {
@@ -233,7 +233,7 @@ class PathRouter {
         * Parse a path and return the query matches for the path
         *
         * @param string $path The path to parse
-        * @return Array The array of matches for the path
+        * @return array The array of matches for the path
         */
        public function parse( $path ) {
                // Make sure our patterns are sorted by weight so the most specific
@@ -257,8 +257,8 @@ class PathRouter {
        }
 
        /**
-        * @param $path string
-        * @param $pattern string
+        * @param string $path
+        * @param string $pattern
         * @return array|null
         */
        protected static function extractTitle( $path, $pattern ) {
@@ -363,7 +363,7 @@ class PathRouterPatternReplacer {
         * We do this inside of a replacement callback because after replacement we can't tell the
         * difference between a $1 that was not replaced and a $1 that was part of
         * the content a $1 was replaced with.
-        * @param $value string
+        * @param string $value
         * @return string
         */
        public function replace( $value ) {
@@ -376,7 +376,7 @@ class PathRouterPatternReplacer {
        }
 
        /**
-        * @param $m array
+        * @param array $m
         * @return string
         */
        protected function callback( $m ) {
index a9179eb..c5dd698 100644 (file)
@@ -31,10 +31,10 @@ abstract class PrefixSearch {
         * Do a prefix search of titles and return a list of matching page names.
         * @deprecated: Since 1.23, use TitlePrefixSearch or StringPrefixSearch classes
         *
-        * @param $search String
-        * @param $limit Integer
-        * @param array $namespaces used if query is not explicitly prefixed
-        * @return Array of strings
+        * @param string $search
+        * @param int $limit
+        * @param array $namespaces Used if query is not explicitly prefixed
+        * @return array Array of strings
         */
        public static function titleSearch( $search, $limit, $namespaces = array() ) {
                $prefixSearch = new StringPrefixSearch;
@@ -44,10 +44,10 @@ abstract class PrefixSearch {
        /**
         * Do a prefix search of titles and return a list of matching page names.
         *
-        * @param $search String
-        * @param $limit Integer
-        * @param array $namespaces used if query is not explicitly prefixed
-        * @return Array of strings or Title objects
+        * @param string $search
+        * @param int $limit
+        * @param array $namespaces Used if query is not explicitly prefixed
+        * @return array Array of strings or Title objects
         */
        public function search( $search, $limit, $namespaces = array() ) {
                $search = trim( $search );
@@ -82,8 +82,8 @@ abstract class PrefixSearch {
 
        /**
         * Do a prefix search for all possible variants of the prefix
-        * @param $search String
-        * @param $limit Integer
+        * @param string $search
+        * @param int $limit
         * @param array $namespaces
         *
         * @return array
@@ -135,10 +135,10 @@ abstract class PrefixSearch {
 
        /**
         * Do a prefix search of titles and return a list of matching page names.
-        * @param $namespaces Array
-        * @param $search String
-        * @param $limit Integer
-        * @return Array of strings
+        * @param array $namespaces
+        * @param string $search
+        * @param int $limit
+        * @return array Array of strings
         */
        protected function searchBackend( $namespaces, $search, $limit ) {
                if ( count( $namespaces ) == 1 ) {
@@ -159,9 +159,9 @@ abstract class PrefixSearch {
        /**
         * Prefix search special-case for Special: namespace.
         *
-        * @param string $search term
-        * @param $limit Integer: max number of items to return
-        * @return Array
+        * @param string $search Term
+        * @param int $limit Max number of items to return
+        * @return array
         */
        protected function specialSearch( $search, $limit ) {
                global $wgContLang;
@@ -213,10 +213,10 @@ abstract class PrefixSearch {
         * be automatically capitalized by Title::secureAndSpit()
         * later on depending on $wgCapitalLinks)
         *
-        * @param array $namespaces namespaces to search in
-        * @param string $search term
-        * @param $limit Integer: max number of items to return
-        * @return Array of Title objects
+        * @param array $namespaces Namespaces to search in
+        * @param string $search Term
+        * @param int $limit Max number of items to return
+        * @return array Array of Title objects
         */
        protected function defaultSearchBackend( $namespaces, $search, $limit ) {
                $ns = array_shift( $namespaces ); // support only one namespace
@@ -246,8 +246,8 @@ abstract class PrefixSearch {
        /**
         * Validate an array of numerical namespace indexes
         *
-        * @param $namespaces Array
-        * @return Array (default: contains only NS_MAIN)
+        * @param array $namespaces
+        * @return array (default: contains only NS_MAIN)
         */
        protected function validateNamespaces( $namespaces ) {
                global $wgContLang;
index bcb88e9..ea359aa 100644 (file)
@@ -141,7 +141,7 @@ class ProtectionForm {
        /**
         * Get the expiry time for a given action, by combining the relevant inputs.
         *
-        * @param $action string
+        * @param string $action
         *
         * @return string 14-char timestamp or "infinity", or false if the input was invalid
         */
@@ -192,7 +192,7 @@ class ProtectionForm {
        /**
         * Show the input form with optional error message
         *
-        * @param string $err error message or null if there's no error
+        * @param string $err Error message or null if there's no error
         */
        function show( $err = null ) {
                global $wgOut;
@@ -247,7 +247,7 @@ class ProtectionForm {
        /**
         * Save submitted protection form
         *
-        * @return Boolean: success
+        * @return bool Success
         */
        function save() {
                global $wgRequest, $wgUser, $wgOut;
@@ -322,7 +322,7 @@ class ProtectionForm {
        /**
         * Build the input form
         *
-        * @return String: HTML form
+        * @return string HTML form
         */
        function buildForm() {
                global $wgUser, $wgLang, $wgOut;
@@ -537,9 +537,9 @@ class ProtectionForm {
        /**
         * Build protection level selector
         *
-        * @param string $action action to protect
-        * @param string $selected current protection level
-        * @return String: HTML fragment
+        * @param string $action Action to protect
+        * @param string $selected Current protection level
+        * @return string HTML fragment
         */
        function buildSelector( $action, $selected ) {
                global $wgUser;
@@ -569,8 +569,8 @@ class ProtectionForm {
        /**
         * Prepare the label for a protection selector option
         *
-        * @param string $permission permission required
-        * @return String
+        * @param string $permission Permission required
+        * @return string
         */
        private function getOptionLabel( $permission ) {
                if ( $permission == '' ) {
@@ -604,7 +604,7 @@ class ProtectionForm {
        /**
         * Show protection long extracts for this page
         *
-        * @param $out OutputPage
+        * @param OutputPage $out
         * @access private
         */
        function showLogExtract( &$out ) {
index 29bbd52..793ac55 100644 (file)
@@ -359,6 +359,7 @@ abstract class QueryPage extends SpecialPage {
 
        /**
         * Get a DB connection to be used for slow recache queries
+        * @return DatabaseBase
         */
        function getRecacheDB() {
                return wfGetDB( DB_SLAVE, array( $this->getName(), 'QueryPage::recache', 'vslow' ) );
@@ -648,7 +649,7 @@ abstract class QueryPage extends SpecialPage {
        }
 
        /**
-        * @param $offset
+        * @param int $offset
         * @return string
         */
        function openList( $offset ) {
index 1b865bb..506ac4c 100644 (file)
@@ -33,8 +33,8 @@ abstract class RevisionListBase extends ContextSource {
 
        /**
         * Construct a revision list for a given title
-        * @param $context IContextSource
-        * @param $title Title
+        * @param IContextSource $context
+        * @param Title $title
         */
        function __construct( IContextSource $context, Title $title ) {
                $this->setContext( $context );
@@ -43,7 +43,7 @@ abstract class RevisionListBase extends ContextSource {
 
        /**
         * Select items only where the ID is any of the specified values
-        * @param $ids Array
+        * @param array $ids
         */
        function filterByIds( array $ids ) {
                $this->ids = $ids;
@@ -72,7 +72,7 @@ abstract class RevisionListBase extends ContextSource {
 
        /**
         * Start iteration. This must be called before current() or next().
-        * @return First list item
+        * @return Revision First list item
         */
        public function reset() {
                if ( !$this->res ) {
@@ -86,6 +86,7 @@ abstract class RevisionListBase extends ContextSource {
 
        /**
         * Get the current list item, or false if we are at the end
+        * @return Revision
         */
        public function current() {
                return $this->current;
@@ -93,6 +94,7 @@ abstract class RevisionListBase extends ContextSource {
 
        /**
         * Move the iteration pointer to the next list item, and return it.
+        * @return Revision
         */
        public function next() {
                $this->res->next();
@@ -114,13 +116,13 @@ abstract class RevisionListBase extends ContextSource {
 
        /**
         * Do the DB query to iterate through the objects.
-        * @param $db DatabaseBase object to use for the query
+        * @param DatabaseBase $db DatabaseBase object to use for the query
         */
        abstract public function doQuery( $db );
 
        /**
         * Create an item object from a DB result row
-        * @param $row stdclass
+        * @param object $row
         */
        abstract public function newItem( $row );
 }
@@ -136,8 +138,8 @@ abstract class RevisionItemBase {
        var $row;
 
        /**
-        * @param $list RevisionListBase
-        * @param $row DB result row
+        * @param RevisionListBase $list
+        * @param object $row DB result row
         */
        public function __construct( $list, $row ) {
                $this->list = $list;
@@ -182,7 +184,7 @@ abstract class RevisionItemBase {
 
        /**
         * Get the ID, as it would appear in the ids URL parameter
-        * @return
+        * @return int
         */
        public function getId() {
                $field = $this->getIdField();
@@ -191,7 +193,7 @@ abstract class RevisionItemBase {
 
        /**
         * Get the date, formatted in user's language
-        * @return String
+        * @return string
         */
        public function formatDate() {
                return $this->list->getLanguage()->userDate( $this->getTimestamp(),
@@ -200,7 +202,7 @@ abstract class RevisionItemBase {
 
        /**
         * Get the time, formatted in user's language
-        * @return String
+        * @return string
         */
        public function formatTime() {
                return $this->list->getLanguage()->userTime( $this->getTimestamp(),
@@ -209,7 +211,7 @@ abstract class RevisionItemBase {
 
        /**
         * Get the timestamp in MW 14-char form
-        * @return Mixed
+        * @return mixed
         */
        public function getTimestamp() {
                $field = $this->getTimestampField();
@@ -257,7 +259,7 @@ class RevisionList extends RevisionListBase {
        }
 
        /**
-        * @param $db DatabaseBase
+        * @param DatabaseBase $db
         * @return mixed
         */
        public function doQuery( $db ) {
index 245714d..59ac046 100644 (file)
@@ -1069,7 +1069,7 @@ class Sanitizer {
         *   HTML5 definition of id attribute
         *
         * @param string $id id to escape
-        * @param $options Mixed: string or array of strings (default is array()):
+        * @param string|array $options String or array of strings (default is array()):
         *   'noninitial': This is a non-initial fragment of an id, not a full id,
         *       so don't pay attention if the first character isn't valid at the
         *       beginning of an id.  Only matters if $wgExperimentalHtmlIds is
@@ -1136,7 +1136,7 @@ class Sanitizer {
         * This allows (generally harmless) entities like &#160; to survive.
         *
         * @param string $html HTML to escape
-        * @return string: escaped input
+        * @return string Escaped input
         */
        static function escapeHtmlAllowEntities( $html ) {
                $html = Sanitizer::decodeCharReferences( $html );
index fa871fe..d750ca8 100644 (file)
@@ -174,7 +174,7 @@ class SiteConfiguration {
         * @param string $suffix The suffix of the wiki in question.
         * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
         * @param array $wikiTags The tags assigned to the wiki.
-        * @return Mixed the value of the setting requested.
+        * @return mixed The value of the setting requested.
         */
        public function get( $settingName, $wiki, $suffix = null, $params = array(), $wikiTags = array() ) {
                $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
@@ -186,8 +186,8 @@ class SiteConfiguration {
         *
         * @param string $settingName ID of the setting name to retrieve.
         * @param string $wiki Wiki ID of the wiki in question.
-        * @param array $params array of parameters.
-        * @return Mixed the value of the setting requested.
+        * @param array $params Array of parameters.
+        * @return mixed The value of the setting requested.
         */
        protected function getSetting( $settingName, $wiki, /*array*/ $params ) {
                $retval = null;
@@ -260,9 +260,9 @@ class SiteConfiguration {
         * Type-safe string replace; won't do replacements on non-strings
         * private?
         *
-        * @param $from
-        * @param $to
-        * @param $in
+        * @param string $from
+        * @param string $to
+        * @param string|array $in
         * @return string
         */
        function doReplace( $from, $to, $in ) {
@@ -284,7 +284,7 @@ class SiteConfiguration {
         * @param string $suffix The suffix of the wiki in question.
         * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
         * @param array $wikiTags The tags assigned to the wiki.
-        * @return Array Array of settings requested.
+        * @return array Array of settings requested.
         */
        public function getAll( $wiki, $suffix = null, $params = array(), $wikiTags = array() ) {
                $params = $this->mergeParams( $wiki, $suffix, $params, $wikiTags );
@@ -359,9 +359,9 @@ class SiteConfiguration {
        }
 
        /**
-        * @param $setting string
-        * @param $wiki string
-        * @param $params array
+        * @param string $setting
+        * @param string $wiki
+        * @param array $params
         */
        public function extractGlobalSetting( $setting, $wiki, $params ) {
                $value = $this->getSetting( $setting, $wiki, $params );
@@ -398,7 +398,7 @@ class SiteConfiguration {
         * See the documentation of self::$siteParamsCallback for more in-depth
         * documentation about this function
         *
-        * @param $wiki String
+        * @param string $wiki
         * @return array
         */
        protected function getWikiParams( $wiki ) {
@@ -436,7 +436,7 @@ class SiteConfiguration {
         * @param string $wiki Wiki ID of the wiki in question.
         * @param string $suffix The suffix of the wiki in question.
         * @param array $params List of parameters. $.'key' is replaced by $value in
-        *                all returned data.
+        *   all returned data.
         * @param array $wikiTags The tags assigned to the wiki.
         * @return array
         */
@@ -464,7 +464,7 @@ class SiteConfiguration {
 
        /**
         * Work out the site and language name from a database name
-        * @param $db
+        * @param string $db
         *
         * @return array
         */
@@ -499,7 +499,7 @@ class SiteConfiguration {
         *
         * @param string $wiki
         * @param array|string $settings A setting name or array of setting names
-        * @return Array|mixed Array if $settings is an array, otherwise the value
+        * @return array|mixed Array if $settings is an array, otherwise the value
         * @throws MWException
         * @since 1.21
         */
@@ -555,7 +555,7 @@ class SiteConfiguration {
 
        /**
         * Returns true if the given vhost is handled locally.
-        * @param $vhost String
+        * @param string $vhost
         * @return bool
         */
        public function isLocalVHost( $vhost ) {
@@ -568,7 +568,7 @@ class SiteConfiguration {
         * PHP's array_merge_recursive() merges ANY duplicate values into arrays,
         * which is not fun
         *
-        * @param $array1 array
+        * @param array $array1
         *
         * @return array
         */
index 7169b2e..4685c3e 100644 (file)
@@ -34,7 +34,7 @@ class SiteStats {
        }
 
        /**
-        * @param $recache bool
+        * @param bool $recache
         */
        static function load( $recache = false ) {
                if ( self::$loaded && !$recache ) {
@@ -55,7 +55,7 @@ class SiteStats {
        }
 
        /**
-        * @return Bool|ResultWrapper
+        * @return bool|ResultWrapper
         */
        static function loadAndLazyInit() {
                wfDebug( __METHOD__ . ": reading site_stats from slave\n" );
@@ -86,8 +86,8 @@ class SiteStats {
        }
 
        /**
-        * @param $db DatabaseBase
-        * @return Bool|ResultWrapper
+        * @param DatabaseBase $db
+        * @return bool|ResultWrapper
         */
        static function doLoad( $db ) {
                return $db->selectRow( 'site_stats', array(
@@ -161,7 +161,7 @@ class SiteStats {
        /**
         * Find the number of users in a given user group.
         * @param string $group name of group
-        * @return Integer
+        * @return int
         */
        static function numberingroup( $group ) {
                if ( !isset( self::$groupMemberCounts[$group] ) ) {
@@ -199,7 +199,7 @@ class SiteStats {
        }
 
        /**
-        * @param $ns int
+        * @param int $ns
         *
         * @return int
         */
@@ -223,7 +223,7 @@ class SiteStats {
         *
         * Checks only fields which are filled by SiteStatsInit::refresh.
         *
-        * @param $row
+        * @param bool|object $row
         *
         * @return bool
         */
@@ -264,7 +264,7 @@ class SiteStatsInit {
 
        /**
         * Constructor
-        * @param $database Boolean or DatabaseBase:
+        * @param bool|DatabaseBase $database
         * - Boolean: whether to use the master DB
         * - DatabaseBase: database connection to use
         */
@@ -278,7 +278,7 @@ class SiteStatsInit {
 
        /**
         * Count the total number of edits
-        * @return Integer
+        * @return int
         */
        public function edits() {
                $this->mEdits = $this->db->selectField( 'revision', 'COUNT(*)', '', __METHOD__ );
@@ -288,7 +288,7 @@ class SiteStatsInit {
 
        /**
         * Count pages in article space(s)
-        * @return Integer
+        * @return int
         */
        public function articles() {
                global $wgArticleCountMethod;
@@ -318,7 +318,7 @@ class SiteStatsInit {
 
        /**
         * Count total pages
-        * @return Integer
+        * @return int
         */
        public function pages() {
                $this->mPages = $this->db->selectField( 'page', 'COUNT(*)', '', __METHOD__ );
@@ -327,7 +327,7 @@ class SiteStatsInit {
 
        /**
         * Count total users
-        * @return Integer
+        * @return int
         */
        public function users() {
                $this->mUsers = $this->db->selectField( 'user', 'COUNT(*)', '', __METHOD__ );
@@ -336,7 +336,7 @@ class SiteStatsInit {
 
        /**
         * Count views
-        * @return Integer
+        * @return int
         */
        public function views() {
                $this->mViews = $this->db->selectField( 'page', 'SUM(page_counter)', '', __METHOD__ );
@@ -345,7 +345,7 @@ class SiteStatsInit {
 
        /**
         * Count total files
-        * @return Integer
+        * @return int
         */
        public function files() {
                $this->mFiles = $this->db->selectField( 'image', 'COUNT(*)', '', __METHOD__ );
@@ -356,7 +356,7 @@ class SiteStatsInit {
         * Do all updates and commit them. More or less a replacement
         * for the original initStats, but without output.
         *
-        * @param $database DatabaseBase|bool
+        * @param DatabaseBase|bool $database
         * - Boolean: whether to use the master DB
         * - DatabaseBase: database connection to use
         * @param array $options of options, may contain the following values
index f359a1c..b186447 100644 (file)
@@ -101,7 +101,7 @@ class SkinTemplate extends Skin {
        /**
         * Add specific styles for this skin
         *
-        * @param $out OutputPage
+        * @param OutputPage $out
         */
        function setupSkinUserCss( OutputPage $out ) {
                $out->addModuleStyles( array(
@@ -116,9 +116,9 @@ class SkinTemplate extends Skin {
         * and eventually it spits out some HTML. Should have interface
         * roughly equivalent to PHPTAL 0.7.
         *
-        * @param $classname String
-        * @param string $repository subdirectory where we keep template files
-        * @param $cache_dir string
+        * @param string $classname
+        * @param string $repository Subdirectory where we keep template files
+        * @param string $cache_dir
         * @return QuickTemplate
         * @private
         */
@@ -239,7 +239,7 @@ class SkinTemplate extends Skin {
        /**
         * initialize various variables and generate the template
         *
-        * @param $out OutputPage
+        * @param OutputPage $out
         */
        function outputPage( OutputPage $out = null ) {
                wfProfileIn( __METHOD__ );
@@ -277,7 +277,7 @@ class SkinTemplate extends Skin {
         * initialize various variables and generate the template
         *
         * @since 1.23
-        * @return QuickTemplate the template to be executed by outputPage
+        * @return QuickTemplate The template to be executed by outputPage
         */
        protected function prepareQuickTemplate() {
                global $wgContLang, $wgScript, $wgStylePath,
@@ -606,7 +606,7 @@ class SkinTemplate extends Skin {
         * an error object of the appropriate type.
         * For the base class, assume strings all around.
         *
-        * @param $str Mixed
+        * @param string $str
         * @private
         */
        function printOrError( $str ) {
@@ -774,11 +774,11 @@ class SkinTemplate extends Skin {
        /**
         * Builds an array with tab definition
         *
-        * @param Title $title page where the tab links to
-        * @param string|array $message message key or an array of message keys (will fall back)
-        * @param boolean $selected display the tab as selected
-        * @param string $query query string attached to tab URL
-        * @param boolean $checkEdit check if $title exists and mark with .new if one doesn't
+        * @param Title $title page Where the tab links to
+        * @param string|array $message Message key or an array of message keys (will fall back)
+        * @param bool $selected Display the tab as selected
+        * @param string $query Query string attached to tab URL
+        * @param bool $checkEdit Check if $title exists and mark with .new if one doesn't
         *
         * @return array
         */
@@ -1380,8 +1380,8 @@ abstract class QuickTemplate {
 
        /**
         * Sets the value $value to $name
-        * @param $name
-        * @param $value
+        * @param string $name
+        * @param mixed $value
         */
        public function set( $name, $value ) {
                $this->data[$name] = $value;
@@ -1403,15 +1403,15 @@ abstract class QuickTemplate {
        }
 
        /**
-        * @param $name
-        * @param $value
+        * @param string $name
+        * @param mixed $value
         */
        public function setRef( $name, &$value ) {
                $this->data[$name] =& $value;
        }
 
        /**
-        * @param $t
+        * @param MediaWiki_I18N $t
         */
        public function setTranslator( &$t ) {
                $this->translator = &$t;
@@ -1425,6 +1425,8 @@ abstract class QuickTemplate {
 
        /**
         * @private
+        * @param string $str
+        * @return string
         */
        function text( $str ) {
                echo htmlspecialchars( $this->data[$str] );
@@ -1432,6 +1434,8 @@ abstract class QuickTemplate {
 
        /**
         * @private
+        * @param string $str
+        * @return string
         */
        function html( $str ) {
                echo $this->data[$str];
@@ -1439,6 +1443,8 @@ abstract class QuickTemplate {
 
        /**
         * @private
+        * @param string $str
+        * @return string
         */
        function msg( $str ) {
                echo htmlspecialchars( $this->translator->translate( $str ) );
@@ -1446,6 +1452,8 @@ abstract class QuickTemplate {
 
        /**
         * @private
+        * @param string $str
+        * @return string
         */
        function msgHtml( $str ) {
                echo $this->translator->translate( $str );
@@ -1454,6 +1462,8 @@ abstract class QuickTemplate {
        /**
         * An ugly, ugly hack.
         * @private
+        * @param string $str
+        * @return string
         */
        function msgWiki( $str ) {
                global $wgOut;
@@ -1464,6 +1474,7 @@ abstract class QuickTemplate {
 
        /**
         * @private
+        * @param string $str
         * @return bool
         */
        function haveData( $str ) {
@@ -1473,6 +1484,7 @@ abstract class QuickTemplate {
        /**
         * @private
         *
+        * @param string $str
         * @return bool
         */
        function haveMsg( $str ) {
@@ -1483,7 +1495,7 @@ abstract class QuickTemplate {
        /**
         * Get the Skin object related to this object
         *
-        * @return Skin object
+        * @return Skin
         */
        public function getSkin() {
                return $this->data['skin'];
@@ -1493,7 +1505,7 @@ abstract class QuickTemplate {
         * Fetch the output of a QuickTemplate and return it
         *
         * @since 1.23
-        * @return String
+        * @return string
         */
        public function getHTML() {
                ob_start();
@@ -1514,7 +1526,7 @@ abstract class BaseTemplate extends QuickTemplate {
        /**
         * Get a Message object with its context set
         *
-        * @param string $name message name
+        * @param string $name Message name
         * @return Message
         */
        public function getMsg( $name ) {
@@ -1877,12 +1889,12 @@ abstract class BaseTemplate extends QuickTemplate {
        /**
         * Generates a list item for a navigation, portlet, portal, sidebar... list
         *
-        * @param $key string, usually a key from the list you are generating this link from.
-        * @param $item array, of list item data containing some of a specific set of keys.
+        * @param string $key Usually a key from the list you are generating this link from.
+        * @param array $item Array of list item data containing some of a specific set of keys.
         * The "id", "class" and "itemtitle" keys will be used as attributes for the list item,
         * if "active" contains a value of true a "active" class will also be appended to class.
         *
-        * @param $options array
+        * @param array $options
         *
         * If you want something other than a "<li>" you can pass a tag name such as
         * "tag" => "span" in the $options array to change the tag used.
@@ -2042,7 +2054,7 @@ abstract class BaseTemplate extends QuickTemplate {
         * in the list of footer icons. This is mostly useful for skins which only
         * display the text from footericons instead of the images and don't want a
         * duplicate copyright statement because footerlinks already rendered one.
-        * @return
+        * @return string
         */
        function getFooterIcons( $option = null ) {
                // Generate additional footer icons
index eadf256..0997a7a 100644 (file)
@@ -50,8 +50,8 @@ class SquidPurgeClient {
        var $bodyRemaining;
 
        /**
-        * @param $server string
-        * @param $options array
+        * @param string $server
+        * @param array $options
         */
        public function __construct( $server, $options = array() ) {
                $parts = explode( ':', $server, 2 );
@@ -126,6 +126,7 @@ class SquidPurgeClient {
        /**
         * Get the host's IP address.
         * Does not support IPv6 at present due to the lack of a convenient interface in PHP.
+        * @return string
         */
        protected function getIP() {
                if ( $this->ip === null ) {
@@ -173,7 +174,7 @@ class SquidPurgeClient {
        /**
         * Queue a purge operation
         *
-        * @param $url string
+        * @param string $url
         */
        public function queuePurge( $url ) {
                global $wgSquidPurgeUseHostHeader;
@@ -323,7 +324,7 @@ class SquidPurgeClient {
        }
 
        /**
-        * @param $line
+        * @param string $line
         * @return
         */
        protected function processStatusLine( $line ) {
@@ -343,7 +344,7 @@ class SquidPurgeClient {
        }
 
        /**
-        * @param $line string
+        * @param string $line
         */
        protected function processHeaderLine( $line ) {
                if ( preg_match( '/^Content-Length: (\d+)$/i', $line, $m ) ) {
@@ -370,7 +371,7 @@ class SquidPurgeClient {
        }
 
        /**
-        * @param $msg string
+        * @param string $msg
         */
        protected function log( $msg ) {
                wfDebugLog( 'squid', __CLASS__ . " ($this->host): $msg" );
@@ -386,7 +387,7 @@ class SquidPurgeClientPool {
        var $timeout = 5;
 
        /**
-        * @param $options array
+        * @param array $options
         */
        function __construct( $options = array() ) {
                if ( isset( $options['timeout'] ) ) {
@@ -395,7 +396,7 @@ class SquidPurgeClientPool {
        }
 
        /**
-        * @param $client SquidPurgeClient
+        * @param SquidPurgeClient $client
         * @return void
         */
        public function addClient( $client ) {
index 1373f3d..a429c36 100644 (file)
@@ -36,7 +36,7 @@
  * @ingroup StatCounter
  */
 class StatCounter {
-       /** @var Array */
+       /** @var array */
        protected $deltas = array(); // (key => count)
 
        protected function __construct() {}
@@ -56,7 +56,7 @@ class StatCounter {
         * Increment a key by delta $count
         *
         * @param string $key
-        * @param integer $count
+        * @param int $count
         * @return void
         */
        public function incr( $key, $count = 1 ) {
index 3573f4a..0244c8a 100644 (file)
@@ -78,7 +78,7 @@ class Status {
        /**
         * Factory function for good results
         *
-        * @param $value Mixed
+        * @param mixed $value
         * @return Status
         */
        static function newGood( $value = null ) {
@@ -102,7 +102,7 @@ class Status {
         * Returns whether the operation completed and didn't have any error or
         * warnings
         *
-        * @return Boolean
+        * @return bool
         */
        public function isGood() {
                return $this->ok && !$this->errors;
@@ -111,7 +111,7 @@ class Status {
        /**
         * Returns whether the operation completed
         *
-        * @return Boolean
+        * @return bool
         */
        public function isOK() {
                return $this->ok;
@@ -120,7 +120,7 @@ class Status {
        /**
         * Add a new warning
         *
-        * @param string|Message $message message name or object
+        * @param string|Message $message Message name or object
         */
        public function warning( $message /*, parameters... */ ) {
                $params = array_slice( func_get_args(), 1 );
@@ -134,7 +134,7 @@ class Status {
         * Add an error, do not set fatal flag
         * This can be used for non-fatal errors
         *
-        * @param string|Message $message message name or object
+        * @param string|Message $message Message name or object
         */
        public function error( $message /*, parameters... */ ) {
                $params = array_slice( func_get_args(), 1 );
@@ -148,7 +148,7 @@ class Status {
         * Add an error and set OK to false, indicating that the operation
         * as a whole was fatal
         *
-        * @param string|Message $message message name or object
+        * @param string|Message $message Message name or object
         */
        public function fatal( $message /*, parameters... */ ) {
                $params = array_slice( func_get_args(), 1 );
@@ -167,7 +167,7 @@ class Status {
        }
 
        /**
-        * @param $params array
+        * @param array $params
         * @return array
         */
        protected function cleanParams( $params ) {
@@ -184,10 +184,10 @@ class Status {
        /**
         * Get the error list as a wikitext formatted list
         *
-        * @param string $shortContext a short enclosing context message name, to
+        * @param string $shortContext A short enclosing context message name, to
         *        be used when there is a single error
-        * @param string $longContext a long enclosing context message name, for a list
-        * @return String
+        * @param string $longContext A long enclosing context message name, for a list
+        * @return string
         */
        public function getWikiText( $shortContext = false, $longContext = false ) {
                if ( count( $this->errors ) == 0 ) {
@@ -275,12 +275,12 @@ class Status {
 
        /**
         * Return the message for a single error.
-        * @param $error Mixed With an array & two values keyed by
+        * @param mixed $error With an array & two values keyed by
         * 'message' and 'params', use those keys-value pairs.
         * Otherwise, if its an array, just use the first value as the
         * message and the remaining items as the params.
         *
-        * @return String
+        * @return string
         */
        protected function getErrorMessage( $error ) {
                if ( is_array( $error ) ) {
@@ -303,10 +303,10 @@ class Status {
        /**
         * Get the error message as HTML. This is done by parsing the wikitext error
         * message.
-        * @param string $shortContext a short enclosing context message name, to
+        * @param string $shortContext A short enclosing context message name, to
         *        be used when there is a single error
-        * @param string $longContext a long enclosing context message name, for a list
-        * @return String
+        * @param string $longContext A long enclosing context message name, for a list
+        * @return string
         */
        public function getHTML( $shortContext = false, $longContext = false ) {
                $text = $this->getWikiText( $shortContext, $longContext );
@@ -316,8 +316,8 @@ class Status {
 
        /**
         * Return an array with the wikitext for each item in the array.
-        * @param $errors Array
-        * @return Array
+        * @param array $errors
+        * @return array
         */
        protected function getErrorMessageArray( $errors ) {
                return array_map( array( $this, 'getErrorMessage' ), $errors );
@@ -361,8 +361,8 @@ class Status {
 
        /**
         * Returns a list of status messages of the given type
-        * @param $type String
-        * @return Array
+        * @param string $type
+        * @return array
         */
        protected function getStatusArray( $type ) {
                $result = array();
@@ -388,9 +388,9 @@ class Status {
         * Returns a list of status messages of the given type, with message and
         * params left untouched, like a sane version of getStatusArray
         *
-        * @param $type String
+        * @param string $type
         *
-        * @return Array
+        * @return array
         */
        public function getErrorsByType( $type ) {
                $result = array();
@@ -408,8 +408,8 @@ class Status {
         * Note, due to the lack of tools for comparing Message objects, this
         * function will not work when using a Message object as a parameter.
         *
-        * @param string $msg message name
-        * @return Boolean
+        * @param string $msg Message name
+        * @return bool
         */
        public function hasMessage( $msg ) {
                foreach ( $this->errors as $error ) {
index a3970f3..bb173e7 100644 (file)
@@ -47,10 +47,9 @@ class StubObject {
        /**
         * Constructor.
         *
-        * @param string $global name of the global variable.
-        * @param string $class name of the class of the real object.
-        * @param array $params parameters to pass to constructor of the real
-        *               object.
+        * @param string $global Name of the global variable.
+        * @param string $class Name of the class of the real object.
+        * @param array $params Parameters to pass to constructor of the real object.
         */
        function __construct( $global = null, $class = null, $params = array() ) {
                $this->mGlobal = $global;
@@ -62,8 +61,8 @@ class StubObject {
         * Returns a bool value whenever $obj is a stub object. Can be used to break
         * a infinite loop when unstubbing an object.
         *
-        * @param $obj Object to check.
-        * @return Boolean: true if $obj is not an instance of StubObject class.
+        * @param object $obj Object to check.
+        * @return bool True if $obj is not an instance of StubObject class.
         */
        static function isRealObject( $obj ) {
                return is_object( $obj ) && !$obj instanceof StubObject;
@@ -74,7 +73,7 @@ class StubObject {
         * infinite loop when unstubbing an object or to avoid reference parameter
         * breakage.
         *
-        * @param $obj Object to check.
+        * @param object $obj Object to check.
         * @return void
         */
        static function unstub( $obj ) {
@@ -90,8 +89,8 @@ class StubObject {
         * This function will also call the function with the same name in the real
         * object.
         *
-        * @param string $name name of the function called
-        * @param array $args arguments
+        * @param string $name Name of the function called
+        * @param array $args Arguments
         * @return mixed
         */
        function _call( $name, $args ) {
@@ -111,8 +110,8 @@ class StubObject {
         * Function called by PHP if no function with that name exists in this
         * object.
         *
-        * @param string $name name of the function called
-        * @param array $args arguments
+        * @param string $name Name of the function called
+        * @param array $args Arguments
         * @return mixed
         */
        function __call( $name, $args ) {
@@ -125,9 +124,9 @@ class StubObject {
         * This is public, for the convenience of external callers wishing to access
         * properties, e.g. eval.php
         *
-        * @param string $name name of the method called in this object.
-        * @param $level Integer: level to go in the stack trace to get the function
-        *               who called this function.
+        * @param string $name Name of the method called in this object.
+        * @param int $level Level to go in the stack trace to get the function
+        *   who called this function.
         * @throws MWException
         */
        function _unstub( $name = '_unstub', $level = 2 ) {
index de4457d..41c68c0 100644 (file)
@@ -31,9 +31,9 @@
  */
 class MailAddress {
        /**
-        * @param string|User $address string with an email address, or a User object
-        * @param string $name human-readable name if a string address is given
-        * @param string $realName human-readable real name if a string address is given
+        * @param string|User $address String with an email address, or a User object
+        * @param string $name Human-readable name if a string address is given
+        * @param string $realName Human-readable real name if a string address is given
         */
        function __construct( $address, $name = null, $realName = null ) {
                if ( is_object( $address ) && $address instanceof User ) {
@@ -86,10 +86,10 @@ class UserMailer {
        /**
         * Send mail using a PEAR mailer
         *
-        * @param $mailer
-        * @param $dest
-        * @param $headers
-        * @param $body
+        * @param UserMailer $mailer
+        * @param string $dest
+        * @param string $headers
+        * @param string $body
         *
         * @return Status
         */
@@ -115,7 +115,7 @@ class UserMailer {
         * Note RFC2822 says newlines must be CRLF (\r\n)
         * but php mail naively "corrects" it and requires \n for the "correction" to work
         *
-        * @return String
+        * @return string
         */
        static function arrayToHeaderString( $headers, $endl = "\n" ) {
                $strings = array();
@@ -130,7 +130,7 @@ class UserMailer {
        /**
         * Create a value suitable for the MessageId Header
         *
-        * @return String
+        * @return string
         */
        static function makeMsgId() {
                global $wgSMTP, $wgServer;
@@ -151,14 +151,14 @@ class UserMailer {
         * array of parameters. It requires PEAR:Mail to do that.
         * Otherwise it just uses the standard PHP 'mail' function.
         *
-        * @param $to MailAddress: recipient's email (or an array of them)
-        * @param $from MailAddress: sender's email
-        * @param string $subject email's subject.
-        * @param string $body email's text or Array of two strings to be the text and html bodies
-        * @param $replyto MailAddress: optional reply-to email (default: null).
-        * @param string $contentType optional custom Content-Type (default: text/plain; charset=UTF-8)
+        * @param MailAddress $to Recipient's email (or an array of them)
+        * @param MailAddress $from Sender's email
+        * @param string $subject Email's subject.
+        * @param string $body Email's text or Array of two strings to be the text and html bodies
+        * @param MailAddress $replyto Optional reply-to email (default: null).
+        * @param string $contentType Optional custom Content-Type (default: text/plain; charset=UTF-8)
         * @throws MWException
-        * @return Status object
+        * @return Status
         */
        public static function send( $to, $from, $subject, $body, $replyto = null, $contentType = 'text/plain; charset=UTF-8' ) {
                global $wgSMTP, $wgEnotifMaxRecips, $wgAdditionalMailParams, $wgAllowHTMLEmail;
@@ -387,8 +387,8 @@ class UserMailer {
        /**
         * Set the mail error message in self::$mErrorString
         *
-        * @param $code Integer: error number
-        * @param string $string error message
+        * @param int $code Error number
+        * @param string $string Error message
         */
        static function errorHandler( $code, $string ) {
                self::$mErrorString = preg_replace( '/^mail\(\)(\s*\[.*?\])?: /', '', $string );
@@ -405,7 +405,7 @@ class UserMailer {
 
        /**
         * Converts a string into a valid RFC 822 "phrase", such as is used for the sender name
-        * @param $phrase string
+        * @param string $phrase
         * @return string
         */
        public static function rfc822Phrase( $phrase ) {
@@ -493,13 +493,13 @@ class EmailNotification {
         *
         * May be deferred via the job queue.
         *
-        * @param $editor User object
-        * @param $title Title object
-        * @param $timestamp
-        * @param $summary
-        * @param $minorEdit
-        * @param $oldid (default: false)
-        * @param $pageStatus (default: 'changed')
+        * @param User $editor
+        * @param Title $title
+        * @param string $timestamp
+        * @param string $summary
+        * @param bool $minorEdit
+        * @param bool $oldid (default: false)
+        * @param string $pageStatus (default: 'changed')
         */
        public function notifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid = false, $pageStatus = 'changed' ) {
                global $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker, $wgEnotifMinorEdits,
@@ -588,13 +588,13 @@ class EmailNotification {
         * Send emails corresponding to the user $editor editing the page $title.
         * Also updates wl_notificationtimestamp.
         *
-        * @param $editor User object
-        * @param $title Title object
+        * @param User $editor
+        * @param Title $title
         * @param string $timestamp Edit timestamp
         * @param string $summary Edit summary
-        * @param $minorEdit bool
+        * @param bool $minorEdit
         * @param int $oldid Revision ID
-        * @param array $watchers of user IDs
+        * @param array $watchers Array of user IDs
         * @param string $pageStatus
         * @throws MWException
         */
@@ -671,9 +671,9 @@ class EmailNotification {
        }
 
        /**
-        * @param $editor User
-        * @param $title Title bool
-        * @param $minorEdit
+        * @param User $editor
+        * @param Title $title
+        * @param bool $minorEdit
         * @return bool
         */
        private function canSendUserTalkEmail( $editor, $title, $minorEdit ) {
@@ -818,7 +818,7 @@ class EmailNotification {
         * depending on settings.
         *
         * Call sendMails() to send any mails that were queued.
-        * @param $user User
+        * @param User $user
         */
        function compose( $user ) {
                global $wgEnotifImpersonal;
@@ -849,8 +849,8 @@ class EmailNotification {
         * timestamp in proper timezone, etc) and sends it out.
         * Returns true if the mail was sent successfully.
         *
-        * @param $watchingUser User object
-        * @return Boolean
+        * @param User $watchingUser
+        * @return bool
         * @private
         */
        function sendPersonalised( $watchingUser ) {
@@ -878,7 +878,7 @@ class EmailNotification {
        /**
         * Same as sendPersonalised but does impersonal mail suitable for bulk
         * mailing.  Takes an array of MailAddress objects.
-        * @param $addresses array
+        * @param array $addresses
         * @return Status|null
         */
        function sendImpersonal( $addresses ) {
index a8a22be..e3655ce 100644 (file)
@@ -31,10 +31,10 @@ class UserRightsProxy {
         *
         * @see newFromId()
         * @see newFromName()
-        * @param $db DatabaseBase: db connection
-        * @param string $database database name
-        * @param string $name user name
-        * @param $id Integer: user ID
+        * @param DatabaseBase $db Db connection
+        * @param string $database Database name
+        * @param string $name User name
+        * @param int $id User ID
         */
        private function __construct( $db, $database, $name, $id ) {
                $this->db = $db;
@@ -47,7 +47,7 @@ class UserRightsProxy {
        /**
         * Accessor for $this->database
         *
-        * @return String: database name
+        * @return string Database name
         */
        public function getDBName() {
                return $this->database;
@@ -56,8 +56,8 @@ class UserRightsProxy {
        /**
         * Confirm the selected database name is a valid local interwiki database name.
         *
-        * @param string $database database name
-        * @return Boolean
+        * @param string $database Database name
+        * @return bool
         */
        public static function validDatabase( $database ) {
                global $wgLocalDatabases;
@@ -67,10 +67,10 @@ class UserRightsProxy {
        /**
         * Same as User::whoIs()
         *
-        * @param string $database database name
-        * @param $id Integer: user ID
-        * @param $ignoreInvalidDB Boolean: if true, don't check if $database is in $wgLocalDatabases
-        * @return String: user name or false if the user doesn't exist
+        * @param string $database Database name
+        * @param int $id User ID
+        * @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases
+        * @return string User name or false if the user doesn't exist
         */
        public static function whoIs( $database, $id, $ignoreInvalidDB = false ) {
                $user = self::newFromId( $database, $id, $ignoreInvalidDB );
@@ -84,10 +84,10 @@ class UserRightsProxy {
        /**
         * Factory function; get a remote user entry by ID number.
         *
-        * @param string $database database name
-        * @param $id Integer: user ID
-        * @param $ignoreInvalidDB Boolean: if true, don't check if $database is in $wgLocalDatabases
-        * @return UserRightsProxy or null if doesn't exist
+        * @param string $database Database name
+        * @param int $id User ID
+        * @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases
+        * @return UserRightsProxy|null If doesn't exist
         */
        public static function newFromId( $database, $id, $ignoreInvalidDB = false ) {
                return self::newFromLookup( $database, 'user_id', intval( $id ), $ignoreInvalidDB );
@@ -96,20 +96,20 @@ class UserRightsProxy {
        /**
         * Factory function; get a remote user entry by name.
         *
-        * @param string $database database name
-        * @param string $name user name
-        * @param $ignoreInvalidDB Boolean: if true, don't check if $database is in $wgLocalDatabases
-        * @return UserRightsProxy or null if doesn't exist
+        * @param string $database Database name
+        * @param string $name User name
+        * @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases
+        * @return UserRightsProxy|null If doesn't exist
         */
        public static function newFromName( $database, $name, $ignoreInvalidDB = false ) {
                return self::newFromLookup( $database, 'user_name', $name, $ignoreInvalidDB );
        }
 
        /**
-        * @param $database
-        * @param $field
-        * @param $value
-        * @param $ignoreInvalidDB bool
+        * @param string $database
+        * @param string $field
+        * @param string $value
+        * @param bool $ignoreInvalidDB
         * @return null|UserRightsProxy
         */
        private static function newFromLookup( $database, $field, $value, $ignoreInvalidDB = false ) {
@@ -132,9 +132,9 @@ class UserRightsProxy {
         * Open a database connection to work on for the requested user.
         * This may be a new connection to another database for remote users.
         *
-        * @param $database String
-        * @param $ignoreInvalidDB Boolean: if true, don't check if $database is in $wgLocalDatabases
-        * @return DatabaseBase or null if invalid selection
+        * @param string $database
+        * @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases
+        * @return DatabaseBase|null If invalid selection
         */
        public static function getDB( $database, $ignoreInvalidDB = false ) {
                global $wgDBname;
@@ -166,7 +166,7 @@ class UserRightsProxy {
        /**
         * Same as User::getName()
         *
-        * @return String
+        * @return string
         */
        public function getName() {
                return $this->name . '@' . $this->database;
@@ -175,7 +175,7 @@ class UserRightsProxy {
        /**
         * Same as User::getUserPage()
         *
-        * @return Title object
+        * @return Title
         */
        public function getUserPage() {
                return Title::makeTitle( NS_USER, $this->getName() );
@@ -199,6 +199,7 @@ class UserRightsProxy {
 
        /**
         * Replaces User::addUserGroup()
+        * @param string $group
         */
        function addGroup( $group ) {
                $this->db->insert( 'user_groups',
@@ -212,6 +213,7 @@ class UserRightsProxy {
 
        /**
         * Replaces User::removeUserGroup()
+        * @param string $group
         */
        function removeGroup( $group ) {
                $this->db->delete( 'user_groups',
@@ -224,6 +226,8 @@ class UserRightsProxy {
 
        /**
         * Replaces User::setOption()
+        * @param string $option
+        * @param mixed $value
         */
        public function setOption( $option, $value ) {
                $this->newOptions[$option] = $value;
index a6e7516..749a354 100644 (file)
@@ -47,11 +47,11 @@ class WatchedItem {
        /**
         * Create a WatchedItem object with the given user and title
         * @since 1.22 $checkRights parameter added
-        * @param $user User: the user to use for (un)watching
-        * @param $title Title: the title we're going to (un)watch
-        * @param $checkRights int: Whether to check the 'viewmywatchlist' and 'editmywatchlist' rights.
+        * @param User $user The user to use for (un)watching
+        * @param Title $title The title we're going to (un)watch
+        * @param int $checkRights Whether to check the 'viewmywatchlist' and 'editmywatchlist' rights.
         *     Pass either WatchedItem::IGNORE_USER_RIGHTS or WatchedItem::CHECK_USER_RIGHTS.
-        * @return WatchedItem object
+        * @return WatchedItem
         */
        public static function fromUserTitle( $user, $title, $checkRights = WatchedItem::CHECK_USER_RIGHTS ) {
                $wl = new WatchedItem;
@@ -146,7 +146,7 @@ class WatchedItem {
 
        /**
         * Check permissions
-        * @param $what string: 'viewmywatchlist' or 'editmywatchlist'
+        * @param string $what 'viewmywatchlist' or 'editmywatchlist'
         */
        private function isAllowed( $what ) {
                return !$this->mCheckRights || $this->mUser->isAllowed( $what );
@@ -168,8 +168,8 @@ class WatchedItem {
        /**
         * Get the notification timestamp of this entry.
         *
-        * @return false|null|string: false if the page is not watched, the value of
-        *         the wl_notificationtimestamp field otherwise
+        * @return false|null|string false if the page is not watched, the value of
+        *   the wl_notificationtimestamp field otherwise
         */
        public function getNotificationTimestamp() {
                if ( !$this->isAllowed( 'viewmywatchlist' ) ) {
@@ -187,8 +187,8 @@ class WatchedItem {
        /**
         * Reset the notification timestamp of this entry
         *
-        * @param $force Whether to force the write query to be executed even if the
-        *        page is not watched or the notification timestamp is already NULL.
+        * @param bool $force Whether to force the write query to be executed even if the
+        *    page is not watched or the notification timestamp is already NULL.
         * @param int $oldid The revision id being viewed. If not given or 0, latest revision is assumed.
         */
        public function resetNotificationTimestamp( $force = '', $oldid = 0 ) {
@@ -253,8 +253,7 @@ class WatchedItem {
        }
 
        /**
-        * Given a title and user (assumes the object is setup), add the watch to the
-        * database.
+        * Given a title and user (assumes the object is setup), add the watch to the database.
         * @return bool
         */
        public function addWatch() {
@@ -345,8 +344,8 @@ class WatchedItem {
         * Check if the given title already is watched by the user, and if so
         * add watches on a new title. To be used for page renames and such.
         *
-        * @param $ot Title: page title to duplicate entries from, if present
-        * @param $nt Title: page title to add watches on
+        * @param Title $ot Page title to duplicate entries from, if present
+        * @param Title $nt Page title to add watches on
         */
        public static function duplicateEntries( $ot, $nt ) {
                WatchedItem::doDuplicateEntries( $ot->getSubjectPage(), $nt->getSubjectPage() );
@@ -356,8 +355,8 @@ class WatchedItem {
        /**
         * Handle duplicate entries. Backend for duplicateEntries().
         *
-        * @param $ot Title
-        * @param $nt Title
+        * @param Title $ot
+        * @param Title $nt
         *
         * @return bool
         */
index 297041b..2ef1382 100644 (file)
@@ -34,7 +34,7 @@ class MediaWiki {
        private $context;
 
        /**
-        * @param $x null|WebRequest
+        * @param null|WebRequest $x
         * @return WebRequest
         */
        public function request( WebRequest $x = null ) {
@@ -44,7 +44,7 @@ class MediaWiki {
        }
 
        /**
-        * @param $x null|OutputPage
+        * @param null|OutputPage $x
         * @return OutputPage
         */
        public function output( OutputPage $x = null ) {
@@ -67,7 +67,7 @@ class MediaWiki {
        /**
         * Parse the request to get the Title object
         *
-        * @return Title object to be $wgTitle
+        * @return Title Title object to be $wgTitle
         */
        private function parseTitle() {
                global $wgContLang;
@@ -142,7 +142,7 @@ class MediaWiki {
        /**
         * Returns the name of the action that will be executed.
         *
-        * @return string: action
+        * @return string Action
         */
        public function getAction() {
                static $action = null;
@@ -311,7 +311,7 @@ class MediaWiki {
         * Initialize the main Article object for "standard" actions (view, etc)
         * Create an Article object for the page, following redirects if needed.
         *
-        * @return mixed an Article, or a string to redirect to another URL
+        * @return mixed An Article, or a string to redirect to another URL
         */
        private function initializeArticle() {
                global $wgDisableHardRedirects;
@@ -393,8 +393,8 @@ class MediaWiki {
        /**
         * Perform one of the "standard" actions
         *
-        * @param $page Page
-        * @param $requestTitle The original title, before any redirects were applied
+        * @param Page $page
+        * @param Title $requestTitle The original title, before any redirects were applied
         */
        private function performAction( Page $page, Title $requestTitle ) {
                global $wgUseSquid, $wgSquidMaxage;
index 4739753..34cd48d 100644 (file)
@@ -28,8 +28,8 @@ class WikiMap {
        /**
         * Get a WikiReference object for $wikiID
         *
-        * @param string $wikiID wiki'd id (generally database name)
-        * @return WikiReference object or null if the wiki was not found
+        * @param string $wikiID Wiki'd id (generally database name)
+        * @return WikiReference|null WikiReference object or null if the wiki was not found
         */
        public static function getWiki( $wikiID ) {
                global $wgConf;
@@ -58,7 +58,7 @@ class WikiMap {
         * Convenience to get the wiki's display name
         *
         * @todo We can give more info than just the wiki id!
-        * @param string $wikiID wiki'd id (generally database name)
+        * @param string $wikiID Wiki'd id (generally database name)
         * @return string|int Wiki's name or $wiki_id if the wiki was not found
         */
        public static function getWikiName( $wikiID ) {
@@ -73,10 +73,10 @@ class WikiMap {
        /**
         * Convenience to get a link to a user page on a foreign wiki
         *
-        * @param string $wikiID wiki'd id (generally database name)
-        * @param string $user user name (must be normalised before calling this function!)
-        * @param string $text link's text; optional, default to "User:$user"
-        * @return String: HTML link or false if the wiki was not found
+        * @param string $wikiID Wiki'd id (generally database name)
+        * @param string $user User name (must be normalised before calling this function!)
+        * @param string $text Link's text; optional, default to "User:$user"
+        * @return string HTML link or false if the wiki was not found
         */
        public static function foreignUserLink( $wikiID, $user, $text = null ) {
                return self::makeForeignLink( $wikiID, "User:$user", $text );
@@ -85,10 +85,10 @@ class WikiMap {
        /**
         * Convenience to get a link to a page on a foreign wiki
         *
-        * @param string $wikiID wiki'd id (generally database name)
-        * @param string $page page name (must be normalised before calling this function!)
-        * @param string $text link's text; optional, default to $page
-        * @return String: HTML link or false if the wiki was not found
+        * @param string $wikiID Wiki'd id (generally database name)
+        * @param string $page Page name (must be normalised before calling this function!)
+        * @param string $text Link's text; optional, default to $page
+        * @return string HTML link or false if the wiki was not found
         */
        public static function makeForeignLink( $wikiID, $page, $text = null ) {
                if ( !$text ) {
@@ -106,9 +106,9 @@ class WikiMap {
        /**
         * Convenience to get a url to a page on a foreign wiki
         *
-        * @param string $wikiID wiki'd id (generally database name)
-        * @param string $page page name (must be normalised before calling this function!)
-        * @return String: URL or false if the wiki was not found
+        * @param string $wikiID Wiki'd id (generally database name)
+        * @param string $page Page name (must be normalised before calling this function!)
+        * @return string|bool URL or false if the wiki was not found
         */
        public static function getForeignURL( $wikiID, $page ) {
                $wiki = WikiMap::getWiki( $wikiID );
@@ -132,11 +132,11 @@ class WikiReference {
        private $mPath;   ///< path, '/wiki/$1'
 
        /**
-        * @param $major string
-        * @param $minor string
-        * @param $canonicalServer string
-        * @param $path string
-        * @param $server null|string
+        * @param string $major
+        * @param string $minor
+        * @param string $canonicalServer
+        * @param string $path
+        * @param null|string $server
         */
        public function __construct( $major, $minor, $canonicalServer, $path, $server = null ) {
                $this->mMajor = $major;
@@ -164,7 +164,7 @@ class WikiReference {
         * Get the the URL in a way to de displayed to the user
         * More or less Wikimedia specific
         *
-        * @return String
+        * @return string
         */
        public function getDisplayName() {
                $url = $this->getUrl( '' );
@@ -181,8 +181,8 @@ class WikiReference {
         * Helper function for getUrl()
         *
         * @todo FIXME: This may be generalized...
-        * @param string $page page name (must be normalised before calling this function!)
-        * @return String: Url fragment
+        * @param string $page Page name (must be normalised before calling this function!)
+        * @return string Url fragment
         */
        private function getLocalUrl( $page ) {
                return str_replace( '$1', wfUrlEncode( str_replace( ' ', '_', $page ) ), $this->mPath );
@@ -191,8 +191,8 @@ class WikiReference {
        /**
         * Get a canonical (i.e. based on $wgCanonicalServer) URL to a page on this foreign wiki
         *
-        * @param string $page page name (must be normalised before calling this function!)
-        * @return String: Url
+        * @param string $page Page name (must be normalised before calling this function!)
+        * @return string Url
         */
        public function getCanonicalUrl( $page ) {
                return $this->mCanonicalServer . $this->getLocalUrl( $page );
@@ -208,8 +208,8 @@ class WikiReference {
 
        /**
         * Alias for getCanonicalUrl(), for backwards compatibility.
-        * @param $page string
-        * @return String
+        * @param string $page
+        * @return string
         */
        public function getUrl( $page ) {
                return $this->getCanonicalUrl( $page );
@@ -219,8 +219,8 @@ class WikiReference {
         * Get a URL based on $wgServer, like Title::getFullURL() would produce
         * when called locally on the wiki.
         *
-        * @param string $page page name (must be normalized before calling this function!)
-        * @return String: URL
+        * @param string $page Page name (must be normalized before calling this function!)
+        * @return string URL
         */
        public function getFullUrl( $page ) {
                return $this->mServer .
index 1832f21..dbf6918 100644 (file)
@@ -2002,7 +2002,8 @@ class LocalFileDeleteBatch {
                        $res = $dbw->select(
                                'oldimage',
                                array( 'oi_archive_name', 'oi_sha1' ),
-                               array( 'oi_archive_name' => array_keys( $oldRels ) ),
+                               array( 'oi_archive_name' => array_keys( $oldRels ),
+                                       'oi_name' => $this->file->getName() ), // performance
                                __METHOD__
                        );
 
index f8d017c..09c0ad9 100644 (file)
@@ -31,10 +31,10 @@ class HTMLButtonField extends HTMLFormField {
        /**
         * Button cannot be invalid
         *
-        * @param $value String
-        * @param $alldata Array
+        * @param string $value
+        * @param array $alldata
         *
-        * @return Bool
+        * @return bool
         */
        public function validate( $value, $alldata ) {
                return true;
index 7baab66..c7ec014 100644 (file)
@@ -36,7 +36,7 @@ class HTMLCheckField extends HTMLFormField {
        /**
         * For a checkbox, the label goes on the right hand side, and is
         * added in getInputHTML(), rather than HTMLFormField::getRow()
-        * @return String
+        * @return string
         */
        function getLabel() {
                return '&#160;';
@@ -44,15 +44,16 @@ class HTMLCheckField extends HTMLFormField {
 
        /**
         * checkboxes don't need a label.
+        * @return bool
         */
        protected function needsLabel() {
                return false;
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return String
+        * @return string
         */
        function loadDataFromRequest( $request ) {
                $invert = false;
index 2fc170c..606523b 100644 (file)
@@ -75,9 +75,9 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
         * mParams['rows'] is an array with row labels as keys and row tags as values.
         * mParams['columns'] is an array with column labels as keys and column tags as values.
         *
-        * @param array $value of the options that should be checked
+        * @param array $value Array of the options that should be checked
         *
-        * @return String
+        * @return string
         */
        function getInputHTML( $value ) {
                $html = '';
@@ -159,9 +159,9 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
         * line above the options in the case of a checkbox matrix, i.e. it's always
         * a "vertical-label".
         *
-        * @param string $value the value to set the input to
+        * @param string $value The value to set the input to
         *
-        * @return String complete HTML table row
+        * @return string Complete HTML table row
         */
        function getTableRow( $value ) {
                list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
@@ -187,9 +187,9 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return Array
+        * @return array
         */
        function loadDataFromRequest( $request ) {
                if ( $this->mParent->getMethod() == 'post' ) {
index 21505a8..c7bac0d 100644 (file)
@@ -181,13 +181,13 @@ class HTMLForm extends ContextSource {
        /**
         * Format in which to display form. For viable options,
         * @see $availableDisplayFormats
-        * @var String
+        * @var string
         */
        protected $displayFormat = 'table';
 
        /**
         * Available formats in which to display the form
-        * @var Array
+        * @var array
         */
        protected $availableDisplayFormats = array(
                'table',
@@ -199,10 +199,10 @@ class HTMLForm extends ContextSource {
        /**
         * Build a new HTMLForm from an array of field attributes
         *
-        * @param array $descriptor of Field constructs, as described above
-        * @param $context IContextSource available since 1.18, will become compulsory in 1.18.
+        * @param array $descriptor Array of Field constructs, as described above
+        * @param IContextSource $context Available since 1.18, will become compulsory in 1.18.
         *     Obviates the need to call $form->setTitle()
-        * @param string $messagePrefix a prefix to go in front of default messages
+        * @param string $messagePrefix A prefix to go in front of default messages
         */
        public function __construct( $descriptor, /*IContextSource*/ $context = null,
                $messagePrefix = ''
@@ -267,8 +267,8 @@ class HTMLForm extends ContextSource {
        /**
         * Set format in which to display the form
         *
-        * @param string $format the name of the format to use, must be one of
-        *        $this->availableDisplayFormats
+        * @param string $format The name of the format to use, must be one of
+        *   $this->availableDisplayFormats
         *
         * @throws MWException
         * @since 1.20
@@ -287,7 +287,7 @@ class HTMLForm extends ContextSource {
        /**
         * Getter for displayFormat
         * @since 1.20
-        * @return String
+        * @return string
         */
        public function getDisplayFormat() {
                return $this->displayFormat;
@@ -296,7 +296,7 @@ class HTMLForm extends ContextSource {
        /**
         * Test if displayFormat is 'vform'
         * @since 1.22
-        * @return Bool
+        * @return bool
         */
        public function isVForm() {
                return $this->displayFormat === 'vform';
@@ -388,7 +388,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Try submitting, with edit token check first
-        * @return Status|boolean
+        * @return Status|bool
         */
        function tryAuthorizedSubmit() {
                $result = false;
@@ -419,7 +419,7 @@ class HTMLForm extends ContextSource {
         * The here's-one-I-made-earlier option: do the submission if
         * posted, or display the form with or without funky validation
         * errors
-        * @return Bool or Status whether submission was successful.
+        * @return bool|Status Whether submission was successful.
         */
        function show() {
                $this->prepareForm();
@@ -438,7 +438,7 @@ class HTMLForm extends ContextSource {
         * Validate all the fields, and call the submission callback
         * function if everything is kosher.
         * @throws MWException
-        * @return Mixed Bool true == Successful submission, Bool false
+        * @return mixed Bool true == Successful submission, Bool false
         *     == No submission attempted, anything else == Error to
         *     display.
         */
@@ -476,7 +476,7 @@ class HTMLForm extends ContextSource {
         * Set a callback to a function to do something with the form
         * once it's been successfully validated.
         *
-        * @param string $cb function name.  The function will be passed
+        * @param string $cb Function name.  The function will be passed
         *     the output from HTMLForm::filterDataForSubmit, and must
         *     return Bool true on success, Bool false if no submission
         *     was attempted, or String HTML output to display on error.
@@ -492,7 +492,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set a message to display on a validation error.
         *
-        * @param $msg Mixed String or Array of valid inputs to wfMessage()
+        * @param string|array $msg String or Array of valid inputs to wfMessage()
         *     (so each entry can be either a String or Array)
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -506,7 +506,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the introductory message, overwriting any existing message.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -520,7 +520,7 @@ class HTMLForm extends ContextSource {
         * Set the introductory message, overwriting any existing message.
         * @since 1.19
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -533,7 +533,7 @@ class HTMLForm extends ContextSource {
        /**
         * Add introductory text.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -546,7 +546,7 @@ class HTMLForm extends ContextSource {
        /**
         * Add header text, inside the form.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         * @param string $section The section to add the header to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -568,8 +568,8 @@ class HTMLForm extends ContextSource {
         * Set header text, inside the form.
         * @since 1.19
         *
-        * @param string $msg complete text of message to display
-        * @param $section The section to add the header to
+        * @param string $msg Complete text of message to display
+        * @param string $section The section to add the header to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -608,7 +608,7 @@ class HTMLForm extends ContextSource {
         * Set footer text, inside the form.
         * @since 1.19
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         * @param string $section The section to add the footer text to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -626,7 +626,7 @@ class HTMLForm extends ContextSource {
        /**
         * Add text to the end of the display.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -639,7 +639,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set text at the end of the display.
         *
-        * @param string $msg complete text of message to display
+        * @param string $msg Complete text of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -652,9 +652,9 @@ class HTMLForm extends ContextSource {
        /**
         * Add a hidden field to the output
         *
-        * @param string $name field name.  This will be used exactly as entered
-        * @param string $value field value
-        * @param $attribs Array
+        * @param string $name Field name.  This will be used exactly as entered
+        * @param string $value Field value
+        * @param array $attribs
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -686,10 +686,10 @@ class HTMLForm extends ContextSource {
        /**
         * Add a button to the form
         *
-        * @param string $name field name.
-        * @param string $value field value
+        * @param string $name Field name.
+        * @param string $value Field value
         * @param string $id DOM id for the button (default: null)
-        * @param $attribs Array
+        * @param array $attribs
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -707,7 +707,7 @@ class HTMLForm extends ContextSource {
         * Moreover, when doing method chaining this should be the very last method
         * call just after prepareForm().
         *
-        * @param $submitResult Mixed output from HTMLForm::trySubmit()
+        * @param mixed $submitResult Mixed output from HTMLForm::trySubmit()
         *
         * @return Nothing, should be last call
         */
@@ -718,7 +718,7 @@ class HTMLForm extends ContextSource {
        /**
         * Returns the raw HTML generated by the form
         *
-        * @param $submitResult Mixed output from HTMLForm::trySubmit()
+        * @param mixed $submitResult Mixed output from HTMLForm::trySubmit()
         *
         * @return string
         */
@@ -753,7 +753,7 @@ class HTMLForm extends ContextSource {
         *
         * @param string $html HTML contents to wrap.
         *
-        * @return String wrapped HTML.
+        * @return string Wrapped HTML.
         */
        function wrapForm( $html ) {
 
@@ -785,7 +785,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Get the hidden fields that should go inside the form.
-        * @return String HTML.
+        * @return string HTML.
         */
        function getHiddenFields() {
                global $wgArticlePath;
@@ -814,7 +814,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Get the submit and (potentially) reset buttons.
-        * @return String HTML.
+        * @return string HTML.
         */
        function getButtons() {
                $buttons = '';
@@ -895,7 +895,7 @@ class HTMLForm extends ContextSource {
 
        /**
         * Get the whole body of the form.
-        * @return String
+        * @return string
         */
        function getBody() {
                return $this->displaySection( $this->mFieldTree, $this->mTableId );
@@ -904,9 +904,9 @@ class HTMLForm extends ContextSource {
        /**
         * Format and display an error message stack.
         *
-        * @param $errors String|Array|Status
+        * @param string|array|Status $errors
         *
-        * @return String
+        * @return string
         */
        function getErrors( $errors ) {
                if ( $errors instanceof Status ) {
@@ -931,7 +931,7 @@ class HTMLForm extends ContextSource {
         *
         * @param array $errors of message keys/values
         *
-        * @return String HTML, a "<ul>" list of errors
+        * @return string HTML, a "<ul>" list of errors
         */
        public static function formatErrors( $errors ) {
                $errorstr = '';
@@ -973,7 +973,7 @@ class HTMLForm extends ContextSource {
         * Set the text for the submit button to a message
         * @since 1.19
         *
-        * @param string $msg message key
+        * @param string $msg Message key
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1018,7 +1018,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the id for the submit button.
         *
-        * @param $t String.
+        * @param string $t
         *
         * @todo FIXME: Integrity of $t is *not* validated
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -1050,7 +1050,7 @@ class HTMLForm extends ContextSource {
         *
         * @since 1.22
         *
-        * @param string $id new value of the id attribute, or "" to remove
+        * @param string $id New value of the id attribute, or "" to remove
         *
         * @return HTMLForm $this for chaining calls
         */
@@ -1092,7 +1092,7 @@ class HTMLForm extends ContextSource {
         * this message as its "<legend>" element.
         * @since 1.19
         *
-        * @param string $msg message key
+        * @param string $msg Message key
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1107,7 +1107,7 @@ class HTMLForm extends ContextSource {
         * @todo Currently only used for the "<fieldset>" legend on forms
         * with multiple sections; should be used elsewhere?
         *
-        * @param $p String
+        * @param string $p
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1120,7 +1120,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the title for form submission
         *
-        * @param $t Title of page the form is on/should be posted to
+        * @param Title $t Title of page the form is on/should be posted to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1143,7 +1143,7 @@ class HTMLForm extends ContextSource {
        /**
         * Set the method used to submit the form
         *
-        * @param $method String
+        * @param string $method
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1166,9 +1166,9 @@ class HTMLForm extends ContextSource {
         *   section, ignored if empty.
         * @param string $fieldsetIDPrefix ID prefix for the "<fieldset>" tag of
         *   each subsection, ignored if empty.
-        * @param boolean &$hasUserVisibleFields Whether the section had user-visible fields.
+        * @param bool &$hasUserVisibleFields Whether the section had user-visible fields.
         *
-        * @return String
+        * @return string
         */
        public function displaySection( $fields,
                $sectionName = '',
@@ -1302,8 +1302,7 @@ class HTMLForm extends ContextSource {
        /**
         * Stop a reset button being shown for this form
         *
-        * @param bool $suppressReset set to false to re-enable the
-        *     button again
+        * @param bool $suppressReset Set to false to re-enable the button again
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -1318,7 +1317,7 @@ class HTMLForm extends ContextSource {
         * to the form as a whole, after it's submitted but before it's
         * processed.
         *
-        * @param $data
+        * @param array $data
         *
         * @return
         */
@@ -1330,9 +1329,9 @@ class HTMLForm extends ContextSource {
         * Get a string to go in the "<legend>" of a section fieldset.
         * Override this if you want something more complicated.
         *
-        * @param $key String
+        * @param string $key
         *
-        * @return String
+        * @return string
         */
        public function getLegend( $key ) {
                return $this->msg( "{$this->mMessagePrefix}-$key" )->text();
index e6d316c..fdb3924 100644 (file)
@@ -48,7 +48,7 @@ abstract class HTMLFormField {
         *
         * Parameters are the same as wfMessage().
         *
-        * @return Message object
+        * @return Message
         */
        function msg() {
                $args = func_get_args();
@@ -70,7 +70,7 @@ abstract class HTMLFormField {
         * @param string $value The value the field was submitted with
         * @param array $alldata The data collected from the form
         *
-        * @return Mixed Bool true on success, or String error to display.
+        * @return bool|string true on success, or String error to display.
         */
        function validate( $value, $alldata ) {
                if ( isset( $this->mParams['required'] )
@@ -123,7 +123,7 @@ abstract class HTMLFormField {
         * or the input's default value if it has not been set.
         *
         * @param WebRequest $request
-        * @return String the value
+        * @return string The value
         */
        function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
@@ -345,7 +345,7 @@ abstract class HTMLFormField {
         *
         * @param string|null $helptext
         *
-        * @return String
+        * @return string
         */
        public function getHelpTextHtmlDiv( $helptext ) {
                if ( is_null( $helptext ) ) {
@@ -362,7 +362,7 @@ abstract class HTMLFormField {
         * @since 1.20
         *
         * @param string|null $helptext
-        * @return String
+        * @return string
         */
        public function getHelpTextHtmlRaw( $helptext ) {
                return $this->getHelpTextHtmlDiv( $helptext );
@@ -596,8 +596,7 @@ abstract class HTMLFormField {
         * flatten an array of options to a single array, for instance,
         * a set of "<options>" inside "<optgroups>".
         *
-        * @param array $options Associative Array with values either Strings
-        *     or Arrays
+        * @param array $options Associative Array with values either Strings or Arrays
         * @return array Flattened input
         */
        public static function flattenOptions( $options ) {
@@ -617,7 +616,7 @@ abstract class HTMLFormField {
        /**
         * Formats one or more errors as accepted by field validation-callback.
         *
-        * @param string|Message|array $errors String|Message|Array of strings or Message instances
+        * @param string|Message|array $errors Array of strings or Message instances
         * @return string HTML
         * @since 1.18
         */
index f802771..576f5cd 100644 (file)
@@ -70,9 +70,9 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return String
+        * @return string
         */
        function loadDataFromRequest( $request ) {
                if ( $this->mParent->getMethod() == 'post' ) {
index f6f3ad5..2c09ea4 100644 (file)
@@ -5,7 +5,7 @@ interface HTMLNestedFilterable {
         * Support for seperating multi-option preferences into multiple preferences
         * Due to lack of array support.
         *
-        * @param $data array
+        * @param array $data
         */
        function filterDataForSubmit( $data );
 }
index c52f0a8..8765407 100644 (file)
@@ -28,9 +28,9 @@ class HTMLRadioField extends HTMLFormField {
         * This returns a block of all the radio options, in one cell.
         * @see includes/HTMLFormField#getInputHTML()
         *
-        * @param $value String
+        * @param string $value
         *
-        * @return String
+        * @return string
         */
        function getInputHTML( $value ) {
                $html = $this->formatOptions( $this->getOptions(), strval( $value ) );
index bb42d53..19b2f7c 100644 (file)
@@ -60,9 +60,9 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return Array("<overall message>","<select value>","<text field value>")
+        * @return array("<overall message>","<select value>","<text field value>")
         */
        function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
index 21f3b77..a001c43 100644 (file)
@@ -62,9 +62,9 @@ class HTMLSelectOrOtherField extends HTMLTextField {
        }
 
        /**
-        * @param $request WebRequest
+        * @param WebRequest $request
         *
-        * @return String
+        * @return string
         */
        function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
index 5fc1e06..3456373 100644 (file)
@@ -87,7 +87,7 @@ abstract class Job implements IJobSpecification {
         * This may add duplicate at insert time, but they will be
         * removed later on, when the first one is popped.
         *
-        * @param array $jobs of Job objects
+        * @param array $jobs Array of Job objects
         * @return bool
         * @deprecated since 1.21
         */
@@ -102,7 +102,7 @@ abstract class Job implements IJobSpecification {
         * be rolled-back as part of a larger transaction. However,
         * large batches of jobs can cause slave lag.
         *
-        * @param array $jobs of Job objects
+        * @param array $jobs Array of Job objects
         * @return bool
         * @deprecated since 1.21
         */
@@ -115,7 +115,7 @@ abstract class Job implements IJobSpecification {
         * actually find a job; it may be adversely affected by concurrent job
         * runners.
         *
-        * @param $type string
+        * @param string $type
         * @return Job|bool Returns false if there are no jobs
         * @deprecated since 1.21
         */
@@ -139,9 +139,9 @@ abstract class Job implements IJobSpecification {
         *------------------------------------------------------------------------*/
 
        /**
-        * @param $command
-        * @param $title
-        * @param $params array|bool
+        * @param string $command
+        * @param Title $title
+        * @param array|bool $params
         */
        public function __construct( $command, $title, $params = false ) {
                $this->command = $command;
@@ -199,7 +199,7 @@ abstract class Job implements IJobSpecification {
        }
 
        /**
-        * @return integer Number of actually "work items" handled in this job
+        * @return int Number of actually "work items" handled in this job
         * @see $wgJobBackoffThrottling
         * @since 1.23
         */
index 9b13aea..c858e42 100644 (file)
@@ -344,7 +344,7 @@ abstract class JobQueue {
        /**
         * @see JobQueue::batchPush()
         * @param array $jobs
-        * @param $flags
+        * @param array $flags
         */
        abstract protected function doBatchPush( array $jobs, $flags );
 
index 5f1ca14..1991bb4 100644 (file)
@@ -189,7 +189,7 @@ class JobQueueDB extends JobQueue {
        /**
         * @see JobQueue::doBatchPush()
         * @param array $jobs
-        * @param $flags
+        * @param array $flags
         * @throws DBError|Exception
         * @return bool
         */
@@ -338,7 +338,7 @@ class JobQueueDB extends JobQueue {
         * Reserve a row with a single UPDATE without holding row locks over RTTs...
         *
         * @param string $uuid 32 char hex string
-        * @param $rand integer Random unsigned integer (31 bits)
+        * @param int $rand Random unsigned integer (31 bits)
         * @param bool $gte Search for job_random >= $random (otherwise job_random <= $random)
         * @return stdClass|bool Row|false
         */
@@ -774,7 +774,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $index integer (DB_SLAVE/DB_MASTER)
+        * @param int $index (DB_SLAVE/DB_MASTER)
         * @return DBConnRef
         */
        protected function getDB( $index ) {
@@ -786,7 +786,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $property
+        * @param string $property
         * @return string
         */
        private function getCacheKey( $property ) {
@@ -797,7 +797,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $params
+        * @param array|bool $params
         * @return string
         */
        protected static function makeBlob( $params ) {
@@ -809,7 +809,7 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param $blob
+        * @param string $blob
         * @return bool|mixed
         */
        protected static function extractBlob( $blob ) {
index 05ded4e..9d46a00 100644 (file)
@@ -555,7 +555,7 @@ class JobQueueFederated extends JobQueue {
        }
 
        /**
-        * @param $property
+        * @param string $property
         * @return string
         */
        private function getCacheKey( $property ) {
index 6591282..948baa0 100644 (file)
@@ -254,7 +254,7 @@ class JobQueueGroup {
        /**
         * Check if there are any queues with jobs (this is cached)
         *
-        * @param integer $type JobQueueGroup::TYPE_* constant
+        * @param int $type JobQueueGroup::TYPE_* constant
         * @return bool
         * @since 1.23
         */
@@ -414,7 +414,7 @@ class JobQueueGroup {
        }
 
        /**
-        * @param $name string
+        * @param string $name
         * @return mixed
         */
        private function getCachedConfigVar( $name ) {
index 135a61d..f5a266e 100644 (file)
@@ -194,7 +194,7 @@ class JobQueueRedis extends JobQueue {
        /**
         * @see JobQueue::doBatchPush()
         * @param array $jobs
-        * @param $flags
+        * @param array $flags
         * @return bool
         * @throws JobQueueError
         */
@@ -350,7 +350,7 @@ LUA;
 
        /**
         * @param RedisConnRef $conn
-        * @return array serialized string or false
+        * @return array Serialized string or false
         * @throws RedisException
         */
        protected function popAndDeleteBlob( RedisConnRef $conn ) {
@@ -383,7 +383,7 @@ LUA;
 
        /**
         * @param RedisConnRef $conn
-        * @return array serialized string or false
+        * @return array Serialized string or false
         * @throws RedisException
         */
        protected function popAndAcquireBlob( RedisConnRef $conn ) {
@@ -614,8 +614,8 @@ LUA;
        /**
         * This function should not be called outside JobQueueRedis
         *
-        * @param $uid string
-        * @param $conn RedisConnRef
+        * @param string $uid
+        * @param RedisConnRef $conn
         * @return Job|bool Returns false if the job does not exist
         * @throws MWException|JobQueueError
         */
@@ -773,7 +773,7 @@ LUA;
        }
 
        /**
-        * @param $fields array
+        * @param array $fields
         * @return Job|bool
         */
        protected function getJobFromFields( array $fields ) {
@@ -840,8 +840,8 @@ LUA;
        }
 
        /**
-        * @param $conn RedisConnRef
-        * @param $e RedisException
+        * @param RedisConnRef $conn
+        * @param RedisException $e
         * @throws JobQueueError
         */
        protected function throwRedisException( RedisConnRef $conn, $e ) {
@@ -850,8 +850,8 @@ LUA;
        }
 
        /**
-        * @param $prop string
-        * @param $type string|null
+        * @param string $prop
+        * @param string|null $type
         * @return string
         */
        private function getQueueKey( $prop, $type = null ) {
@@ -865,7 +865,7 @@ LUA;
        }
 
        /**
-        * @param $key string
+        * @param string $key
         * @return void
         */
        public function setTestingPrefix( $key ) {
index 94b56ef..34c302e 100644 (file)
@@ -42,9 +42,9 @@ class DoubleRedirectJob extends Job {
 
        /**
         * Insert jobs into the job queue to fix redirects to the given title
-        * @param string $reason the reason for the fix, see message
+        * @param string $reason The reason for the fix, see message
         *   "double-redirect-fixed-<reason>"
-        * @param $redirTitle Title: the title which has changed, redirects
+        * @param Title $redirTitle The title which has changed, redirects
         *   pointing to this title are fixed
         * @param bool $destTitle Not used
         */
@@ -177,9 +177,9 @@ class DoubleRedirectJob extends Job {
        /**
         * Get the final destination of a redirect
         *
-        * @param $title Title
+        * @param Title $title
         *
-        * @return bool if the specified title is not a redirect, or if it is a circular redirect
+        * @return bool If the specified title is not a redirect, or if it is a circular redirect
         */
        public static function getFinalDestination( $title ) {
                $dbw = wfGetDB( DB_MASTER );
index 1a27e1f..97405ae 100644 (file)
@@ -37,7 +37,7 @@ class RefreshLinksJob2 extends Job {
 
        /**
         * Run a refreshLinks2 job
-        * @return boolean success
+        * @return bool Success
         */
        function run() {
                global $wgUpdateRowsPerJob;
@@ -101,9 +101,9 @@ class RefreshLinksJob2 extends Job {
        }
 
        /**
-        * @param $table string
-        * @param $masterPos mixed
-        * @return Array
+        * @param string $table
+        * @param mixed $masterPos
+        * @return array
         */
        protected function getSingleTitleJobs( $table, $masterPos ) {
                # The "start"/"end" fields are not set for the base jobs
@@ -128,7 +128,7 @@ class RefreshLinksJob2 extends Job {
        }
 
        /**
-        * @return Array
+        * @return array
         */
        public function getDeduplicationInfo() {
                $info = parent::getDeduplicationInfo();
index 2cdac57..480246b 100644 (file)
@@ -174,7 +174,7 @@ class UploadFromUrlJob extends Job {
        }
 
        /**
-        * @param $key
+        * @param string $key
         * @return mixed
         */
        public static function &getSessionData( $key ) {
index 967b017..d8b0ba6 100644 (file)
@@ -51,7 +51,7 @@ class BmpHandler extends BitmapHandler {
        /**
         * Get width and height from the bmp header.
         *
-        * @param $image
+        * @param File $image
         * @param string $filename
         * @return array
         */
index d296269..c105c42 100644 (file)
@@ -31,8 +31,8 @@
  */
 class BitmapHandler_ClientOnly extends BitmapHandler {
        /**
-        * @param $image File
-        * @param $params
+        * @param File $image
+        * @param array $params
         * @return bool
         */
        function normaliseParams( $image, &$params ) {
index 2aeb35d..aeba647 100644 (file)
@@ -260,7 +260,7 @@ class DjVuHandler extends ImageHandler {
         * Get metadata, unserializing it if neccessary.
         *
         * @param File $file The DjVu file in question
-        * @return String XML metadata as a string.
+        * @return string XML metadata as a string.
         */
        private function getUnserializedMetadata( File $file ) {
                $metadata = $file->getMetadata();
index e1e7992..099375b 100644 (file)
@@ -60,7 +60,7 @@ class DjVuImage {
 
        /**
         * Return data in the style of getimagesize()
-        * @return array or false on failure
+        * @return array|bool Array or false on failure
         */
        public function getImageSize() {
                $data = $this->getInfo();
@@ -330,7 +330,7 @@ EOR;
 
        /**
         * Hack to temporarily work around djvutoxml bug
-        * @param $dump
+        * @param string $dump
         * @return string
         */
        function convertDumpToXML( $dump ) {
index 4bbafc1..ae1ff9d 100644 (file)
@@ -80,7 +80,7 @@ class ExifBitmapHandler extends BitmapHandler {
        }
 
        /**
-        * @param $image
+        * @param File $image
         * @param array $metadata
         * @return bool|int
         */
@@ -198,7 +198,7 @@ class ExifBitmapHandler extends BitmapHandler {
         * the width and height we normally work with is logical, and will match
         * any produced output views.
         *
-        * @param $file File
+        * @param File $file
         * @return int 0, 90, 180 or 270
         */
        public function getRotation( $file ) {
index adaba76..fca1c6d 100644 (file)
@@ -985,7 +985,7 @@ class FormatMetadata extends ContextSource {
         * @param bool $noHtml If to avoid returning anything resembling HTML.
         *   (Ugly hack for backwards compatibility with old MediaWiki).
         * @param bool|IContextSource $context
-        * @return String single value (in wiki-syntax).
+        * @return string Single value (in wiki-syntax).
         * @since 1.23
         */
        public static function flattenArrayContentLang( $vals, $type = 'ul',
@@ -1036,9 +1036,9 @@ class FormatMetadata extends ContextSource {
         *     lang = language assoc array with keys being the lang code
         *     ul = unordered list, ol = ordered list
         *     type can also come from the '_type' member of $vals.
-        * @param $noHtml Boolean If to avoid returning anything resembling HTML.
+        * @param bool $noHtml If to avoid returning anything resembling HTML.
         *   (Ugly hack for backwards compatibility with old mediawiki).
-        * @return String single value (in wiki-syntax).
+        * @return string Single value (in wiki-syntax).
         * @since 1.23
         */
        public function flattenArrayReal( $vals, $type = 'ul', $noHtml = false ) {
@@ -1156,8 +1156,8 @@ class FormatMetadata extends ContextSource {
 
        /** Helper function for creating lists of translations.
         *
-        * @param string $value value (this is not escaped)
-        * @param string $lang lang code of item or false
+        * @param string $value Value (this is not escaped)
+        * @param string $lang Lang code of item or false
         * @param bool $default If it is default value.
         * @param bool $noHtml If to avoid html (for back-compat)
         * @throws MWException
index e4caf35..0c18821 100644 (file)
@@ -495,7 +495,7 @@ abstract class MediaHandler {
         * This is used by the media handlers that use the FormatMetadata class
         *
         * @param array $metadataArray Metadata array
-        * @return array for use displaying metadata.
+        * @return array Array for use displaying metadata.
         */
        function formatMetadataHelper( $metadataArray ) {
                $result = array(
@@ -523,7 +523,7 @@ abstract class MediaHandler {
         * Get a list of metadata items which should be displayed when
         * the metadata table is collapsed.
         *
-        * @return array of strings
+        * @return array Array of strings
         */
        protected function visibleMetadataFields() {
                return FormatMetadata::getVisibleFields();
@@ -644,7 +644,7 @@ abstract class MediaHandler {
         * Shown in file history box on image description page.
         *
         * @param File $file
-        * @return String Dimensions
+        * @return string Dimensions
         */
        function getDimensionsString( $file ) {
                return '';
@@ -776,7 +776,7 @@ abstract class MediaHandler {
         * Get list of languages file can be viewed in.
         *
         * @param File $file
-        * @return Array Array of language codes, or empty array if unsupported.
+        * @return array Array of language codes, or empty array if unsupported.
         * @since 1.23
         */
        public function getAvailableLanguages( File $file ) {
@@ -792,7 +792,7 @@ abstract class MediaHandler {
         * type do not support alternative language renderings.
         *
         * @param File $file
-        * @return String language code or null if multi-language not supported for filetype.
+        * @return string Language code or null if multi-language not supported for filetype.
         * @since 1.23
         */
        public function getDefaultRenderLanguage( File $file ) {
index 05feb30..f6f10d3 100644 (file)
@@ -218,7 +218,7 @@ abstract class MediaTransformOutput {
        }
 
        /**
-        * @param $title string
+        * @param string $title
         * @param string|array $params Query parameters to add
         * @return array
         */
index ce7fcbb..5a10741 100644 (file)
@@ -86,7 +86,7 @@ class SvgHandler extends ImageHandler {
         * this list.
         *
         * @param File $file
-        * @return Array of language codes, or empty if no language switching supported.
+        * @return array Array of language codes, or empty if no language switching supported.
         */
        public function getAvailableLanguages( File $file ) {
                $metadata = $file->getMetadata();
@@ -107,7 +107,7 @@ class SvgHandler extends ImageHandler {
        /**
         * What language to render file in if none selected.
         *
-        * @return String language code.
+        * @return string Language code.
         */
        public function getDefaultRenderLanguage( File $file ) {
                return 'en';
index 361eb94..2a1091d 100644 (file)
@@ -123,7 +123,7 @@ class SVGReader {
        }
 
        /**
-        * @return Array with the known metadata
+        * @return array Array with the known metadata
         */
        public function getMetadata() {
                return $this->metadata;
index 08d416a..55d5319 100644 (file)
@@ -159,7 +159,7 @@ class XMPReader {
        /** Get the result array. Do some post-processing before returning
         * the array, and transform any metadata that is special-cased.
         *
-        * @return Array array of results as an array of arrays suitable for
+        * @return array Array of results as an array of arrays suitable for
         *    FormatMetadata::getFormattedData().
         */
        public function getResults() {
@@ -851,8 +851,8 @@ class XMPReader {
         * This is generally where most properties start.
         *
         * @param string $ns Namespace
-        * @param string $tag tag name (without namespace prefix)
-        * @param array $attribs array of attributes
+        * @param string $tag Tag name (without namespace prefix)
+        * @param array $attribs Array of attributes
         * @throws MWException
         */
        private function startElementModeInitial( $ns, $tag, $attribs ) {
@@ -1041,7 +1041,7 @@ class XMPReader {
         * Generally just calls a helper based on what MODE we're in.
         * Also does some initial set up for the wrapper element
         *
-        * @param $parser XMLParser
+        * @param XMLParser $parser
         * @param string $elm Namespace "<space>" element
         * @param array $attribs Attribute name => value
         * @throws MWException
index 4362217..0fa6011 100644 (file)
@@ -142,7 +142,7 @@ class XMPValidate {
         * choices. (closed choice)
         *
         * @param array $info Information about current property
-        * @param &$val Mixed current value to validate
+        * @param mixed &$val Current value to validate
         * @param bool $standalone If this is a simple property or array
         */
        public static function validateClosed( $info, &$val, $standalone ) {
@@ -172,7 +172,7 @@ class XMPValidate {
         * function to validate and modify flash structure
         *
         * @param array $info Information about current property
-        * @param &$val Mixed current value to validate
+        * @param mixed &$val Current value to validate
         * @param bool $standalone If this is a simple property or array
         */
        public static function validateFlash( $info, &$val, $standalone ) {
@@ -206,7 +206,7 @@ class XMPValidate {
         * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf page 30 (section 8.2.2.5)
         *
         * @param array $info Information about current property
-        * @param &$val Mixed current value to validate
+        * @param mixed &$val Current value to validate
         * @param bool $standalone If this is a simple property or array
         */
        public static function validateLangCode( $info, &$val, $standalone ) {
index dfe3c80..464bacd 100644 (file)
@@ -53,7 +53,7 @@ class CacheTime {
        }
 
        /**
-        * @param $com bool
+        * @param bool $com
         * @return bool
         */
        function setContainsOldMagic( $com ) {
@@ -63,7 +63,7 @@ class CacheTime {
        /**
         * setCacheTime() sets the timestamp expressing when the page has been rendered.
         * This does not control expiry, see updateCacheExpiry() for that!
-        * @param $t string
+        * @param string $t
         * @return string
         */
        function setCacheTime( $t ) {
@@ -80,7 +80,7 @@ class CacheTime {
 
        /**
         * @since 1.23
-        * @param $id int Revision id
+        * @param int $id Revision id
         */
        function setCacheRevisionId( $id ) {
                $this->mCacheRevisionId = $id;
@@ -94,7 +94,7 @@ class CacheTime {
         * or equal to the smallest number that was provided as an argument to
         * updateCacheExpiry().
         *
-        * @param $seconds number
+        * @param int $seconds
         */
        function updateCacheExpiry( $seconds ) {
                $seconds = (int)$seconds;
@@ -156,8 +156,8 @@ class CacheTime {
         * per-article cache invalidation timestamps, or if it comes from
         * an incompatible older version.
         *
-        * @param string $touched the affected article's last touched timestamp
-        * @return Boolean
+        * @param string $touched The affected article's last touched timestamp
+        * @return bool
         */
        public function expired( $touched ) {
                global $wgCacheEpoch;
@@ -178,8 +178,8 @@ class CacheTime {
         * deployed. Someday that should probably be changed.
         *
         * @since 1.23
-        * @param int $id the affected article's current revision id
-        * @return Boolean
+        * @param int $id The affected article's current revision id
+        * @return bool
         */
        public function isDifferentRevision( $id ) {
                $cached = $this->getCacheRevisionId();
index 02f2438..65c3e1d 100644 (file)
@@ -27,7 +27,7 @@
  */
 class CoreParserFunctions {
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @return void
         */
        static function register( $parser ) {
@@ -76,7 +76,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @param string $part1
         * @return array
         */
@@ -144,7 +144,7 @@ class CoreParserFunctions {
         * Or to encode a value for the HTTP "path", spaces are encoded as '%20'.
         * For links to "wiki"s, or similar software, spaces are encoded as '_',
         *
-        * @param $parser Parser object
+        * @param Parser $parser
         * @param string $s The text to encode.
         * @param string $arg (optional): The type of encoding.
         * @return string
@@ -186,7 +186,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @param string $s
         * @return
         */
@@ -196,7 +196,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @param string $s
         * @return
         */
@@ -265,7 +265,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @param string $num
         * @param string $arg
         * @return string
@@ -282,7 +282,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @param string $case
         * @param string $word
         * @return
@@ -293,8 +293,8 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
-        * @param $username string
+        * @param Parser $parser
+        * @param string $username
         * @return
         */
        static function gender( $parser, $username ) {
@@ -335,7 +335,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @param string $text
         * @return
         */
@@ -350,9 +350,9 @@ class CoreParserFunctions {
         * Override the title of the page when viewed, provided we've been given a
         * title which will normalise to the canonical title
         *
-        * @param $parser Parser: parent parser
-        * @param string $text desired title text
-        * @return String
+        * @param Parser $parser Parent parser
+        * @param string $text Desired title text
+        * @return string
         */
        static function displaytitle( $parser, $text = '' ) {
                global $wgRestrictDisplayTitle;
@@ -408,9 +408,9 @@ class CoreParserFunctions {
        /**
         * Matches the given value against the value of given magic word
         *
-        * @param string $magicword magic word key
-        * @param mixed $value value to match
-        * @return boolean true on successful match
+        * @param string $magicword Magic word key
+        * @param string $value Value to match
+        * @return bool True on successful match
         */
        private static function matchAgainstMagicword( $magicword, $value ) {
                $value = trim( strval( $value ) );
@@ -521,7 +521,7 @@ class CoreParserFunctions {
        /**
         * Functions to get and normalize pagenames, corresponding to the magic words
         * of the same names
-        * @return String
+        * @return string
         */
        static function pagename( $parser, $title = null ) {
                $t = Title::newFromText( $title );
@@ -690,9 +690,9 @@ class CoreParserFunctions {
         * Return the size of the given page, or 0 if it's nonexistent.  This is an
         * expensive parser function and can't be called too many times per page.
         *
-        * @param $parser Parser
-        * @param $page String Name of page to check (Default: empty string)
-        * @param $raw String Should number be human readable with commas or just number
+        * @param Parser $parser
+        * @param string $page Name of page to check (Default: empty string)
+        * @param string $raw Should number be human readable with commas or just number
         * @return string
         */
        static function pagesize( $parser, $page = '', $raw = null ) {
@@ -736,10 +736,10 @@ class CoreParserFunctions {
 
        /**
         * Gives language names.
-        * @param $parser Parser
-        * @param string $code  Language code (of which to get name)
-        * @param string $inLanguage  Language code (in which to get name)
-        * @return String
+        * @param Parser $parser
+        * @param string $code Language code (of which to get name)
+        * @param string $inLanguage Language code (in which to get name)
+        * @return string
         */
        static function language( $parser, $code = '', $inLanguage = '' ) {
                $code = strtolower( $code );
@@ -750,6 +750,11 @@ class CoreParserFunctions {
 
        /**
         * Unicode-safe str_pad with the restriction that $length is forced to be <= 500
+        * @param Parser $parser
+        * @param string $string
+        * @param int $length
+        * @param string $padding
+        * @param int $direction
         * @return string
         */
        static function pad( $parser, $string, $length, $padding = '0', $direction = STR_PAD_RIGHT ) {
@@ -787,8 +792,8 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
-        * @param $text
+        * @param Parser $parser
+        * @param string $text
         * @return string
         */
        static function anchorencode( $parser, $text ) {
@@ -813,7 +818,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @param string $text The sortkey to use
         * @param string $uarg Either "noreplace" or "noerror" (in en)
         *   both suppress errors, and noreplace does nothing if
@@ -888,6 +893,9 @@ class CoreParserFunctions {
 
        /**
         * Parser function to extension tag adaptor
+        * @param Parser $parser
+        * @param PPFrame $frame
+        * @param array $args
         * @return string
         */
        public static function tagObj( $parser, $frame, $args ) {
@@ -938,8 +946,8 @@ class CoreParserFunctions {
         * For a given title, which is equal to the current parser title,
         * the revision object from the parser is used, when that is the current one
         *
-        * @param $parser Parser
-        * @param $title Title
+        * @param Parser $parser
+        * @param Title $title
         * @return Revision
         * @since 1.23
         */
@@ -985,8 +993,8 @@ class CoreParserFunctions {
 
        /**
         * Get the pageid of a specified page
-        * @param $parser Parser
-        * @param $title string Title to get the pageid from
+        * @param Parser $parser
+        * @param string $title Title to get the pageid from
         * @since 1.23
         */
        public static function pageid( $parser, $title = null ) {
@@ -1029,8 +1037,8 @@ class CoreParserFunctions {
 
        /**
         * Get the id from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the id from
+        * @param Parser $parser
+        * @param string $title Title to get the id from
         * @since 1.23
         */
        public static function revisionid( $parser, $title = null ) {
@@ -1045,8 +1053,8 @@ class CoreParserFunctions {
 
        /**
         * Get the day from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the day from
+        * @param Parser $parser
+        * @param string $title Title to get the day from
         * @since 1.23
         */
        public static function revisionday( $parser, $title = null ) {
@@ -1061,8 +1069,8 @@ class CoreParserFunctions {
 
        /**
         * Get the day with leading zeros from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the day from
+        * @param Parser $parser
+        * @param string $title Title to get the day from
         * @since 1.23
         */
        public static function revisionday2( $parser, $title = null ) {
@@ -1077,8 +1085,8 @@ class CoreParserFunctions {
 
        /**
         * Get the month with leading zeros from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the month from
+        * @param Parser $parser
+        * @param string $title Title to get the month from
         * @since 1.23
         */
        public static function revisionmonth( $parser, $title = null ) {
@@ -1093,8 +1101,8 @@ class CoreParserFunctions {
 
        /**
         * Get the month from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the month from
+        * @param Parser $parser
+        * @param string $title Title to get the month from
         * @since 1.23
         */
        public static function revisionmonth1( $parser, $title = null ) {
@@ -1109,8 +1117,8 @@ class CoreParserFunctions {
 
        /**
         * Get the year from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the year from
+        * @param Parser $parser
+        * @param string $title Title to get the year from
         * @since 1.23
         */
        public static function revisionyear( $parser, $title = null ) {
@@ -1125,8 +1133,8 @@ class CoreParserFunctions {
 
        /**
         * Get the timestamp from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the timestamp from
+        * @param Parser $parser
+        * @param string $title Title to get the timestamp from
         * @since 1.23
         */
        public static function revisiontimestamp( $parser, $title = null ) {
@@ -1141,8 +1149,8 @@ class CoreParserFunctions {
 
        /**
         * Get the user from the last revision of a specified page.
-        * @param $parser Parser
-        * @param $title string Title to get the user from
+        * @param Parser $parser
+        * @param string $title Title to get the user from
         * @since 1.23
         */
        public static function revisionuser( $parser, $title = null ) {
index cbc060a..01ad97c 100644 (file)
@@ -27,7 +27,7 @@
  */
 class CoreTagHooks {
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @return void
         */
        static function register( $parser ) {
@@ -69,9 +69,9 @@ class CoreTagHooks {
         *
         * Uses undocumented extended tag hook return values, introduced in r61913.
         *
-        * @param $content string
-        * @param $attributes array
-        * @param $parser Parser
+        * @param string $content
+        * @param array $attributes
+        * @param Parser $parser
         * @throws MWException
         * @return array
         */
@@ -91,9 +91,9 @@ class CoreTagHooks {
         *
         * Uses undocumented extended tag hook return values, introduced in r61913.
         *
-        * @param $content string
-        * @param $attributes array
-        * @param $parser Parser
+        * @param string $content
+        * @param array $attributes
+        * @param Parser $parser
         * @return array
         */
        static function nowiki( $content, $attributes, $parser ) {
index d10841f..3ddc9d4 100644 (file)
@@ -49,7 +49,7 @@ class DateFormatter {
        const LAST = 8;
 
        /**
-        * @param $lang Language In which language to format the date
+        * @param Language $lang In which language to format the date
         */
        function __construct( Language $lang ) {
                $this->lang = $lang;
@@ -120,7 +120,7 @@ class DateFormatter {
        /**
         * Get a DateFormatter object
         *
-        * @param $lang Language|string|null In which language to format the date
+        * @param Language|string|null $lang In which language to format the date
         *              Defaults to the site content language
         * @return DateFormatter object
         */
@@ -142,7 +142,7 @@ class DateFormatter {
        /**
         * @param string $preference User preference
         * @param string $text Text to reformat
-        * @param array $options can contain 'linked' and/or 'match-whole'
+        * @param array $options Array can contain 'linked' and/or 'match-whole'
         *
         * @return string
         */
@@ -193,7 +193,7 @@ class DateFormatter {
        }
 
        /**
-        * @param $matches
+        * @param array $matches
         * @return string
         */
        function replace( $matches ) {
@@ -215,8 +215,8 @@ class DateFormatter {
        }
 
        /**
-        * @param $bits array
-        * @param $link bool
+        * @param array $bits
+        * @param bool $link
         * @return string
         */
        function formatDate( $bits, $link = true ) {
@@ -326,7 +326,7 @@ class DateFormatter {
 
        /**
         * Makes an ISO month, e.g. 02, from a month name
-        * @param string $monthName month name
+        * @param string $monthName Month name
         * @return string ISO month name
         */
        function makeIsoMonth( $monthName ) {
index 0e7c76f..2f95af2 100644 (file)
@@ -49,8 +49,8 @@ class LinkHolderArray {
         * serializing at present.
         *
         * Compact the titles, only serialize the text form.
-         * @return array
-         */
+        * @return array
+        */
        function __sleep() {
                foreach ( $this->internals as &$nsLinks ) {
                        foreach ( $nsLinks as &$entry ) {
@@ -88,7 +88,7 @@ class LinkHolderArray {
 
        /**
         * Merge another LinkHolderArray into this one
-        * @param $other LinkHolderArray
+        * @param LinkHolderArray $other
         */
        function merge( $other ) {
                foreach ( $other->internals as $ns => $entries ) {
@@ -110,9 +110,9 @@ class LinkHolderArray {
         * converted for use in the destination link holder. The resulting array of
         * strings will be returned.
         *
-        * @param $other LinkHolderArray
-        * @param array $texts of strings
-        * @return Array
+        * @param LinkHolderArray $other
+        * @param array $texts Array of strings
+        * @return array
         */
        function mergeForeign( $other, $texts ) {
                $this->tempIdOffset = $idOffset = $this->parent->nextLinkID();
@@ -208,8 +208,8 @@ class LinkHolderArray {
         * parsing of interwiki links, and secondly to allow all existence checks and
         * article length checks (for stub links) to be bundled into a single query.
         *
-        * @param $nt Title
-        * @param $text String
+        * @param Title $nt
+        * @param string $text
         * @param array $query [optional]
         * @param string $trail [optional]
         * @param string $prefix [optional]
@@ -253,7 +253,7 @@ class LinkHolderArray {
        /**
         * Replace <!--LINK--> link placeholders with actual links, in the buffer
         *
-        * @return array of link CSS classes, indexed by PDBK.
+        * @return array Array of link CSS classes, indexed by PDBK.
         */
        function replace( &$text ) {
                wfProfileIn( __METHOD__ );
@@ -267,6 +267,7 @@ class LinkHolderArray {
 
        /**
         * Replace internal links
+        * @param string $text
         */
        protected function replaceInternal( &$text ) {
                if ( !$this->internals ) {
@@ -418,6 +419,7 @@ class LinkHolderArray {
 
        /**
         * Replace interwiki links
+        * @param string $text
         */
        protected function replaceInterwiki( &$text ) {
                if ( empty( $this->interwikis ) ) {
@@ -443,6 +445,7 @@ class LinkHolderArray {
 
        /**
         * Modify $this->internals and $colours according to language variant linking rules
+        * @param array $colours
         */
        protected function doVariants( &$colours ) {
                global $wgContLang;
@@ -606,8 +609,8 @@ class LinkHolderArray {
         * Replace <!--LINK--> link placeholders with plain text of links
         * (not HTML-formatted).
         *
-        * @param $text String
-        * @return String
+        * @param string $text
+        * @return string
         */
        function replaceText( $text ) {
                wfProfileIn( __METHOD__ );
@@ -624,7 +627,7 @@ class LinkHolderArray {
        /**
         * Callback for replaceText()
         *
-        * @param $matches Array
+        * @param array $matches
         * @return string
         * @private
         */
index 6818884..7423006 100644 (file)
@@ -205,7 +205,7 @@ class Parser {
        var $mUniqPrefix;
 
        /**
-        * @var Array with the language name of each language link (i.e. the
+        * @var array Array with the language name of each language link (i.e. the
         * interwiki prefix) in the key, value arbitrary. Used to avoid sending
         * duplicate language links to the ParserOutput.
         */
@@ -214,7 +214,7 @@ class Parser {
        /**
         * Constructor
         *
-        * @param $conf array
+        * @param array $conf
         */
        public function __construct( $conf = array() ) {
                $this->mConf = $conf;
@@ -346,12 +346,12 @@ class Parser {
         * Do not call this function recursively.
         *
         * @param string $text text we want to parse
-        * @param $title Title object
-        * @param $options ParserOptions
-        * @param $linestart boolean
-        * @param $clearState boolean
-        * @param int $revid number to pass in {{REVISIONID}}
-        * @return ParserOutput a ParserOutput
+        * @param Title $title
+        * @param ParserOptions $options
+        * @param bool $linestart
+        * @param bool $clearState
+        * @param int $revid Number to pass in {{REVISIONID}}
+        * @return ParserOutput A ParserOutput
         */
        public function parse( $text, Title $title, ParserOptions $options, $linestart = true, $clearState = true, $revid = null ) {
                /**
@@ -590,7 +590,7 @@ class Parser {
         *
         * If $frame is not provided, then template variables (e.g., {{{1}}}) within $text are not expanded
         *
-        * @param string $text text extension wants to have parsed
+        * @param string $text Text extension wants to have parsed
         * @param PPFrame $frame The frame to use for expanding any template variables
         *
         * @return string
@@ -607,6 +607,10 @@ class Parser {
        /**
         * Expand templates and variables in the text, producing valid, static wikitext.
         * Also removes comments.
+        * @param string $text
+        * @param Title $title
+        * @param ParserOptions $options
+        * @param int|null $revid
         * @return mixed|string
         */
        function preprocess( $text, Title $title = null, ParserOptions $options, $revid = null ) {
@@ -627,7 +631,7 @@ class Parser {
         * Recursive parser entry point that can be called from an extension tag
         * hook.
         *
-        * @param string $text text to be expanded
+        * @param string $text Text to be expanded
         * @param PPFrame $frame The frame to use for expanding any template variables
         * @return string
         * @since 1.19
@@ -647,11 +651,11 @@ class Parser {
         * transclusion, comments, templates, arguments, tags hooks and parser
         * functions are untouched.
         *
-        * @param $text String
-        * @param $title Title
-        * @param $options ParserOptions
-        * @param $params Array
-        * @return String
+        * @param string $text
+        * @param Title $title
+        * @param ParserOptions $options
+        * @param array $params
+        * @return string
         */
        public function getPreloadText( $text, Title $title, ParserOptions $options, $params = array() ) {
                $msg = new RawMessage( $text );
@@ -689,7 +693,7 @@ class Parser {
        /**
         * Accessor for mUniqPrefix.
         *
-        * @return String
+        * @return string
         */
        public function uniqPrefix() {
                if ( !isset( $this->mUniqPrefix ) ) {
@@ -707,7 +711,7 @@ class Parser {
        /**
         * Set the context title
         *
-        * @param $t Title
+        * @param Title $t
         */
        function setTitle( $t ) {
                if ( !$t ) {
@@ -726,7 +730,7 @@ class Parser {
        /**
         * Accessor for the Title object
         *
-        * @return Title object
+        * @return Title
         */
        function getTitle() {
                return $this->mTitle;
@@ -735,8 +739,8 @@ class Parser {
        /**
         * Accessor/mutator for the Title object
         *
-        * @param $x Title object or null to just get the current one
-        * @return Title object
+        * @param Title $x Title object or null to just get the current one
+        * @return Title
         */
        function Title( $x = null ) {
                return wfSetVar( $this->mTitle, $x );
@@ -745,7 +749,7 @@ class Parser {
        /**
         * Set the output type
         *
-        * @param int $ot new value
+        * @param int $ot New value
         */
        function setOutputType( $ot ) {
                $this->mOutputType = $ot;
@@ -762,7 +766,7 @@ class Parser {
         * Accessor/mutator for the output type
         *
         * @param int|null $x New value or null to just get the current one
-        * @return Integer
+        * @return int
         */
        function OutputType( $x = null ) {
                return wfSetVar( $this->mOutputType, $x );
@@ -771,7 +775,7 @@ class Parser {
        /**
         * Get the ParserOutput object
         *
-        * @return ParserOutput object
+        * @return ParserOutput
         */
        function getOutput() {
                return $this->mOutput;
@@ -789,7 +793,7 @@ class Parser {
        /**
         * Accessor/mutator for the ParserOptions object
         *
-        * @param $x ParserOptions New value or null to just get the current one
+        * @param ParserOptions $x New value or null to just get the current one
         * @return ParserOptions Current ParserOptions object
         */
        function Options( $x = null ) {
@@ -804,7 +808,7 @@ class Parser {
        }
 
        /**
-        * @param $id int
+        * @param int $id
         */
        function setLinkID( $id ) {
                $this->mLinkID = $id;
@@ -843,6 +847,7 @@ class Parser {
 
        /**
         * Get the language object for language conversion
+        * @return Language|null
         */
        function getConverterLanguage() {
                return $this->getTargetLanguage();
@@ -852,7 +857,7 @@ class Parser {
         * Get a User object either from $this->mUser, if set, or from the
         * ParserOptions object otherwise
         *
-        * @return User object
+        * @return User
         */
        function getUser() {
                if ( !is_null( $this->mUser ) ) {
@@ -864,7 +869,7 @@ class Parser {
        /**
         * Get a preprocessor object
         *
-        * @return Preprocessor instance
+        * @return Preprocessor
         */
        function getPreprocessor() {
                if ( !isset( $this->mPreprocessor ) ) {
@@ -970,7 +975,7 @@ class Parser {
         * Returns the unique tag which must be inserted into the stripped text
         * The tag will be replaced with the original text in unstrip()
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -985,6 +990,7 @@ class Parser {
         * parse the wiki syntax used to render tables
         *
         * @private
+        * @param string $text
         * @return string
         */
        function doTableStuff( $text ) {
@@ -1183,9 +1189,9 @@ class Parser {
         *
         * @private
         *
-        * @param $text string
-        * @param $isMain bool
-        * @param $frame bool
+        * @param string $text
+        * @param bool $isMain
+        * @param bool $frame
         *
         * @return string
         */
@@ -1253,7 +1259,7 @@ class Parser {
         * DML
         * @private
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -1279,7 +1285,7 @@ class Parser {
 
        /**
         * @throws MWException
-        * @param $m array
+        * @param array $m
         * @return HTML|string
         */
        function magicLinkCallback( $m ) {
@@ -1330,7 +1336,7 @@ class Parser {
        /**
         * Make a free external link, given a user-supplied URL
         *
-        * @param $url string
+        * @param string $url
         *
         * @return string HTML
         * @private
@@ -1386,7 +1392,7 @@ class Parser {
         *
         * @private
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -1404,7 +1410,7 @@ class Parser {
         * Replace single quotes with HTML markup
         * @private
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string the altered text
         */
@@ -1423,7 +1429,7 @@ class Parser {
        /**
         * Helper function for doAllQuotes()
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -1612,7 +1618,7 @@ class Parser {
         *
         * @private
         *
-        * @param $text string
+        * @param string $text
         *
         * @throws MWException
         * @return string
@@ -1693,10 +1699,10 @@ class Parser {
         * Get the rel attribute for a particular external link.
         *
         * @since 1.21
-        * @param string|bool $url optional URL, to extract the domain from for rel =>
+        * @param string|bool $url Optional URL, to extract the domain from for rel =>
         *   nofollow if appropriate
-        * @param $title Title optional Title, for wgNoFollowNsExceptions lookups
-        * @return string|null rel attribute for $url
+        * @param Title $title Optional Title, for wgNoFollowNsExceptions lookups
+        * @return string|null Rel attribute for $url
         */
        public static function getExternalLinkRel( $url = false, $title = null ) {
                global $wgNoFollowLinks, $wgNoFollowNsExceptions, $wgNoFollowDomainExceptions;
@@ -1715,9 +1721,9 @@ class Parser {
         * (depending on configuration, namespace, and the URL's domain) and/or a
         * target attribute (depending on configuration).
         *
-        * @param string|bool $url optional URL, to extract the domain from for rel =>
+        * @param string|bool $url Optional URL, to extract the domain from for rel =>
         *   nofollow if appropriate
-        * @return Array associative array of HTML attributes
+        * @return array Associative array of HTML attributes
         */
        function getExternalLinkAttribs( $url = false ) {
                $attribs = array();
@@ -1732,8 +1738,8 @@ class Parser {
        /**
         * Replace unusual URL escape codes with their equivalent characters
         *
-        * @param $url String
-        * @return String
+        * @param string $url
+        * @return string
         *
         * @todo This can merge genuinely required bits in the path or query string,
         *       breaking legit URLs. A proper fix would treat the various parts of
@@ -1749,7 +1755,7 @@ class Parser {
         * Callback function used in replaceUnusualEscapes().
         * Replaces unusual URL escape codes with their equivalent character
         *
-        * @param $matches array
+        * @param array $matches
         *
         * @return string
         */
@@ -1771,7 +1777,7 @@ class Parser {
         * option, through the exception, or through the on-wiki whitelist
         * @private
         *
-        * $param $url string
+        * $param string $url
         *
         * @return string
         */
@@ -1834,7 +1840,7 @@ class Parser {
 
        /**
         * Process [[ ]] wikilinks (RIL)
-        * @param $s
+        * @param string $s
         * @throws MWException
         * @return LinkHolderArray
         *
@@ -2214,7 +2220,7 @@ class Parser {
 
        /**
         * Return true if subpage links should be expanded on this page.
-        * @return Boolean
+        * @return bool
         */
        function areSubpagesAllowed() {
                # Some namespaces don't allow subpages
@@ -2254,8 +2260,8 @@ class Parser {
         * of both arguments, starting at the beginning of both.
         * @private
         *
-        * @param $st1 string
-        * @param $st2 string
+        * @param string $st1
+        * @param string $st2
         *
         * @return int
         */
@@ -2279,7 +2285,7 @@ class Parser {
         * element appropriate to the prefix character passed into them.
         * @private
         *
-        * @param $char string
+        * @param string $char
         *
         * @return string
         */
@@ -2304,7 +2310,7 @@ class Parser {
 
        /**
         * TODO: document
-        * @param $char String
+        * @param string $char
         * @private
         *
         * @return string
@@ -2330,7 +2336,7 @@ class Parser {
 
        /**
         * TODO: document
-        * @param $char String
+        * @param string $char
         * @private
         *
         * @return string
@@ -2550,11 +2556,11 @@ class Parser {
         * Split up a string on ':', ignoring any occurrences inside tags
         * to prevent illegal overlapping.
         *
-        * @param string $str the string to split
-        * @param &$before String set to everything before the ':'
-        * @param &$after String set to everything after the ':'
+        * @param string $str The string to split
+        * @param string &$before Set to everything before the ':'
+        * @param string &$after Set to everything after the ':'
         * @throws MWException
-        * @return String the position of the ':', or false if none found
+        * @return string The position of the ':', or false if none found
         */
        function findColonNoLinks( $str, &$before, &$after ) {
                wfProfileIn( __METHOD__ );
@@ -2718,8 +2724,8 @@ class Parser {
         *
         * @private
         *
-        * @param $index integer
-        * @param bool|\PPFrame $frame
+        * @param int $index
+        * @param bool|PPFrame $frame
         *
         * @throws MWException
         * @return string
@@ -3098,7 +3104,7 @@ class Parser {
        /**
         * Return a three-element array: leading whitespace, string contents, trailing whitespace
         *
-        * @param $s string
+        * @param string $s
         *
         * @return array
         */
@@ -3125,11 +3131,11 @@ class Parser {
         *  self::OT_PREPROCESS: templates but not extension tags
         *  self::OT_HTML: all templates and extension tags
         *
-        * @param string $text the text to transform
-        * @param $frame PPFrame Object describing the arguments passed to the template.
+        * @param string $text The text to transform
+        * @param PPFrame $frame Object describing the arguments passed to the template.
         *        Arguments may also be provided as an associative array, as was the usual case before MW1.12.
         *        Providing arguments this way may be useful for extensions wishing to perform variable replacement explicitly.
-        * @param $argsOnly Boolean only do argument (triple-brace) expansion, not double-brace expansion
+        * @param bool $argsOnly Only do argument (triple-brace) expansion, not double-brace expansion
         * @private
         *
         * @return string
@@ -3159,7 +3165,7 @@ class Parser {
        /**
         * Clean up argument array - refactored in 1.9 so parserfunctions can use it, too.
         *
-        * @param $args array
+        * @param array $args
         *
         * @return array
         */
@@ -3189,7 +3195,7 @@ class Parser {
         * Warn the user when a parser limitation is reached
         * Will warn at most once the user per limitation type
         *
-        * @param string $limitationType should be one of:
+        * @param string $limitationType Should be one of:
         *   'expensive-parserfunction' (corresponding messages:
         *       'expensive-parserfunction-warning',
         *       'expensive-parserfunction-category')
@@ -3555,9 +3561,9 @@ class Parser {
         *  nowiki: bool, wiki markup in $text should be escaped
         *
         * @since 1.21
-        * @param $frame PPFrame The current frame, contains template arguments
-        * @param $function string Function name
-        * @param $args array Arguments to the function
+        * @param PPFrame $frame The current frame, contains template arguments
+        * @param string $function Function name
+        * @param array $args Arguments to the function
         * @return array
         */
        public function callParserFunction( $frame, $function, array $args = array() ) {
@@ -3660,7 +3666,7 @@ class Parser {
         * Get the semi-parsed DOM representation of a template with a given title,
         * and its redirect destination title. Cached.
         *
-        * @param $title Title
+        * @param Title $title
         *
         * @return array
         */
@@ -3699,7 +3705,7 @@ class Parser {
        /**
         * Fetch the unparsed text of a template and register a reference to it.
         * @param Title $title
-        * @return Array ( string or false, Title )
+        * @return array ( string or false, Title )
         */
        function fetchTemplateAndTitle( $title ) {
                $templateCb = $this->mOptions->getTemplateCallback(); # Defaults to Parser::statelessFetchTemplate()
@@ -3722,7 +3728,7 @@ class Parser {
        /**
         * Fetch the unparsed text of a template and register a reference to it.
         * @param Title $title
-        * @return mixed string or false
+        * @return string|bool
         */
        function fetchTemplate( $title ) {
                $rv = $this->fetchTemplateAndTitle( $title );
@@ -3832,7 +3838,7 @@ class Parser {
         * If 'broken' is a key in $options then the file will appear as a broken thumbnail.
         * @param Title $title
         * @param array $options Array of options to RepoGroup::findFile
-        * @return Array ( File or false, Title of file )
+        * @return array ( File or false, Title of file )
         */
        function fetchFileAndTitle( $title, $options = array() ) {
                $file = $this->fetchFileNoRegister( $title, $options );
@@ -3857,7 +3863,7 @@ class Parser {
         *
         * @param Title $title
         * @param array $options Array of options to RepoGroup::findFile
-        * @return File or false
+        * @return File|bool
         */
        protected function fetchFileNoRegister( $title, $options = array() ) {
                if ( isset( $options['broken'] ) ) {
@@ -3873,8 +3879,8 @@ class Parser {
        /**
         * Transclude an interwiki link.
         *
-        * @param $title Title
-        * @param $action
+        * @param Title $title
+        * @param string $action
         *
         * @return string
         */
@@ -3894,8 +3900,8 @@ class Parser {
        }
 
        /**
-        * @param $url string
-        * @return Mixed|String
+        * @param string $url
+        * @return mixed|string
         */
        function fetchScaryTemplateMaybeFromCache( $url ) {
                global $wgTranscludeCacheExpiry;
@@ -3930,8 +3936,8 @@ class Parser {
         * Triple brace replacement -- used for template arguments
         * @private
         *
-        * @param $piece array
-        * @param $frame PPFrame
+        * @param array $piece
+        * @param PPFrame $frame
         *
         * @return array
         */
@@ -3985,7 +3991,7 @@ class Parser {
         *     attributes Optional associative array of parsed attributes
         *     inner      Contents of extension element
         *     noClose    Original text did not have a close tag
-        * @param $frame PPFrame
+        * @param PPFrame $frame
         *
         * @throws MWException
         * @return string
@@ -4071,7 +4077,7 @@ class Parser {
         *
         * @param string $type The type of expansion
         * @param int $size The size of the text
-        * @return bool false if this inclusion would take it over the maximum, true otherwise
+        * @return bool False if this inclusion would take it over the maximum, true otherwise
         */
        function incrementIncludeSize( $type, $size ) {
                if ( $this->mIncludeSizes[$type] + $size > $this->mOptions->getMaxIncludeSize() ) {
@@ -4085,7 +4091,7 @@ class Parser {
        /**
         * Increment the expensive function count
         *
-        * @return bool false if the limit has been exceeded
+        * @return bool False if the limit has been exceeded
         */
        function incrementExpensiveFunctionCount() {
                $this->mExpensiveFunctionCount++;
@@ -4096,7 +4102,7 @@ class Parser {
         * Strip double-underscore items like __NOGALLERY__ and __NOTOC__
         * Fills $this->mDoubleUnderscores, returns the modified text
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -4198,9 +4204,9 @@ class Parser {
         * It loops through all headlines, collects the necessary data, then splits up the
         * string and re-inserts the newly formatted headlines.
         *
-        * @param $text String
-        * @param string $origText original, untouched wikitext
-        * @param $isMain Boolean
+        * @param string $text
+        * @param string $origText Original, untouched wikitext
+        * @param bool $isMain
         * @return mixed|string
         * @private
         */
@@ -4607,8 +4613,8 @@ class Parser {
        /**
         * Pre-save transform helper function
         *
-        * @param $text string
-        * @param $user User
+        * @param string $text
+        * @param User $user
         *
         * @return string
         */
@@ -4690,10 +4696,10 @@ class Parser {
         * Do not reuse this parser instance after calling getUserSig(),
         * as it may have changed if it's the $wgParser.
         *
-        * @param $user User
-        * @param string|bool $nickname nickname to use or false to use user's default nickname
-        * @param $fancySig Boolean|null whether the nicknname is the complete signature
-        *                  or null to use default value
+        * @param User $user
+        * @param string|bool $nickname Nickname to use or false to use user's default nickname
+        * @param bool|null $fancySig whether the nicknname is the complete signature
+        *    or null to use default value
         * @return string
         */
        function getUserSig( &$user, $nickname = false, $fancySig = null ) {
@@ -4741,8 +4747,8 @@ class Parser {
        /**
         * Check that the user's signature contains no bad XML
         *
-        * @param $text String
-        * @return mixed An expanded string, or false if invalid.
+        * @param string $text
+        * @return string|bool An expanded string, or false if invalid.
         */
        function validateSig( $text ) {
                return Xml::isWellFormedXmlFragment( $text ) ? $text : false;
@@ -4803,20 +4809,20 @@ class Parser {
         * Set up some variables which are usually set up in parse()
         * so that an external function can call some class members with confidence
         *
-        * @param $title Title|null
-        * @param $options ParserOptions
-        * @param $outputType
-        * @param $clearState bool
+        * @param Title|null $title
+        * @param ParserOptions $options
+        * @param int $outputType
+        * @param bool $clearState
         */
        public function startExternalParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
                $this->startParse( $title, $options, $outputType, $clearState );
        }
 
        /**
-        * @param $title Title|null
-        * @param $options ParserOptions
-        * @param $outputType
-        * @param $clearState bool
+        * @param Title|null $title
+        * @param ParserOptions $options
+        * @param int $outputType
+        * @param bool $clearState
         */
        private function startParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
                $this->setTitle( $title );
@@ -5011,7 +5017,7 @@ class Parser {
        /**
         * Get all registered function hook identifiers
         *
-        * @return Array
+        * @return array
         */
        function getFunctionHooks() {
                return array_keys( $this->mFunctionHooks );
@@ -5021,9 +5027,9 @@ class Parser {
         * Create a tag function, e.g. "<test>some stuff</test>".
         * Unlike tag hooks, tag functions are parsed at preprocessor level.
         * Unlike parser functions, their content is not preprocessed.
-        * @param $tag
-        * @param $callback
-        * @param $flags
+        * @param string $tag
+        * @param callable $callback
+        * @param int $flags
         * @throws MWException
         * @return null
         */
@@ -5048,10 +5054,10 @@ class Parser {
         * Replace "<!--LINK-->" link placeholders with actual links, in the buffer
         * Placeholders created in Skin::makeLinkObj()
         *
-        * @param $text string
-        * @param $options int
+        * @param string $text
+        * @param int $options
         *
-        * @return array of link CSS classes, indexed by PDBK.
+        * @return array Array of link CSS classes, indexed by PDBK.
         */
        function replaceLinkHolders( &$text, $options = 0 ) {
                return $this->mLinkHolders->replace( $text );
@@ -5061,8 +5067,8 @@ class Parser {
         * Replace "<!--LINK-->" link placeholders with plain text of links
         * (not HTML-formatted).
         *
-        * @param $text String
-        * @return String
+        * @param string $text
+        * @return string
         */
        function replaceLinkHoldersText( $text ) {
                return $this->mLinkHolders->replaceText( $text );
@@ -5238,7 +5244,7 @@ class Parser {
        }
 
        /**
-        * @param $handler
+        * @param string $handler
         * @return array
         */
        function getImageParams( $handler ) {
@@ -5284,9 +5290,9 @@ class Parser {
        /**
         * Parse image options text and use it to make an image
         *
-        * @param $title Title
-        * @param $options String
-        * @param $holders LinkHolderArray|bool
+        * @param Title $title
+        * @param string $options
+        * @param LinkHolderArray|bool $holders
         * @return string HTML
         */
        function makeImage( $title, $options, $holders = false ) {
@@ -5501,9 +5507,9 @@ class Parser {
        }
 
        /**
-        * @param $caption
-        * @param $holders LinkHolderArray
-        * @return mixed|String
+        * @param string $caption
+        * @param LinkHolderArray $holders
+        * @return mixed|string
         */
        protected function stripAltText( $caption, $holders ) {
                # Strip bad stuff out of the title (tooltip).  We can't just use
@@ -5542,9 +5548,9 @@ class Parser {
         * Callback from the Sanitizer for expanding items found in HTML attribute
         * values, so they can be safely tested and escaped.
         *
-        * @param $text String
-        * @param $frame PPFrame
-        * @return String
+        * @param string $text
+        * @param PPFrame $frame
+        * @return string
         */
        function attributeStripCallback( &$text, $frame = false ) {
                $text = $this->replaceVariables( $text, $frame );
@@ -5567,7 +5573,7 @@ class Parser {
         * Transparent tag hooks are like regular XML-style tag hooks, except they
         * operate late in the transformation sequence, on HTML instead of wikitext.
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -5597,7 +5603,7 @@ class Parser {
         * External callers should use the getSection and replaceSection methods.
         *
         * @param string $text Page wikitext
-        * @param string $section a section identifier string of the form:
+        * @param string $section A section identifier string of the form:
         *   "<flag1> - <flag2> - ... - <section number>"
         *
         * Currently the only recognised flag is "T", which means the target section number
@@ -5735,10 +5741,10 @@ class Parser {
         *
         * If a section contains subsections, these are also returned.
         *
-        * @param string $text text to look in
-        * @param string $section section identifier
-        * @param string $deftext default to return if section is not found
-        * @return string text of the requested section
+        * @param string $text Text to look in
+        * @param string $section Section identifier
+        * @param string $deftext Default to return if section is not found
+        * @return string Text of the requested section
         */
        public function getSection( $text, $section, $deftext = '' ) {
                return $this->extractSections( $text, $section, "get", $deftext );
@@ -5770,7 +5776,7 @@ class Parser {
        /**
         * Get the revision object for $this->mRevisionId
         *
-        * @return Revision|null either a Revision object or null
+        * @return Revision|null Either a Revision object or null
         * @since 1.23 (public since 1.23)
         */
        public function getRevisionObject() {
@@ -5788,6 +5794,7 @@ class Parser {
        /**
         * Get the timestamp associated with the current revision, adjusted for
         * the default server-local timestamp
+        * @return string
         */
        function getRevisionTimestamp() {
                if ( is_null( $this->mRevisionTimestamp ) ) {
@@ -5834,7 +5841,7 @@ class Parser {
        /**
         * Get the size of the revision
         *
-        * @return int|null revision size
+        * @return int|null Revision size
         */
        function getRevisionSize() {
                if ( is_null( $this->mRevisionSize ) ) {
@@ -5884,7 +5891,7 @@ class Parser {
         * Accessor for $mDefaultSort
         * Unlike getDefaultSort(), will return false if none is set
         *
-        * @return string or false
+        * @return string|bool
         */
        public function getCustomDefaultSort() {
                return $this->mDefaultSort;
@@ -5895,7 +5902,7 @@ class Parser {
         * presumably extracted from a heading, for example "Header" from
         * "== Header ==".
         *
-        * @param $text string
+        * @param string $text
         *
         * @return string
         */
@@ -5931,7 +5938,7 @@ class Parser {
         * to create valid section anchors by mimicing the output of the
         * parser when headings are parsed.
         *
-        * @param string $text text string to be stripped of wikitext
+        * @param string $text Text string to be stripped of wikitext
         * for use in a Section anchor
         * @return string Filtered text string
         */
@@ -5957,10 +5964,10 @@ class Parser {
        /**
         * strip/replaceVariables/unstrip for preprocessor regression testing
         *
-        * @param $text string
-        * @param $title Title
-        * @param $options ParserOptions
-        * @param $outputType int
+        * @param string $text
+        * @param Title $title
+        * @param ParserOptions $options
+        * @param int $outputType
         *
         * @return string
         */
@@ -5974,9 +5981,9 @@ class Parser {
        }
 
        /**
-        * @param $text string
-        * @param $title Title
-        * @param $options ParserOptions
+        * @param string $text
+        * @param Title $title
+        * @param ParserOptions $options
         * @return string
         */
        function testPst( $text, Title $title, ParserOptions $options ) {
@@ -5984,9 +5991,9 @@ class Parser {
        }
 
        /**
-        * @param $text
-        * @param $title Title
-        * @param $options ParserOptions
+        * @param string $text
+        * @param Title $title
+        * @param ParserOptions $options
         * @return string
         */
        function testPreprocess( $text, Title $title, ParserOptions $options ) {
@@ -6004,8 +6011,8 @@ class Parser {
         * two strings will be replaced with the value returned by the callback in
         * each case.
         *
-        * @param $s string
-        * @param $callback
+        * @param string $s
+        * @param callable $callback
         *
         * @return string
         */
@@ -6036,7 +6043,7 @@ class Parser {
        /**
         * Remove any strip markers found in the given text.
         *
-        * @param $text Input string
+        * @param string $text Input string
         * @return string
         */
        function killMarkers( $text ) {
@@ -6055,7 +6062,7 @@ class Parser {
         * unserializeHalfParsedText(). The text can then be safely incorporated into
         * the return value of a parser hook.
         *
-        * @param $text string
+        * @param string $text
         *
         * @return array
         */
@@ -6084,7 +6091,7 @@ class Parser {
         *
         * @param array $data Serialized data
         * @throws MWException
-        * @return String
+        * @return string
         */
        function unserializeHalfParsedText( $data ) {
                if ( !isset( $data['version'] ) || $data['version'] != self::HALF_PARSED_VERSION ) {
@@ -6107,7 +6114,7 @@ class Parser {
         * serializeHalfParsedText(), is compatible with the current version of the
         * parser.
         *
-        * @param $data Array
+        * @param array $data
         *
         * @return bool
         */
@@ -6118,7 +6125,7 @@ class Parser {
        /**
         * Parsed a width param of imagelink like 300px or 200x300px
         *
-        * @param $value String
+        * @param string $value
         *
         * @return array
         * @since 1.20
index ff74f2a..e374361 100644 (file)
@@ -45,7 +45,7 @@ class ParserCache {
         * Setup a cache pathway with a given back-end storage mechanism.
         * May be a memcached client or a BagOStuff derivative.
         *
-        * @param $memCached Object
+        * @param MWMemcached $memCached
         * @throws MWException
         */
        protected function __construct( $memCached ) {
@@ -56,8 +56,8 @@ class ParserCache {
        }
 
        /**
-        * @param $article Article
-        * @param $hash string
+        * @param Article $article
+        * @param string $hash
         * @return mixed|string
         */
        protected function getParserOutputKey( $article, $hash ) {
@@ -72,7 +72,7 @@ class ParserCache {
        }
 
        /**
-        * @param $article Article
+        * @param Article $article
         * @return mixed|string
         */
        protected function getOptionsKey( $article ) {
@@ -90,8 +90,8 @@ class ParserCache {
         * English preferences. That's why we take into account *all* user
         * options. (r70809 CR)
         *
-        * @param $article Article
-        * @param $popts ParserOptions
+        * @param Article $article
+        * @param ParserOptions $popts
         * @return string
         */
        function getETag( $article, $popts ) {
@@ -102,8 +102,8 @@ class ParserCache {
 
        /**
         * Retrieve the ParserOutput from ParserCache, even if it's outdated.
-        * @param $article Article
-        * @param $popts ParserOptions
+        * @param Article $article
+        * @param ParserOptions $popts
         * @return ParserOutput|bool False on failure
         */
        public function getDirty( $article, $popts ) {
index 21403b4..7c84b67 100644 (file)
@@ -275,7 +275,7 @@ class ParserOptions {
         *
         * {{int: }} uses this which used to produce inconsistent link tables (bug 14404).
         *
-        * @return Language object
+        * @return Language
         * @since 1.19
         */
        function getUserLangObj() {
@@ -286,7 +286,7 @@ class ParserOptions {
        /**
         * Same as getUserLangObj() but returns a string instead.
         *
-        * @return String Language code
+        * @return string Language code
         * @since 1.17
         */
        function getUserLang() {
@@ -344,8 +344,8 @@ class ParserOptions {
 
        /**
         * Constructor
-        * @param $user User object
-        * @param $lang Language object
+        * @param User $user
+        * @param Language $lang
         */
        function __construct( $user = null, $lang = null ) {
                if ( $user === null ) {
@@ -370,8 +370,8 @@ class ParserOptions {
         * Get a ParserOptions object from a given user.
         * Language will be taken from $wgLang.
         *
-        * @param $user User object
-        * @return ParserOptions object
+        * @param User $user
+        * @return ParserOptions
         */
        public static function newFromUser( $user ) {
                return new ParserOptions( $user );
@@ -380,9 +380,9 @@ class ParserOptions {
        /**
         * Get a ParserOptions object from a given user and language
         *
-        * @param $user User object
-        * @param $lang Language object
-        * @return ParserOptions object
+        * @param User $user
+        * @param Language $lang
+        * @return ParserOptions
         */
        public static function newFromUserAndLang( User $user, Language $lang ) {
                return new ParserOptions( $user, $lang );
@@ -391,8 +391,8 @@ class ParserOptions {
        /**
         * Get a ParserOptions object from a IContextSource object
         *
-        * @param $context IContextSource object
-        * @return ParserOptions object
+        * @param IContextSource $context
+        * @return ParserOptions
         */
        public static function newFromContext( IContextSource $context ) {
                return new ParserOptions( $context->getUser(), $context->getLanguage() );
@@ -401,8 +401,8 @@ class ParserOptions {
        /**
         * Get user options
         *
-        * @param $user User object
-        * @param $lang Language object
+        * @param User $user
+        * @param Language $lang
         */
        private function initialiseFromUser( $user, $lang ) {
                global $wgInterwikiMagic, $wgAllowExternalImages,
@@ -441,6 +441,7 @@ class ParserOptions {
        /**
         * Registers a callback for tracking which ParserOptions which are used.
         * This is a private API with the parser.
+        * @param callable $callback
         */
        function registerWatcher( $callback ) {
                $this->onAccessCallback = $callback;
@@ -448,7 +449,7 @@ class ParserOptions {
 
        /**
         * Called when an option is accessed.
-        * @param string $optionName name of the option
+        * @param string $optionName Name of the option
         */
        public function optionUsed( $optionName ) {
                if ( $this->onAccessCallback ) {
index d1e3e58..49e810c 100644 (file)
@@ -96,7 +96,7 @@ class ParserOutput extends CacheTime {
        /**
         * callback used by getText to replace editsection tokens
         * @private
-        * @param $m
+        * @param array $m
         * @throws MWException
         * @return mixed
         */
@@ -181,8 +181,8 @@ class ParserOutput extends CacheTime {
        /**
         * Checks, if a url is pointing to the own server
         *
-        * @param string $internal the server to check against
-        * @param string $url the url to check
+        * @param string $internal The server to check against
+        * @param string $url The url to check
         * @return bool
         */
        static function isLinkInternal( $internal, $url ) {
@@ -212,8 +212,8 @@ class ParserOutput extends CacheTime {
        /**
         * Record a local or interwiki inline link for saving in future link tables.
         *
-        * @param $title Title object
-        * @param $id Mixed: optional known page_id so we can skip the lookup
+        * @param Title $title
+        * @param int|null $id Optional known page_id so we can skip the lookup
         */
        function addLink( Title $title, $id = null ) {
                if ( $title->isExternal() ) {
@@ -247,7 +247,7 @@ class ParserOutput extends CacheTime {
         * Register a file dependency for this output
         * @param string $name Title dbKey
         * @param string $timestamp MW timestamp of file creation (or false if non-existing)
-        * @param string $sha1 base 36 SHA-1 of file (or false if non-existing)
+        * @param string $sha1 Base 36 SHA-1 of file (or false if non-existing)
         * @return void
         */
        function addImage( $name, $timestamp = null, $sha1 = null ) {
@@ -259,9 +259,9 @@ class ParserOutput extends CacheTime {
 
        /**
         * Register a template dependency for this output
-        * @param $title Title
-        * @param $page_id
-        * @param $rev_id
+        * @param Title $title
+        * @param int $page_id
+        * @param int $rev_id
         * @return void
         */
        function addTemplate( $title, $page_id, $rev_id ) {
@@ -278,7 +278,7 @@ class ParserOutput extends CacheTime {
        }
 
        /**
-        * @param $title Title object, must be an interwiki link
+        * @param Title $title Title object, must be an interwiki link
         * @throws MWException if given invalid input
         */
        function addInterwikiLink( $title ) {
@@ -296,6 +296,8 @@ class ParserOutput extends CacheTime {
         * Add some text to the "<head>".
         * If $tag is set, the section with that tag will only be included once
         * in a given page.
+        * @param string $section
+        * @param string|bool $tag
         */
        function addHeadItem( $section, $tag = false ) {
                if ( $tag !== false ) {
@@ -324,8 +326,8 @@ class ParserOutput extends CacheTime {
        /**
         * Add one or more variables to be set in mw.config in JavaScript.
         *
-        * @param $keys {String|Array} Key or array of key/value pairs.
-        * @param $value {Mixed} [optional] Value of the configuration variable.
+        * @param string|array $keys Key or array of key/value pairs.
+        * @param mixed $value [optional] Value of the configuration variable.
         * @since 1.23
         */
        public function addJsConfigVars( $keys, $value = null ) {
@@ -342,7 +344,7 @@ class ParserOutput extends CacheTime {
        /**
         * Copy items from the OutputPage object into this one
         *
-        * @param $out OutputPage object
+        * @param OutputPage $out
         */
        public function addOutputPageMetadata( OutputPage $out ) {
                $this->addModules( $out->getModules() );
@@ -369,7 +371,7 @@ class ParserOutput extends CacheTime {
        /**
         * Get the title to be used for display
         *
-        * @return String
+        * @return string
         */
        public function getDisplayTitle() {
                $t = $this->getTitleText();
@@ -465,7 +467,7 @@ class ParserOutput extends CacheTime {
        /**
         * Returns the options from its ParserOptions which have been taken
         * into account to produce this output or false if not available.
-        * @return mixed Array
+        * @return array
         */
        public function getUsedOptions() {
                if ( !isset( $this->mAccessedOptions ) ) {
@@ -482,6 +484,7 @@ class ParserOutput extends CacheTime {
         * @see ParserCache::save
         * @see ParserOptions::addExtraKey
         * @see ParserOptions::optionsHash
+        * @param string $option
         */
        public function recordOption( $option ) {
                $this->mAccessedOptions[$option] = true;
@@ -511,11 +514,11 @@ class ParserOutput extends CacheTime {
         *
         * @since 1.20
         *
-        * @param $title Title The title of the page we're updating. If not given, a title object will be created
-        *                      based on $this->getTitleText()
-        * @param $recursive Boolean: queue jobs for recursive updates?
+        * @param Title $title The title of the page we're updating. If not given, a title object will
+        *    be created based on $this->getTitleText()
+        * @param bool $recursive Queue jobs for recursive updates?
         *
-        * @return Array. An array of instances of DataUpdate
+        * @return array An array of instances of DataUpdate
         */
        public function getSecondaryDataUpdates( Title $title = null, $recursive = true ) {
                if ( is_null( $title ) ) {
@@ -562,11 +565,10 @@ class ParserOutput extends CacheTime {
         * @since 1.21
         *
         * @param string $key The key for accessing the data. Extensions should take care to avoid
-        *               conflicts in naming keys. It is suggested to use the extension's name as a
-        *               prefix.
+        *   conflicts in naming keys. It is suggested to use the extension's name as a prefix.
         *
         * @param mixed $value The value to set. Setting a value to null is equivalent to removing
-        *              the value.
+        *   the value.
         */
        public function setExtensionData( $key, $value ) {
                if ( $value === null ) {
index aeae234..920b6f6 100644 (file)
@@ -128,7 +128,7 @@ class Parser_DiffTest
        }
 
        /**
-        * @param $parser Parser
+        * @param Parser $parser
         * @return bool
         */
        function onClearState( &$parser ) {
index aeacd2e..4cd5694 100644 (file)
@@ -28,7 +28,7 @@ interface Preprocessor {
        /**
         * Create a new preprocessor object based on an initialised Parser object
         *
-        * @param $parser Parser
+        * @param Parser $parser
         */
        function __construct( $parser );
 
@@ -42,7 +42,7 @@ interface Preprocessor {
        /**
         * Create a new custom frame for programmatic use of parameter replacement as used in some extensions
         *
-        * @param $args array
+        * @param array $args
         *
         * @return PPFrame
         */
@@ -51,15 +51,15 @@ interface Preprocessor {
        /**
         * Create a new custom node for programmatic use of parameter replacement as used in some extensions
         *
-        * @param $values
+        * @param array $values
         */
        function newPartNodeArray( $values );
 
        /**
         * Preprocess text to a PPNode
         *
-        * @param $text
-        * @param $flags
+        * @param string $text
+        * @param int $flags
         *
         * @return PPNode
         */
@@ -148,8 +148,7 @@ interface PPFrame {
        /**
         * Returns true if the infinite loop check is OK, false if a loop is detected
         *
-        * @param $title
-        *
+        * @param Title $title
         * @return bool
         */
        function loopCheck( $title );
index 0e7d42a..df3cbeb 100644 (file)
@@ -56,7 +56,7 @@ class Preprocessor_DOM implements Preprocessor {
        }
 
        /**
-        * @param $args array
+        * @param array $args
         * @return PPCustomFrame_DOM
         */
        function newCustomFrame( $args ) {
@@ -64,7 +64,7 @@ class Preprocessor_DOM implements Preprocessor {
        }
 
        /**
-        * @param $values
+        * @param array $values
         * @return PPNode_DOM
         */
        function newPartNodeArray( $values ) {
@@ -109,10 +109,10 @@ class Preprocessor_DOM implements Preprocessor {
         * Preprocess some wikitext and return the document tree.
         * This is the ghost of Parser::replace_variables().
         *
-        * @param string $text the text to parse
-        * @param $flags Integer: bitwise combination of:
-        *          Parser::PTD_FOR_INCLUSION    Handle "<noinclude>" and "<includeonly>" as if the text is being
-        *                                     included. Default is to assume a direct page view.
+        * @param string $text The text to parse
+        * @param int $flags Bitwise combination of:
+        *     Parser::PTD_FOR_INCLUSION    Handle "<noinclude>" and "<includeonly>" as if the text is being
+        *                                  included. Default is to assume a direct page view.
         *
         * The generated DOM tree must depend only on the input text and the flags.
         * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
@@ -201,8 +201,8 @@ class Preprocessor_DOM implements Preprocessor {
        }
 
        /**
-        * @param $text string
-        * @param $flags int
+        * @param string $text
+        * @param int $flags
         * @return string
         */
        function preprocessToXml( $text, $flags = 0 ) {
@@ -947,7 +947,7 @@ class PPFrame_DOM implements PPFrame {
 
        /**
         * Construct a new preprocessor frame.
-        * @param $preprocessor Preprocessor The parent preprocessor
+        * @param Preprocessor $preprocessor The parent preprocessor
         */
        function __construct( $preprocessor ) {
                $this->preprocessor = $preprocessor;
@@ -962,6 +962,9 @@ class PPFrame_DOM implements PPFrame {
         * Create a new child frame
         * $args is optionally a multi-root PPNode or array containing the template arguments
         *
+        * @param bool|array $args
+        * @param Title|bool $title
+        * @param int $indexOffset
         * @return PPTemplateFrame_DOM
         */
        function newChild( $args = false, $title = false, $indexOffset = 0 ) {
@@ -1004,8 +1007,8 @@ class PPFrame_DOM implements PPFrame {
 
        /**
         * @throws MWException
-        * @param $root
-        * @param $flags int
+        * @param string|PPNode_DOM|DOMDocument $root
+        * @param int $flags
         * @return string
         */
        function expand( $root, $flags = 0 ) {
@@ -1228,8 +1231,8 @@ class PPFrame_DOM implements PPFrame {
        }
 
        /**
-        * @param $sep
-        * @param $flags
+        * @param string $sep
+        * @param int $flags
         * @return string
         */
        function implodeWithFlags( $sep, $flags /*, ... */ ) {
@@ -1260,6 +1263,7 @@ class PPFrame_DOM implements PPFrame {
         * Implode with no flags specified
         * This previously called implodeWithFlags but has now been inlined to reduce stack depth
         *
+        * @param string $sep
         * @return string
         */
        function implode( $sep /*, ... */ ) {
@@ -1290,6 +1294,7 @@ class PPFrame_DOM implements PPFrame {
         * Makes an object that, when expand()ed, will be the same as one obtained
         * with implode()
         *
+        * @param string $sep
         * @return array
         */
        function virtualImplode( $sep /*, ... */ ) {
@@ -1318,6 +1323,9 @@ class PPFrame_DOM implements PPFrame {
 
        /**
         * Virtual implode with brackets
+        * @param string $start
+        * @param string $sep
+        * @param string $end
         * @return array
         */
        function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
@@ -1394,6 +1402,7 @@ class PPFrame_DOM implements PPFrame {
        /**
         * Returns true if the infinite loop check is OK, false if a loop is detected
         *
+        * @param Title $title
         * @return bool
         */
        function loopCheck( $title ) {
@@ -1433,11 +1442,11 @@ class PPTemplateFrame_DOM extends PPFrame_DOM {
        var $numberedExpansionCache, $namedExpansionCache;
 
        /**
-        * @param $preprocessor
-        * @param $parent PPFrame_DOM
-        * @param $numberedArgs array
-        * @param $namedArgs array
-        * @param $title Title
+        * @param Preprocessor $preprocessor
+        * @param PPFrame_DOM $parent
+        * @param array $numberedArgs
+        * @param array $namedArgs
+        * @param Title $title
         */
        function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
                parent::__construct( $preprocessor );
@@ -1656,7 +1665,7 @@ class PPNode_DOM implements PPNode {
        }
 
        /**
-        * @param $type
+        * @param string $type
         *
         * @return bool|PPNode_DOM
         */
@@ -1676,7 +1685,7 @@ class PPNode_DOM implements PPNode {
        }
 
        /**
-        * @param $i
+        * @param int $i
         * @return bool|PPNode_DOM
         */
        function item( $i ) {
index d6edb21..aebb98e 100644 (file)
@@ -47,7 +47,7 @@ class Preprocessor_Hash implements Preprocessor {
        }
 
        /**
-        * @param $args array
+        * @param array $args
         * @return PPCustomFrame_Hash
         */
        function newCustomFrame( $args ) {
@@ -55,7 +55,7 @@ class Preprocessor_Hash implements Preprocessor {
        }
 
        /**
-        * @param $values array
+        * @param array $values
         * @return PPNode_Hash_Array
         */
        function newPartNodeArray( $values ) {
@@ -89,10 +89,10 @@ class Preprocessor_Hash implements Preprocessor {
         * Preprocess some wikitext and return the document tree.
         * This is the ghost of Parser::replace_variables().
         *
-        * @param string $text the text to parse
-        * @param $flags Integer: bitwise combination of:
-        *          Parser::PTD_FOR_INCLUSION    Handle "<noinclude>" and "<includeonly>" as if the text is being
-        *                                     included. Default is to assume a direct page view.
+        * @param string $text The text to parse
+        * @param int $flags Bitwise combination of:
+        *    Parser::PTD_FOR_INCLUSION    Handle "<noinclude>" and "<includeonly>" as if the text is being
+        *                                 included. Default is to assume a direct page view.
         *
         * The generated DOM tree must depend only on the input text and the flags.
         * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
@@ -762,6 +762,7 @@ class PPDStackElement_Hash extends PPDStackElement {
        /**
         * Get the accumulator that would result if the close is not found.
         *
+        * @param int|bool $openingCount
         * @return PPDAccum_Hash
         */
        function breakSyntax( $openingCount = false ) {
@@ -812,6 +813,7 @@ class PPDAccum_Hash {
 
        /**
         * Append a string literal
+        * @param string $s
         */
        function addLiteral( $s ) {
                if ( $this->lastNode === false ) {
@@ -826,6 +828,7 @@ class PPDAccum_Hash {
 
        /**
         * Append a PPNode
+        * @param PPNode $node
         */
        function addNode( PPNode $node ) {
                if ( $this->lastNode === false ) {
@@ -838,6 +841,8 @@ class PPDAccum_Hash {
 
        /**
         * Append a tree node with text contents
+        * @param string $name
+        * @param string $value
         */
        function addNodeWithText( $name, $value ) {
                $node = PPNode_Hash_Tree::newWithText( $name, $value );
@@ -848,6 +853,7 @@ class PPDAccum_Hash {
         * Append a PPAccum_Hash
         * Takes over ownership of the nodes in the source argument. These nodes may
         * subsequently be modified, especially nextSibling.
+        * @param PPAccum_Hash $accum
         */
        function addAccum( $accum ) {
                if ( $accum->lastNode === false ) {
@@ -898,7 +904,7 @@ class PPFrame_Hash implements PPFrame {
 
        /**
         * Construct a new preprocessor frame.
-        * @param $preprocessor Preprocessor: the parent preprocessor
+        * @param Preprocessor $preprocessor The parent preprocessor
         */
        function __construct( $preprocessor ) {
                $this->preprocessor = $preprocessor;
@@ -913,9 +919,8 @@ class PPFrame_Hash implements PPFrame {
         * Create a new child frame
         * $args is optionally a multi-root PPNode or array containing the template arguments
         *
-        * @param array|bool|\PPNode_Hash_Array $args PPNode_Hash_Array|array
-        * @param $title Title|bool
-        *
+        * @param array|bool|PPNode_Hash_Array $args
+        * @param Title|bool $title
         * @param int $indexOffset
         * @throws MWException
         * @return PPTemplateFrame_Hash
@@ -952,8 +957,8 @@ class PPFrame_Hash implements PPFrame {
 
        /**
         * @throws MWException
-        * @param $root
-        * @param $flags int
+        * @param string|PPNode$root
+        * @param int $flags
         * @return string
         */
        function expand( $root, $flags = 0 ) {
@@ -1135,8 +1140,8 @@ class PPFrame_Hash implements PPFrame {
        }
 
        /**
-        * @param $sep
-        * @param $flags
+        * @param string $sep
+        * @param int $flags
         * @return string
         */
        function implodeWithFlags( $sep, $flags /*, ... */ ) {
@@ -1166,6 +1171,7 @@ class PPFrame_Hash implements PPFrame {
        /**
         * Implode with no flags specified
         * This previously called implodeWithFlags but has now been inlined to reduce stack depth
+        * @param string $sep
         * @return string
         */
        function implode( $sep /*, ... */ ) {
@@ -1196,6 +1202,7 @@ class PPFrame_Hash implements PPFrame {
         * Makes an object that, when expand()ed, will be the same as one obtained
         * with implode()
         *
+        * @param string $sep
         * @return PPNode_Hash_Array
         */
        function virtualImplode( $sep /*, ... */ ) {
@@ -1225,6 +1232,9 @@ class PPFrame_Hash implements PPFrame {
        /**
         * Virtual implode with brackets
         *
+        * @param string $start
+        * @param string $sep
+        * @param string $end
         * @return PPNode_Hash_Array
         */
        function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
@@ -1257,8 +1267,8 @@ class PPFrame_Hash implements PPFrame {
        }
 
        /**
-        * @param $level bool
-        * @return array|bool|String
+        * @param bool $level
+        * @return array|bool|string
         */
        function getPDBK( $level = false ) {
                if ( $level === false ) {
@@ -1299,7 +1309,7 @@ class PPFrame_Hash implements PPFrame {
        }
 
        /**
-        * @param $name
+        * @param string $name
         * @return bool
         */
        function getArgument( $name ) {
@@ -1309,7 +1319,7 @@ class PPFrame_Hash implements PPFrame {
        /**
         * Returns true if the infinite loop check is OK, false if a loop is detected
         *
-        * @param $title Title
+        * @param Title $title
         *
         * @return bool
         */
@@ -1345,11 +1355,11 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
        var $numberedExpansionCache, $namedExpansionCache;
 
        /**
-        * @param $preprocessor
-        * @param $parent
-        * @param $numberedArgs array
-        * @param $namedArgs array
-        * @param $title Title
+        * @param Preprocessor $preprocessor
+        * @param bool|PPFrame $parent
+        * @param array $numberedArgs
+        * @param array $namedArgs
+        * @param Title $title
         */
        function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
                parent::__construct( $preprocessor );
@@ -1431,7 +1441,7 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
        }
 
        /**
-        * @param $index
+        * @param int $index
         * @return array|bool
         */
        function getNumberedArgument( $index ) {
@@ -1446,7 +1456,7 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
        }
 
        /**
-        * @param $name
+        * @param string $name
         * @return bool
         */
        function getNamedArgument( $name ) {
@@ -1462,7 +1472,7 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
        }
 
        /**
-        * @param $name
+        * @param string $name
         * @return array|bool
         */
        function getArgument( $name ) {
@@ -1519,7 +1529,7 @@ class PPCustomFrame_Hash extends PPFrame_Hash {
        }
 
        /**
-        * @param $index
+        * @param int $index
         * @return bool
         */
        function getArgument( $index ) {
@@ -1563,8 +1573,8 @@ class PPNode_Hash_Tree implements PPNode {
        }
 
        /**
-        * @param $name
-        * @param $text
+        * @param string $name
+        * @param string $text
         * @return PPNode_Hash_Tree
         */
        static function newWithText( $name, $text ) {
@@ -1619,7 +1629,7 @@ class PPNode_Hash_Tree implements PPNode {
        }
 
        /**
-        * @param $i
+        * @param int $i
         * @return bool
         */
        function item( $i ) {
index 5b94453..d4f4559 100644 (file)
@@ -37,7 +37,7 @@ class StripState {
        const UNSTRIP_RECURSION_LIMIT = 20;
 
        /**
-        * @param $prefix string
+        * @param string $prefix
         */
        function __construct( $prefix ) {
                $this->prefix = $prefix;
@@ -51,16 +51,16 @@ class StripState {
 
        /**
         * Add a nowiki strip item
-        * @param $marker
-        * @param $value
+        * @param string $marker
+        * @param string $value
         */
        function addNoWiki( $marker, $value ) {
                $this->addItem( 'nowiki', $marker, $value );
        }
 
        /**
-        * @param $marker
-        * @param $value
+        * @param string $marker
+        * @param string $value
         */
        function addGeneral( $marker, $value ) {
                $this->addItem( 'general', $marker, $value );
@@ -68,9 +68,9 @@ class StripState {
 
        /**
         * @throws MWException
-        * @param $type
-        * @param $marker
-        * @param $value
+        * @param string $type
+        * @param string $marker
+        * @param string $value
         */
        protected function addItem( $type, $marker, $value ) {
                if ( !preg_match( $this->regex, $marker, $m ) ) {
@@ -81,7 +81,7 @@ class StripState {
        }
 
        /**
-        * @param $text
+        * @param string $text
         * @return mixed
         */
        function unstripGeneral( $text ) {
@@ -89,7 +89,7 @@ class StripState {
        }
 
        /**
-        * @param $text
+        * @param string $text
         * @return mixed
         */
        function unstripNoWiki( $text ) {
@@ -97,7 +97,7 @@ class StripState {
        }
 
        /**
-        * @param $text
+        * @param string $text
         * @return mixed
         */
        function unstripBoth( $text ) {
@@ -107,8 +107,8 @@ class StripState {
        }
 
        /**
-        * @param $type
-        * @param $text
+        * @param string $type
+        * @param string $text
         * @return mixed
         */
        protected function unstripType( $type, $text ) {
@@ -127,7 +127,7 @@ class StripState {
        }
 
        /**
-        * @param $m array
+        * @param array $m
         * @return array
         */
        protected function unstripCallback( $m ) {
@@ -159,7 +159,7 @@ class StripState {
         * Get a StripState object which is sufficient to unstrip the given text.
         * It will contain the minimum subset of strip items necessary.
         *
-        * @param $text string
+        * @param string $text
         *
         * @return StripState
         */
@@ -195,9 +195,9 @@ class StripState {
         * will not be preserved. The strings in the $texts array will have their
         * strip markers rewritten, the resulting array of strings will be returned.
         *
-        * @param $otherState StripState
-        * @param $texts Array
-        * @return Array
+        * @param StripState $otherState
+        * @param array $texts
+        * @return array
         */
        function merge( $otherState, $texts ) {
                $mergePrefix = Parser::getRandomString();
@@ -215,7 +215,7 @@ class StripState {
        }
 
        /**
-        * @param $m
+        * @param array $m
         * @return string
         */
        protected function mergeCallback( $m ) {
@@ -226,7 +226,7 @@ class StripState {
        /**
         * Remove any strip markers found in the given text.
         *
-        * @param $text Input string
+        * @param string $text Input string
         * @return string
         */
        function killMarkers( $text ) {
index dbfab34..f7fe5a8 100644 (file)
@@ -50,7 +50,7 @@ class MWTidyWrapper {
        }
 
        /**
-        * @param $text string
+        * @param string $text
         * @return string
         */
        public function getWrapped( $text ) {
@@ -79,7 +79,7 @@ class MWTidyWrapper {
        }
 
        /**
-        * @param $m array
+        * @param array $m
         *
         * @return string
         */
@@ -91,7 +91,7 @@ class MWTidyWrapper {
        }
 
        /**
-        * @param $text string
+        * @param string $text
         * @return string
         */
        public function postprocess( $text ) {
@@ -121,8 +121,8 @@ class MWTidy {
         * If tidy isn't able to correct the markup, the original will be
         * returned in all its glory with a warning comment appended.
         *
-        * @param string $text hideous HTML input
-        * @return String: corrected HTML output
+        * @param string $text Hideous HTML input
+        * @return string Corrected HTML output
         */
        public static function tidy( $text ) {
                global $wgTidyInternal;
@@ -153,9 +153,9 @@ class MWTidy {
        /**
         * Check HTML for errors, used if $wgValidateAllHtml = true.
         *
-        * @param $text String
-        * @param &$errorStr String: return the error string
-        * @return Boolean: whether the HTML is valid
+        * @param string $text
+        * @param string &$errorStr Return the error string
+        * @return bool Whether the HTML is valid
         */
        public static function checkErrors( $text, &$errorStr = null ) {
                global $wgTidyInternal;
@@ -175,9 +175,9 @@ class MWTidy {
         * Also called in OutputHandler.php for full page validation
         *
         * @param string $text HTML to check
-        * @param $stderr Boolean: Whether to read result from STDERR rather than STDOUT
-        * @param &$retval int Exit code (-1 on internal error)
-        * @return mixed String or null
+        * @param bool $stderr Whether to read result from STDERR rather than STDOUT
+        * @param int &$retval Exit code (-1 on internal error)
+        * @return string|null
         */
        private static function execExternalTidy( $text, $stderr = false, &$retval = null ) {
                global $wgTidyConf, $wgTidyBin, $wgTidyOpts;
@@ -242,9 +242,9 @@ class MWTidy {
         * saving the overhead of spawning a new process.
         *
         * @param string $text HTML to check
-        * @param $stderr Boolean: Whether to read result from error status instead of output
-        * @param &$retval int Exit code (-1 on internal error)
-        * @return mixed String or null
+        * @param bool $stderr Whether to read result from error status instead of output
+        * @param int &$retval Exit code (-1 on internal error)
+        * @return string|null
         */
        private static function execInternalTidy( $text, $stderr = false, &$retval = null ) {
                global $wgTidyConf, $wgDebugTidy;
index 8c819ff..1581879 100644 (file)
@@ -354,9 +354,9 @@ abstract class Profiler {
 class TransactionProfiler {
        /** @var float seconds */
        protected $mDBLockThreshold = 5.0;
-       /** @var Array DB/server name => (active trx count,timestamp) */
+       /** @var array DB/server name => (active trx count,timestamp) */
        protected $mDBTrxHoldingLocks = array();
-       /** @var Array DB/server name => list of (function name, elapsed time) */
+       /** @var array DB/server name => list of (function name, elapsed time) */
        protected $mDBTrxMethodTimes = array();
 
        /**
index dc1114c..5de9982 100644 (file)
@@ -59,7 +59,7 @@ class ProfilerStandard extends Profiler {
        /**
         * Return whether this a stub profiler
         *
-        * @return Boolean
+        * @return bool
         */
        public function isStub() {
                return false;
@@ -69,7 +69,7 @@ class ProfilerStandard extends Profiler {
         * Return whether this profiler stores data
         *
         * @see Profiler::logData()
-        * @return Boolean
+        * @return bool
         */
        public function isPersistent() {
                return false;
@@ -81,7 +81,7 @@ class ProfilerStandard extends Profiler {
         * Only doing collation saves memory overhead but limits the use of certain
         * features like that of graph generation for the debug toolbar.
         *
-        * @return boolean
+        * @return bool
         */
        protected function collateOnly() {
                return false;
@@ -144,8 +144,8 @@ class ProfilerStandard extends Profiler {
         * @param string $name
         * @param float $elapsedCpu
         * @param float $elapsedReal
-        * @param integer $memChange
-        * @param integer $subcalls
+        * @param int $memChange
+        * @param int $subcalls
         * @param array|null $period Map of ('start','end','memory','subcalls')
         */
        protected function updateEntry(
@@ -176,7 +176,7 @@ class ProfilerStandard extends Profiler {
        /**
         * Called by wfProfieIn()
         *
-        * @param $functionname String
+        * @param string $functionname
         */
        public function profileIn( $functionname ) {
                global $wgDebugFunctionEntry;
@@ -198,7 +198,7 @@ class ProfilerStandard extends Profiler {
        /**
         * Called by wfProfieOut()
         *
-        * @param $functionname String
+        * @param string $functionname
         */
        public function profileOut( $functionname ) {
                global $wgDebugFunctionEntry;
@@ -268,7 +268,7 @@ class ProfilerStandard extends Profiler {
        /**
         * Returns a profiling output to be stored in debug file
         *
-        * @return String
+        * @return string
         */
        public function getOutput() {
                global $wgDebugFunctionEntry, $wgProfileCallTree;
@@ -528,9 +528,9 @@ class ProfilerStandard extends Profiler {
         * Counts the number of profiled function calls sitting under
         * the given point in the call graph. Not the most efficient algo.
         *
-        * @param $stack Array:
-        * @param $start Integer:
-        * @return Integer
+        * @param array $stack
+        * @param int $start
+        * @return int
         */
        protected function calltreeCount( $stack, $start ) {
                $level = $stack[$start][1];
index 6b8c7c4..994812b 100644 (file)
@@ -250,10 +250,10 @@ class ResourceLoader {
         * @param array $info Module info array. For backwards compatibility with 1.17alpha,
         *   this may also be a ResourceLoaderModule object. Optional when using
         *   multiple-registration calling style.
-        * @throws MWException: If a duplicate module registration is attempted
-        * @throws MWException: If a module name contains illegal characters (pipes or commas)
-        * @throws MWException: If something other than a ResourceLoaderModule is being registered
-        * @return boolean False if there were any errors, in which case one or more modules were
+        * @throws MWException If a duplicate module registration is attempted
+        * @throws MWException If a module name contains illegal characters (pipes or commas)
+        * @throws MWException If something other than a ResourceLoaderModule is being registered
+        * @return bool False if there were any errors, in which case one or more modules were
         *   not registered
         */
        public function register( $name, $info = null ) {
@@ -392,7 +392,7 @@ class ResourceLoader {
         *
         * @param string $framework Get only the test module names for one
         *   particular framework (optional)
-        * @return Array
+        * @return array
         */
        public function getTestModuleNames( $framework = 'all' ) {
                /// @todo api siteinfo prop testmodulenames modulenames
@@ -622,7 +622,7 @@ class ResourceLoader {
         * If there's an If-Modified-Since header, respond with a 304 appropriately
         * and clear out the output buffer. If the client cache is too old then do nothing.
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @param string $mtime The TS_MW timestamp to check the header against
         * @return bool True if 304 header sent and output handled
         */
@@ -721,8 +721,8 @@ class ResourceLoader {
        /**
         * Handle exception display.
         *
-        * @param Exception $e to be shown to the user
-        * @return string sanitized text that can be returned to the user
+        * @param Exception $e Exception to be shown to the user
+        * @return string Sanitized text that can be returned to the user
         */
        public static function formatException( $e ) {
                global $wgShowExceptionDetails;
@@ -737,7 +737,7 @@ class ResourceLoader {
        /**
         * Generate code for a response.
         *
-        * @param $context ResourceLoaderContext Context in which to generate a response
+        * @param ResourceLoaderContext $context Context in which to generate a response
         * @param array $modules List of module objects keyed by module name
         * @param array $missing List of requested module names that are unregistered (optional)
         * @return string Response data
@@ -1016,7 +1016,7 @@ class ResourceLoader {
         *         Set the state of modules with the given names to the given states
         *
         * @param string $name
-        * @param $state
+        * @param string $state
         * @return string
         */
        public static function makeLoaderStateScript( $name, $state = null ) {
@@ -1111,8 +1111,8 @@ class ResourceLoader {
         *   - ResourceLoader::makeLoaderSourcesScript( array( $id1 => $props1, $id2 => $props2, ... ) );
         *       Register sources with the given IDs and properties.
         *
-        * @param string $id source ID
-        * @param array $properties source properties (see addSource())
+        * @param string $id Source ID
+        * @param array $properties Source properties (see addSource())
         * @return string
         */
        public static function makeLoaderSourcesScript( $id, $properties = null ) {
@@ -1200,7 +1200,7 @@ class ResourceLoader {
 
        /**
         * Build a load.php URL
-        * @param array $modules of module names (strings)
+        * @param array $modules Array of module names (strings)
         * @param string $lang Language code
         * @param string $skin Skin name
         * @param string|null $user User name. If null, the &user= parameter is omitted
@@ -1314,7 +1314,7 @@ class ResourceLoader {
         * Get global LESS variables.
         *
         * $since 1.22
-        * @return array: Map of variable names to string CSS values.
+        * @return array Map of variable names to string CSS values.
         */
        public static function getLESSVars() {
                global $wgResourceLoaderLESSVars;
index 0d9ef78..63ec5de 100644 (file)
@@ -46,8 +46,8 @@ class ResourceLoaderContext {
        /* Methods */
 
        /**
-        * @param $resourceLoader ResourceLoader
-        * @param $request WebRequest
+        * @param ResourceLoader $resourceLoader
+        * @param WebRequest $request
         */
        public function __construct( $resourceLoader, WebRequest $request ) {
                global $wgDefaultSkin, $wgResourceLoaderDebug;
@@ -79,7 +79,7 @@ class ResourceLoaderContext {
         * an array of module names like array( 'jquery.foo', 'jquery.bar',
         * 'jquery.ui.baz', 'jquery.ui.quux' )
         * @param string $modules Packed module name list
-        * @return array of module names
+        * @return array Array of module names
         */
        public static function expandModuleNames( $modules ) {
                $retval = array();
@@ -184,14 +184,14 @@ class ResourceLoaderContext {
        }
 
        /**
-        * @return String|null
+        * @return string|null
         */
        public function getOnly() {
                return $this->only;
        }
 
        /**
-        * @return String|null
+        * @return string|null
         */
        public function getVersion() {
                return $this->version;
index 68bfe59..61fb111 100644 (file)
@@ -29,12 +29,12 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
 
        /* Protected Members */
 
-       /** String: Local base path, see __construct() */
+       /** @var string Local base path, see __construct() */
        protected $localBasePath = '';
-       /** String: Remote base path, see __construct() */
+       /** @var string Remote base path, see __construct() */
        protected $remoteBasePath = '';
        /**
-        * Array: List of paths to JavaScript files to always include
+        * @var array List of paths to JavaScript files to always include
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -42,7 +42,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $scripts = array();
        /**
-        * Array: List of JavaScript files to include when using a specific language
+        * @var array List of JavaScript files to include when using a specific language
         * @par Usage:
         * @code
         * array( [language-code] => array( [file-path], [file-path], ... ), ... )
@@ -50,7 +50,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $languageScripts = array();
        /**
-        * Array: List of JavaScript files to include when using a specific skin
+        * @var array List of JavaScript files to include when using a specific skin
         * @par Usage:
         * @code
         * array( [skin-name] => array( [file-path], [file-path], ... ), ... )
@@ -58,7 +58,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $skinScripts = array();
        /**
-        * Array: List of paths to JavaScript files to include in debug mode
+        * @var array List of paths to JavaScript files to include in debug mode
         * @par Usage:
         * @code
         * array( [skin-name] => array( [file-path], [file-path], ... ), ... )
@@ -66,7 +66,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $debugScripts = array();
        /**
-        * Array: List of paths to JavaScript files to include in the startup module
+        * @var array List of paths to JavaScript files to include in the startup module
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -74,7 +74,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $loaderScripts = array();
        /**
-        * Array: List of paths to CSS files to always include
+        * @var array List of paths to CSS files to always include
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -82,7 +82,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $styles = array();
        /**
-        * Array: List of paths to CSS files to include when using specific skins
+        * @var array List of paths to CSS files to include when using specific skins
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -90,7 +90,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $skinStyles = array();
        /**
-        * Array: List of modules this module depends on
+        * @var array List of modules this module depends on
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -98,31 +98,31 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $dependencies = array();
        /**
-        * Array: List of message keys used by this module
+        * @var array List of message keys used by this module
         * @par Usage:
         * @code
         * array( [message-key], [message-key], ... )
         * @endcode
         */
        protected $messages = array();
-       /** String: Name of group to load this module in */
+       /** @var string Name of group to load this module in */
        protected $group;
-       /** String: Position on the page to load this module at */
+       /** @var string Position on the page to load this module at */
        protected $position = 'bottom';
-       /** Boolean: Link to raw files in debug mode */
+       /** @var bool Link to raw files in debug mode */
        protected $debugRaw = true;
-       /** Boolean: Whether mw.loader.state() call should be omitted */
+       /** @var bool Whether mw.loader.state() call should be omitted */
        protected $raw = false;
        protected $targets = array( 'desktop' );
 
        /**
-        * Boolean: Whether getStyleURLsForDebug should return raw file paths,
+        * @var bool Whether getStyleURLsForDebug should return raw file paths,
         * or return load.php urls
         */
        protected $hasGeneratedStyles = false;
 
        /**
-        * Array: Cache for mtime
+        * @var array Cache for mtime
         * @par Usage:
         * @code
         * array( [hash] => [mtime], [hash] => [mtime], ... )
@@ -130,7 +130,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $modifiedTime = array();
        /**
-        * Array: Place where readStyleFile() tracks file dependencies
+        * @var array Place where readStyleFile() tracks file dependencies
         * @par Usage:
         * @code
         * array( [file-path], [file-path], ... )
@@ -270,7 +270,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets all scripts for a given context concatenated together.
         *
         * @param ResourceLoaderContext $context Context in which to generate script
-        * @return string: JavaScript code for $context
+        * @return string JavaScript code for $context
         */
        public function getScript( ResourceLoaderContext $context ) {
                $files = $this->getScriptFiles( $context );
@@ -299,7 +299,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets loader script.
         *
-        * @return string: JavaScript code to be added to startup module
+        * @return string JavaScript code to be added to startup module
         */
        public function getLoaderScript() {
                if ( count( $this->loaderScripts ) == 0 ) {
@@ -312,7 +312,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets all styles for a given context concatenated together.
         *
         * @param ResourceLoaderContext $context Context in which to generate styles
-        * @return string: CSS code for $context
+        * @return string CSS code for $context
         */
        public function getStyles( ResourceLoaderContext $context ) {
                $styles = $this->readStyleFiles(
@@ -364,7 +364,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets list of message keys used by this module.
         *
-        * @return array: List of message keys
+        * @return array List of message keys
         */
        public function getMessages() {
                return $this->messages;
@@ -373,7 +373,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets the name of the group this module should be loaded in.
         *
-        * @return string: Group name
+        * @return string Group name
         */
        public function getGroup() {
                return $this->group;
@@ -389,7 +389,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Gets list of names of modules this module depends on.
         *
-        * @return array: List of module names
+        * @return array List of module names
         */
        public function getDependencies() {
                return $this->dependencies;
@@ -413,7 +413,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @param ResourceLoaderContext $context Context in which to calculate
         *     the modified time
-        * @return int: UNIX timestamp
+        * @return int UNIX timestamp
         * @see ResourceLoaderModule::getFileDependencies
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
@@ -477,7 +477,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Get the definition summary for this module.
         *
-        * @return Array
+        * @return array
         */
        public function getDefinitionSummary( ResourceLoaderContext $context ) {
                $summary = array(
@@ -529,7 +529,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @since 1.22
         * @param string $path
-        * @return string: the stylesheet language name
+        * @return string The stylesheet language name
         */
        public function getStyleSheetLang( $path ) {
                return preg_match( '/\.less$/i', $path ) ? 'less' : 'css';
@@ -540,9 +540,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @param array $list List of file paths in any combination of index/path
         *     or path/options pairs
-        * @param string $option option name
-        * @param mixed $default default value if the option isn't set
-        * @return array: List of file paths, collated by $option
+        * @param string $option Option name
+        * @param mixed $default Default value if the option isn't set
+        * @return array List of file paths, collated by $option
         */
        protected static function collateFilePathListByOption( array $list, $option, $default ) {
                $collatedFiles = array();
@@ -571,7 +571,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param array $list List of lists to select from
         * @param string $key Key to look for in $map
         * @param string $fallback Key to look for in $list if $key doesn't exist
-        * @return array: List of elements from $map which matched $key or $fallback,
+        * @return array List of elements from $map which matched $key or $fallback,
         *     or an empty list in case of no match
         */
        protected static function tryForKey( array $list, $key, $fallback = null ) {
@@ -590,7 +590,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets a list of file paths for all scripts in this module, in order of propper execution.
         *
         * @param ResourceLoaderContext $context
-        * @return array: List of file paths
+        * @return array List of file paths
         */
        protected function getScriptFiles( ResourceLoaderContext $context ) {
                $files = array_merge(
@@ -609,7 +609,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * Gets a list of file paths for all styles in this module, in order of propper inclusion.
         *
         * @param ResourceLoaderContext $context
-        * @return array: List of file paths
+        * @return array List of file paths
         */
        protected function getStyleFiles( ResourceLoaderContext $context ) {
                return array_merge_recursive(
@@ -644,7 +644,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @param array $scripts List of file paths to scripts to read, remap and concetenate
         * @throws MWException
-        * @return string: Concatenated and remapped JavaScript data from $scripts
+        * @return string Concatenated and remapped JavaScript data from $scripts
         */
        protected function readScriptFiles( array $scripts ) {
                global $wgResourceLoaderValidateStaticJS;
@@ -678,7 +678,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param bool $flip
         *
         * @throws MWException
-        * @return array: List of concatenated and remapped CSS data from $styles,
+        * @return array List of concatenated and remapped CSS data from $styles,
         *     keyed by media type
         */
        protected function readStyleFiles( array $styles, $flip ) {
@@ -704,7 +704,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param string $path File path of style file to read
         * @param bool $flip
         *
-        * @return string: CSS data in script file
+        * @return string CSS data in script file
         * @throws MWException if the file doesn't exist
         */
        protected function readStyleFile( $path, $flip ) {
@@ -754,7 +754,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']
         *
-        * @return array of strings
+        * @return array Array of strings
         */
        public function getTargets() {
                return $this->targets;
@@ -768,7 +768,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *
         * @since 1.22
         * @param string $fileName File name of root LESS file.
-        * @return string: Cache key
+        * @return string Cache key
         */
        protected static function getLESSCacheKey( $fileName ) {
                $vars = json_encode( ResourceLoader::getLESSVars() );
@@ -789,7 +789,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @throws Exception If Less encounters a parse error
         * @throws MWException If Less compilation returns unexpection result
         * @param string $fileName File path of LESS source
-        * @return string: CSS source
+        * @return string CSS source
         */
        protected function compileLESSFile( $fileName ) {
                $key = self::getLESSCacheKey( $fileName );
index 61ed520..8c7fbe7 100644 (file)
@@ -26,7 +26,7 @@
 class ResourceLoaderFilePageModule extends ResourceLoaderWikiModule {
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        protected function getPages( ResourceLoaderContext $context ) {
index fa0fbf8..77dcdf9 100644 (file)
@@ -93,8 +93,8 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return string: JavaScript code
+        * @param ResourceLoaderContext $context
+        * @return string JavaScript code
         */
        public function getScript( ResourceLoaderContext $context ) {
                $this->language = Language::factory( $context->getLanguage() );
@@ -105,16 +105,16 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return int: UNIX timestamp
+        * @param ResourceLoaderContext $context
+        * @return int UNIX timestamp
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                return max( 1, $this->getHashMtime( $context ) );
        }
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return string: Hash
+        * @param ResourceLoaderContext $context
+        * @return string Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
                $this->language = Language::factory( $context->getLanguage() );
index 429bcec..819bf5a 100644 (file)
@@ -71,7 +71,7 @@ abstract class ResourceLoaderModule {
         * Get this module's name. This is set when the module is registered
         * with ResourceLoader::register()
         *
-        * @return mixed: Name (string) or null if no name was set
+        * @return string|null Name (string) or null if no name was set
         */
        public function getName() {
                return $this->name;
@@ -91,7 +91,7 @@ abstract class ResourceLoaderModule {
         * Get this module's origin. This is set when the module is registered
         * with ResourceLoader::register()
         *
-        * @return int: ResourceLoaderModule class constant, the subclass default
+        * @return int ResourceLoaderModule class constant, the subclass default
         *     if not set manually
         */
        public function getOrigin() {
@@ -102,7 +102,7 @@ abstract class ResourceLoaderModule {
         * Set this module's origin. This is called by ResourceLoader::register()
         * when registering the module. Other code should not call this.
         *
-        * @param int $origin origin
+        * @param int $origin Origin
         */
        public function setOrigin( $origin ) {
                $this->origin = $origin;
@@ -123,7 +123,7 @@ abstract class ResourceLoaderModule {
         * Includes all relevant JS except loader scripts.
         *
         * @param ResourceLoaderContext $context
-        * @return string: JavaScript code
+        * @return string JavaScript code
         */
        public function getScript( ResourceLoaderContext $context ) {
                // Stub, override expected
@@ -142,7 +142,7 @@ abstract class ResourceLoaderModule {
         * MUST return either an only= URL or a non-load.php URL.
         *
         * @param ResourceLoaderContext $context
-        * @return array: Array of URLs
+        * @return array Array of URLs
         */
        public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
                $url = ResourceLoader::makeLoaderURL(
@@ -173,7 +173,7 @@ abstract class ResourceLoaderModule {
         * Get all CSS for this module for a given skin.
         *
         * @param ResourceLoaderContext $context
-        * @return array: List of CSS strings or array of CSS strings keyed by media type.
+        * @return array List of CSS strings or array of CSS strings keyed by media type.
         *  like array( 'screen' => '.foo { width: 0 }' );
         *  or array( 'screen' => array( '.foo { width: 0 }' ) );
         */
@@ -189,7 +189,7 @@ abstract class ResourceLoaderModule {
         * load the files directly. See also getScriptURLsForDebug()
         *
         * @param ResourceLoaderContext $context
-        * @return array: array( mediaType => array( URL1, URL2, ... ), ... )
+        * @return array array( mediaType => array( URL1, URL2, ... ), ... )
         */
        public function getStyleURLsForDebug( ResourceLoaderContext $context ) {
                $url = ResourceLoader::makeLoaderURL(
@@ -211,7 +211,7 @@ abstract class ResourceLoaderModule {
         *
         * To get a JSON blob with messages, use MessageBlobStore::get()
         *
-        * @return array: List of message keys. Keys may occur more than once
+        * @return array List of message keys. Keys may occur more than once
         */
        public function getMessages() {
                // Stub, override expected
@@ -221,7 +221,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get the group this module is in.
         *
-        * @return string: Group name
+        * @return string Group name
         */
        public function getGroup() {
                // Stub, override expected
@@ -231,7 +231,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get the origin of this module. Should only be overridden for foreign modules.
         *
-        * @return string: Origin name, 'local' for local modules
+        * @return string Origin name, 'local' for local modules
         */
        public function getSource() {
                // Stub, override expected
@@ -263,7 +263,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get the loader JS for this module, if set.
         *
-        * @return mixed: JavaScript loader code as a string or boolean false if no custom loader set
+        * @return mixed JavaScript loader code as a string or boolean false if no custom loader set
         */
        public function getLoaderScript() {
                // Stub, override expected
@@ -278,7 +278,7 @@ abstract class ResourceLoaderModule {
         *
         * To add dependencies dynamically on the client side, use a custom
         * loader script, see getLoaderScript()
-        * @return array: List of module names as strings
+        * @return array List of module names as strings
         */
        public function getDependencies() {
                // Stub, override expected
@@ -288,7 +288,7 @@ abstract class ResourceLoaderModule {
        /**
         * Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']
         *
-        * @return array: Array of strings
+        * @return array Array of strings
         */
        public function getTargets() {
                return $this->targets;
@@ -299,7 +299,7 @@ abstract class ResourceLoaderModule {
         * Currently these are only image files referenced by the module's CSS.
         *
         * @param string $skin Skin name
-        * @return array: List of files
+        * @return array List of files
         */
        public function getFileDependencies( $skin ) {
                // Try in-object cache first
@@ -335,7 +335,7 @@ abstract class ResourceLoaderModule {
         * Get the last modification timestamp of the message blob for this
         * module in a given language.
         * @param string $lang Language code
-        * @return int: UNIX timestamp, or 0 if the module doesn't have messages
+        * @return int UNIX timestamp, or 0 if the module doesn't have messages
         */
        public function getMsgBlobMtime( $lang ) {
                if ( !isset( $this->msgBlobMtime[$lang] ) ) {
@@ -363,7 +363,7 @@ abstract class ResourceLoaderModule {
         * Set a preloaded message blob last modification timestamp. Used so we
         * can load this information for all modules at once.
         * @param string $lang Language code
-        * @param $mtime Integer: UNIX timestamp or 0 if there is no such blob
+        * @param int $mtime UNIX timestamp or 0 if there is no such blob
         */
        public function setMsgBlobMtime( $lang, $mtime ) {
                $this->msgBlobMtime[$lang] = $mtime;
@@ -387,7 +387,7 @@ abstract class ResourceLoaderModule {
         * yourself and take its result into consideration.
         *
         * @param ResourceLoaderContext $context Context object
-        * @return integer UNIX timestamp
+        * @return int UNIX timestamp
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                // 0 would mean now
@@ -398,7 +398,7 @@ abstract class ResourceLoaderModule {
         * Helper method for calculating when the module's hash (if it has one) changed.
         *
         * @param ResourceLoaderContext $context
-        * @return integer: UNIX timestamp or 0 if no hash was provided
+        * @return int UNIX timestamp or 0 if no hash was provided
         *  by getModifiedHash()
         */
        public function getHashMtime( ResourceLoaderContext $context ) {
@@ -432,7 +432,7 @@ abstract class ResourceLoaderModule {
         * use of getHashMTime() inside getModifiedTime().
         *
         * @param ResourceLoaderContext $context
-        * @return string|null: Hash
+        * @return string|null Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
                return null;
@@ -441,7 +441,7 @@ abstract class ResourceLoaderModule {
        /**
         * Helper method for calculating when this module's definition summary was last changed.
         *
-        * @return integer: UNIX timestamp or 0 if no definition summary was provided
+        * @return int UNIX timestamp or 0 if no definition summary was provided
         *  by getDefinitionSummary()
         */
        public function getDefinitionMtime( ResourceLoaderContext $context ) {
@@ -505,7 +505,7 @@ abstract class ResourceLoaderModule {
         * contain arrays and scalars as values (avoid object instances) which means
         * it requires abstraction.
         *
-        * @return Array|null
+        * @return array|null
         */
        public function getDefinitionSummary( ResourceLoaderContext $context ) {
                return array(
@@ -536,7 +536,7 @@ abstract class ResourceLoaderModule {
         *
         * @param string $fileName
         * @param string $contents
-        * @return string: JS with the original, or a replacement error
+        * @return string JS with the original, or a replacement error
         */
        protected function validateScriptFile( $fileName, $contents ) {
                global $wgResourceLoaderValidateJS;
index bd026f3..61927d7 100644 (file)
@@ -33,9 +33,9 @@ class ResourceLoaderNoscriptModule extends ResourceLoaderWikiModule {
         * Gets list of pages used by this module.  Obviously, it makes absolutely no
         * sense to include JavaScript files here... :D
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         *
-        * @return Array: List of pages
+        * @return array List of pages
         */
        protected function getPages( ResourceLoaderContext $context ) {
                return array( 'MediaWiki:Noscript.css' => array( 'type' => 'style' ) );
@@ -46,7 +46,7 @@ class ResourceLoaderNoscriptModule extends ResourceLoaderWikiModule {
        /**
         * Gets group name
         *
-        * @return String: Name of group
+        * @return string Name of group
         */
        public function getGroup() {
                return 'noscript';
index 05754d3..d28f40f 100644 (file)
@@ -32,9 +32,9 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
        /**
         * Gets list of pages used by this module
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         *
-        * @return Array: List of pages
+        * @return array List of pages
         */
        protected function getPages( ResourceLoaderContext $context ) {
                global $wgUseSiteJs, $wgUseSiteCss;
@@ -58,7 +58,7 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
        /**
         * Gets group name
         *
-        * @return String: Name of group
+        * @return string Name of group
         */
        public function getGroup() {
                return 'site';
index 5ff88d8..8dc5946 100644 (file)
@@ -120,7 +120,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
        /**
         * Get registration code for all modules.
         *
-        * @param ResourceLoaderContext $context object
+        * @param ResourceLoaderContext $context
         * @return string JavaScript code for registering all modules with the client loader
         */
        public static function getModuleRegistrations( ResourceLoaderContext $context ) {
@@ -345,8 +345,8 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
         *
         * Detect changes to mw.config settings embedded in #getScript (bug 28899).
         *
-        * @param $context ResourceLoaderContext
-        * @return string: Hash
+        * @param ResourceLoaderContext $context
+        * @return string Hash
         */
        public function getModifiedHash( ResourceLoaderContext $context ) {
                global $wgLegacyJavaScriptGlobals;
index 8ce0ca7..082a65c 100644 (file)
@@ -36,8 +36,8 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return array|int|Mixed
+        * @param ResourceLoaderContext $context
+        * @return array|int|mixed
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                $hash = $context->getHash();
@@ -50,7 +50,7 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        public function getStyles( ResourceLoaderContext $context ) {
index 6757d39..680c74c 100644 (file)
@@ -33,7 +33,7 @@ class ResourceLoaderUserGroupsModule extends ResourceLoaderWikiModule {
        /* Protected Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        protected function getPages( ResourceLoaderContext $context ) {
index 7454b65..90b4838 100644 (file)
@@ -34,7 +34,7 @@ class ResourceLoaderUserModule extends ResourceLoaderWikiModule {
        /* Protected Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        protected function getPages( ResourceLoaderContext $context ) {
index 3686bea..bd97a8e 100644 (file)
@@ -38,8 +38,8 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule {
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
-        * @return array|int|Mixed
+        * @param ResourceLoaderContext $context
+        * @return array|int|mixed
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                $hash = $context->getHash();
@@ -52,7 +52,7 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string
         */
        public function getScript( ResourceLoaderContext $context ) {
index cdc9611..e652422 100644 (file)
@@ -37,7 +37,7 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
        /**
         * Fetch the tokens for the current user.
         *
-        * @return array: List of tokens keyed by token type
+        * @return array List of tokens keyed by token type
         */
        protected function contextUserTokens() {
                global $wgUser;
@@ -50,7 +50,7 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string
         */
        public function getScript( ResourceLoaderContext $context ) {
index f275a6b..bfb3c42 100644 (file)
@@ -54,7 +54,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
         * There is an optional media key, the value of which can be the
         * medium ('screen', 'print', etc.) of the stylesheet.
         *
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        abstract protected function getPages( ResourceLoaderContext $context );
@@ -77,7 +77,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $title Title
+        * @param Title $title
         * @return null|string
         */
        protected function getContent( $title ) {
@@ -109,7 +109,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        /* Methods */
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string
         */
        public function getScript( ResourceLoaderContext $context ) {
@@ -132,7 +132,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        public function getStyles( ResourceLoaderContext $context ) {
@@ -166,7 +166,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return int|mixed
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
@@ -186,7 +186,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        /**
         * Get the definition summary for this module.
         *
-        * @return Array
+        * @return array
         */
        public function getDefinitionSummary( ResourceLoaderContext $context ) {
                return array(
@@ -196,7 +196,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return bool
         */
        public function isKnownEmpty( ResourceLoaderContext $context ) {
@@ -206,7 +206,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
        /**
         * Get the modification times of all titles that would be loaded for
         * a given context.
-        * @param $context ResourceLoaderContext: Context object
+        * @param ResourceLoaderContext $context Context object
         * @return array( prefixed DB key => UNIX timestamp ), nonexistent titles are dropped
         */
        protected function getTitleMtimes( ResourceLoaderContext $context ) {
index 687f9a4..827d8c3 100644 (file)
@@ -37,7 +37,7 @@ class SearchEngine {
        var $namespaces = array( NS_MAIN );
        protected $showSuggestion = true;
 
-       /** @var Array Feature values */
+       /** @var array Feature values */
        protected $features = array();
 
        /**
@@ -45,7 +45,7 @@ class SearchEngine {
         * If title searches are not supported or disabled, return null.
         * STUB
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SearchResultSet|Status|null
         */
        function searchText( $term ) {
@@ -57,7 +57,7 @@ class SearchEngine {
         * If title searches are not supported or disabled, return null.
         * STUB
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SearchResultSet|null
         */
        function searchTitle( $term ) {
@@ -66,8 +66,8 @@ class SearchEngine {
 
        /**
         * @since 1.18
-        * @param $feature String
-        * @return Boolean
+        * @param string $feature
+        * @return bool
         */
        public function supports( $feature ) {
                switch ( $feature ) {
@@ -82,8 +82,8 @@ class SearchEngine {
        /**
         * Way to pass custom data for engines
         * @since 1.18
-        * @param $feature String
-        * @param $data Mixed
+        * @param string $feature
+        * @param mixed $data
         * @return bool
         */
        public function setFeatureData( $feature, $data ) {
@@ -117,7 +117,7 @@ class SearchEngine {
         * If an exact title match can be found, or a very slightly close match,
         * return the title. If no match, returns NULL.
         *
-        * @param $searchterm String
+        * @param string $searchterm
         * @return Title
         */
        public static function getNearMatch( $searchterm ) {
@@ -131,7 +131,7 @@ class SearchEngine {
         * Do a near match (see SearchEngine::getNearMatch) and wrap it into a
         * SearchResultSet.
         *
-        * @param $searchterm string
+        * @param string $searchterm
         * @return SearchResultSet
         */
        public static function getNearMatchResultSet( $searchterm ) {
@@ -262,8 +262,8 @@ class SearchEngine {
         * Set the maximum number of results to return
         * and how many to skip before returning the first.
         *
-        * @param $limit Integer
-        * @param $offset Integer
+        * @param int $limit
+        * @param int $offset
         */
        function setLimitOffset( $limit, $offset = 0 ) {
                $this->limit = intval( $limit );
@@ -274,7 +274,7 @@ class SearchEngine {
         * Set which namespaces the search should include.
         * Give an array of namespace index numbers.
         *
-        * @param $namespaces Array
+        * @param array $namespaces
         */
        function setNamespaces( $namespaces ) {
                $this->namespaces = $namespaces;
@@ -285,7 +285,7 @@ class SearchEngine {
         * don't support building a suggestion in the first place and others don't respect
         * this flag.
         *
-        * @param boolean $showSuggestion should the searcher try to build suggestions
+        * @param bool $showSuggestion Should the searcher try to build suggestions
         */
        function setShowSuggestion( $showSuggestion ) {
                $this->showSuggestion = $showSuggestion;
@@ -295,7 +295,7 @@ class SearchEngine {
         * Parse some common prefixes: all (search everything)
         * or namespace names
         *
-        * @param $query String
+        * @param string $query
         * @return string
         */
        function replacePrefixes( $query ) {
@@ -330,7 +330,7 @@ class SearchEngine {
 
        /**
         * Make a list of searchable namespaces and their canonical names.
-        * @return Array
+        * @return array
         */
        public static function searchableNamespaces() {
                global $wgContLang;
@@ -349,8 +349,8 @@ class SearchEngine {
         * Extract default namespaces to search from the given user's
         * settings, returning a list of index numbers.
         *
-        * @param $user User
-        * @return Array
+        * @param user $user
+        * @return array
         */
        public static function userNamespaces( $user ) {
                global $wgSearchEverythingOnlyLoggedIn;
@@ -378,7 +378,7 @@ class SearchEngine {
        /**
         * Find snippet highlight settings for all users
         *
-        * @return Array contextlines, contextchars
+        * @return array Contextlines, contextchars
         */
        public static function userHighlightPrefs() {
                $contextlines = 2; // Hardcode this. Old defaults sucked. :)
@@ -389,7 +389,7 @@ class SearchEngine {
        /**
         * An array of namespaces indexes to be searched by default
         *
-        * @return Array
+        * @return array
         */
        public static function defaultNamespaces() {
                global $wgNamespacesToBeSearchedDefault;
@@ -401,7 +401,7 @@ class SearchEngine {
         * Get a list of namespace names useful for showing in tooltips
         * and preferences
         *
-        * @param $namespaces Array
+        * @param array $namespaces
         * @return array
         */
        public static function namespacesAsText( $namespaces ) {
@@ -419,7 +419,7 @@ class SearchEngine {
        /**
         * Return the help namespaces to be shown on Special:Search
         *
-        * @return Array
+        * @return array
         */
        public static function helpNamespaces() {
                global $wgNamespacesToBeSearchedHelp;
@@ -430,8 +430,8 @@ class SearchEngine {
        /**
         * Return a 'cleaned up' search string
         *
-        * @param $text String
-        * @return String
+        * @param string $text
+        * @return string
         */
        function filter( $text ) {
                $lc = $this->legalSearchChars();
@@ -442,7 +442,7 @@ class SearchEngine {
         * Load up the appropriate search engine class for the currently
         * active database backend, and return a configured instance.
         *
-        * @param String $type Type of search backend, if not the default
+        * @param string $type Type of search backend, if not the default
         * @return SearchEngine
         */
        public static function create( $type = null ) {
@@ -484,9 +484,9 @@ class SearchEngine {
         * Title and text should be pre-processed.
         * STUB
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                // no-op
@@ -497,8 +497,8 @@ class SearchEngine {
         * Title should be pre-processed.
         * STUB
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                // no-op
@@ -509,8 +509,8 @@ class SearchEngine {
         * Title should be pre-processed.
         * STUB
         *
-        * @param Integer $id Page id that was deleted
-        * @param String $title Title of page that was deleted
+        * @param int $id Page id that was deleted
+        * @param string $title Title of page that was deleted
         */
        function delete( $id, $title ) {
                // no-op
@@ -519,7 +519,7 @@ class SearchEngine {
        /**
         * Get OpenSearch suggestion template
         *
-        * @return String
+        * @return string
         */
        public static function getOpenSearchTemplate() {
                global $wgOpenSearchTemplate, $wgCanonicalServer;
index 4c8aea5..5e734fe 100644 (file)
@@ -36,11 +36,11 @@ class SearchHighlighter {
        /**
         * Default implementation of wikitext highlighting
         *
-        * @param $text String
-        * @param array $terms terms to highlight (unescaped)
-        * @param $contextlines Integer
-        * @param $contextchars Integer
-        * @return String
+        * @param string $text
+        * @param array $terms Terms to highlight (unescaped)
+        * @param int $contextlines
+        * @param int $contextchars
+        * @return tring
         */
        public function highlightText( $text, $terms, $contextlines, $contextchars ) {
                global $wgContLang;
@@ -285,8 +285,8 @@ class SearchHighlighter {
         * Split text into lines and add it to extracts array
         *
         * @param array $extracts index -> $line
-        * @param $count Integer
-        * @param $text String
+        * @param int $count
+        * @param string $text
         */
        function splitAndAdd( &$extracts, &$count, $text ) {
                $split = explode( "\n", $this->mCleanWikitext ? $this->removeWiki( $text ) : $text );
@@ -301,7 +301,7 @@ class SearchHighlighter {
        /**
         * Do manual case conversion for non-ascii chars
         *
-        * @param $matches Array
+        * @param array $matches
         * @return string
         */
        function caseCallback( $matches ) {
@@ -316,12 +316,12 @@ class SearchHighlighter {
        /**
         * Extract part of the text from start to end, but by
         * not chopping up words
-        * @param $text String
-        * @param $start Integer
-        * @param $end Integer
-        * @param $posStart Integer: (out) actual start position
-        * @param $posEnd Integer: (out) actual end position
-        * @return String
+        * @param string $text
+        * @param int $start
+        * @param int $end
+        * @param int $posStart (out) actual start position
+        * @param int $posEnd (out) actual end position
+        * @return string
         */
        function extract( $text, $start, $end, &$posStart = null, &$posEnd = null ) {
                if ( $start != 0 ) {
@@ -350,10 +350,10 @@ class SearchHighlighter {
        /**
         * Find a nonletter near a point (index) in the text
         *
-        * @param $text String
-        * @param $point Integer
-        * @param $offset Integer: offset to found index
-        * @return Integer: nearest nonletter index, or beginning of utf8 char if none
+        * @param string $text
+        * @param int $point
+        * @param int $offset Offset to found index
+        * @return int Nearest nonletter index, or beginning of utf8 char if none
         */
        function position( $text, $point, $offset = 0 ) {
                $tolerance = 10;
@@ -381,12 +381,12 @@ class SearchHighlighter {
        /**
         * Search extracts for a pattern, and return snippets
         *
-        * @param string $pattern regexp for matching lines
-        * @param array $extracts extracts to search
-        * @param $linesleft Integer: number of extracts to make
-        * @param $contextchars Integer: length of snippet
-        * @param array $out map for highlighted snippets
-        * @param array $offsets map of starting points of snippets
+        * @param string $pattern Regexp for matching lines
+        * @param array $extracts Extracts to search
+        * @param int $linesleft Number of extracts to make
+        * @param int $contextchars Length of snippet
+        * @param array $out Map for highlighted snippets
+        * @param array $offsets Map of starting points of snippets
         * @protected
         */
        function process( $pattern, $extracts, &$linesleft, &$contextchars, &$out, &$offsets ) {
@@ -459,7 +459,7 @@ class SearchHighlighter {
         * callback to replace [[target|caption]] kind of links, if
         * the target is category or image, leave it
         *
-        * @param $matches Array
+        * @param array $matches
         */
        function linkReplace( $matches ) {
                $colon = strpos( $matches[1], ':' );
@@ -480,11 +480,11 @@ class SearchHighlighter {
         * Simple & fast snippet extraction, but gives completely unrelevant
         * snippets
         *
-        * @param $text String
-        * @param $terms Array
-        * @param $contextlines Integer
-        * @param $contextchars Integer
-        * @return String
+        * @param string $text
+        * @param array $terms
+        * @param int $contextlines
+        * @param int $contextchars
+        * @return string
         */
        public function highlightSimple( $text, $terms, $contextlines, $contextchars ) {
                global $wgContLang;
index d92c9c8..6326112 100644 (file)
@@ -29,7 +29,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MssqlSearchResultSet
         * @access public
         */
@@ -41,7 +41,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MssqlSearchResultSet
         * @access public
         */
@@ -53,7 +53,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
         *
-        * @return String
+        * @return string
         * @private
         */
        function queryNamespaces() {
@@ -67,9 +67,9 @@ class SearchMssql extends SearchDatabase {
        /**
         * Return a LIMIT clause to limit results on the query.
         *
-        * @param $sql string
+        * @param string $sql
         *
-        * @return String
+        * @return string
         */
        function queryLimit( $sql ) {
                return $this->db->limitResult( $sql, $this->limit, $this->offset );
@@ -79,7 +79,7 @@ class SearchMssql extends SearchDatabase {
         * Does not do anything for generic search engine
         * subclasses may define this though
         *
-        * @return String
+        * @return string
         */
        function queryRanking( $filteredTerm, $fulltext ) {
                return ' ORDER BY ftindex.[RANK] DESC'; // return ' ORDER BY score(1)';
@@ -89,9 +89,9 @@ class SearchMssql extends SearchDatabase {
         * Construct the full SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
@@ -102,7 +102,7 @@ class SearchMssql extends SearchDatabase {
        /**
         * Picks which field to index on, depending on what type of query.
         *
-        * @param $fulltext Boolean
+        * @param bool $fulltext
         * @return string
         */
        function getIndexField( $fulltext ) {
@@ -112,9 +112,9 @@ class SearchMssql extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         * @private
         */
        function queryMain( $filteredTerm, $fulltext ) {
@@ -165,9 +165,9 @@ class SearchMssql extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         * @return bool|ResultWrapper
         */
        function update( $id, $title, $text ) {
@@ -189,8 +189,8 @@ class SearchMssql extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         * @return bool|ResultWrapper
         */
        function updateTitle( $id, $title ) {
index c4d7d1e..cfe4c29 100644 (file)
@@ -36,8 +36,8 @@ class SearchMySQL extends SearchDatabase {
         * Parse the user's query and transform it into an SQL fragment which will
         * become part of a WHERE clause
         *
-        * @param $filteredText string
-        * @param $fulltext string
+        * @param string $filteredText
+        * @param string $fulltext
         *
         * @return string
         */
@@ -152,7 +152,7 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MySQLSearchResultSet
         */
        function searchText( $term ) {
@@ -162,7 +162,7 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return MySQLSearchResultSet
         */
        function searchTitle( $term ) {
@@ -213,7 +213,7 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Add special conditions
-        * @param $query Array
+        * @param array $query
         * @since 1.18
         */
        protected function queryFeatures( &$query ) {
@@ -226,7 +226,7 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Add namespace conditions
-        * @param $query Array
+        * @param array $query
         * @since 1.18 (changed)
         */
        function queryNamespaces( &$query ) {
@@ -240,7 +240,7 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Add limit options
-        * @param $query Array
+        * @param array $query
         * @since 1.18
         */
        protected function limitResult( &$query ) {
@@ -251,9 +251,9 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Construct the SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return Array
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return array
         * @since 1.18 (changed)
         */
        function getQuery( $filteredTerm, $fulltext ) {
@@ -275,8 +275,8 @@ class SearchMySQL extends SearchDatabase {
 
        /**
         * Picks which field to index on, depending on what type of query.
-        * @param $fulltext Boolean
-        * @return String
+        * @param bool $fulltext
+        * @return string
         */
        function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
@@ -285,9 +285,9 @@ class SearchMySQL extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param &$query array Search query array
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
+        * @param array &$query Search query array
+        * @param string $filteredTerm
+        * @param bool $fulltext
         * @since 1.18 (changed)
         */
        function queryMain( &$query, $filteredTerm, $fulltext ) {
@@ -326,9 +326,9 @@ class SearchMySQL extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -345,8 +345,8 @@ class SearchMySQL extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -362,8 +362,8 @@ class SearchMySQL extends SearchDatabase {
         * Delete an indexed page
         * Title should be pre-processed.
         *
-        * @param Integer $id Page id that was deleted
-        * @param String $title Title of page that was deleted
+        * @param int $id Page id that was deleted
+        * @param string $title Title of page that was deleted
         */
        function delete( $id, $title ) {
                $dbw = wfGetDB( DB_MASTER );
index e14de2c..d5a6597 100644 (file)
@@ -62,7 +62,7 @@ class SearchOracle extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqlSearchResultSet
         */
        function searchText( $term ) {
@@ -77,7 +77,7 @@ class SearchOracle extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqlSearchResultSet
         */
        function searchTitle( $term ) {
@@ -91,7 +91,7 @@ class SearchOracle extends SearchDatabase {
 
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
-        * @return String
+        * @return string
         */
        function queryNamespaces() {
                if ( is_null( $this->namespaces ) ) {
@@ -108,9 +108,9 @@ class SearchOracle extends SearchDatabase {
        /**
         * Return a LIMIT clause to limit results on the query.
         *
-        * @param $sql string
+        * @param string $sql
         *
-        * @return String
+        * @return string
         */
        function queryLimit( $sql ) {
                return $this->db->limitResult( $sql, $this->limit, $this->offset );
@@ -120,7 +120,7 @@ class SearchOracle extends SearchDatabase {
         * Does not do anything for generic search engine
         * subclasses may define this though
         *
-        * @return String
+        * @return string
         */
        function queryRanking( $filteredTerm, $fulltext ) {
                return ' ORDER BY score(1)';
@@ -129,9 +129,9 @@ class SearchOracle extends SearchDatabase {
        /**
         * Construct the full SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
@@ -141,8 +141,8 @@ class SearchOracle extends SearchDatabase {
 
        /**
         * Picks which field to index on, depending on what type of query.
-        * @param $fulltext Boolean
-        * @return String
+        * @param bool $fulltext
+        * @return string
         */
        function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
@@ -151,9 +151,9 @@ class SearchOracle extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
@@ -222,9 +222,9 @@ class SearchOracle extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -251,8 +251,8 @@ class SearchOracle extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                $dbw = wfGetDB( DB_MASTER );
index e4f4b55..2a20d70 100644 (file)
@@ -34,7 +34,7 @@ class SearchPostgres extends SearchDatabase {
         * Currently searches a page's current title (page.page_title) and
         * latest revision article text (pagecontent.old_text)
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return PostgresSearchResultSet
         */
        function searchTitle( $term ) {
@@ -64,7 +64,7 @@ class SearchPostgres extends SearchDatabase {
         * Transform the user's search string into a better form for tsearch2
         * Returns an SQL fragment consisting of quoted text to search for.
         *
-        * @param $term string
+        * @param string $term
         *
         * @return string
         */
@@ -130,9 +130,9 @@ class SearchPostgres extends SearchDatabase {
 
        /**
         * Construct the full SQL query to do the search.
-        * @param $term String
-        * @param $fulltext String
-        * @param $colname
+        * @param string $term
+        * @param string $fulltext
+        * @param string $colname
         * @return string
         */
        function searchQuery( $term, $fulltext, $colname ) {
index 153590a..56ae2ff 100644 (file)
@@ -45,14 +45,14 @@ class SearchResult {
        protected $mTitle;
 
        /**
-        * @var String
+        * @var string
         */
        protected $mText;
 
        /**
         * Return a new SearchResult and initializes it with a title.
         *
-        * @param $title Title
+        * @param Title $title
         * @return SearchResult
         */
        public static function newFromTitle( $title ) {
@@ -64,7 +64,7 @@ class SearchResult {
        /**
         * Return a new SearchResult and initializes it with a row.
         *
-        * @param $row object
+        * @param object $row
         * @return SearchResult
         */
        public static function newFromRow( $row ) {
@@ -84,7 +84,7 @@ class SearchResult {
         * Initialize from a database row. Makes a Title and passes that to
         * initFromTitle.
         *
-        * @param $row object
+        * @param object $row
         */
        protected function initFromRow( $row ) {
                $this->initFromTitle( Title::makeTitle( $row->page_namespace, $row->page_title ) );
@@ -94,7 +94,7 @@ class SearchResult {
         * Initialize from a Title and if possible initializes a corresponding
         * Revision and File.
         *
-        * @param $title Title
+        * @param Title $title
         */
        protected function initFromTitle( $title ) {
                $this->mTitle = $title;
@@ -112,7 +112,7 @@ class SearchResult {
        /**
         * Check if this is result points to an invalid title
         *
-        * @return Boolean
+        * @return bool
         */
        function isBrokenTitle() {
                return is_null( $this->mTitle );
@@ -121,7 +121,7 @@ class SearchResult {
        /**
         * Check if target page is missing, happens when index is out of date
         *
-        * @return Boolean
+        * @return bool
         */
        function isMissingRevision() {
                return !$this->mRevision && !$this->mImage;
@@ -143,7 +143,7 @@ class SearchResult {
        }
 
        /**
-        * @return float|null if not supported
+        * @return float|null If not supported
         */
        function getScore() {
                return null;
@@ -164,8 +164,8 @@ class SearchResult {
        }
 
        /**
-        * @param array $terms terms to highlight
-        * @return String: highlighted text snippet, null (and not '') if not supported
+        * @param array $terms Terms to highlight
+        * @return string Highlighted text snippet, null (and not '') if not supported
         */
        function getTextSnippet( $terms ) {
                global $wgAdvancedSearchHighlighting;
@@ -182,42 +182,42 @@ class SearchResult {
        }
 
        /**
-        * @return String: highlighted title, '' if not supported
+        * @return string Highlighted title, '' if not supported
         */
        function getTitleSnippet() {
                return '';
        }
 
        /**
-        * @return String: highlighted redirect name (redirect to this page), '' if none or not supported
+        * @return string Highlighted redirect name (redirect to this page), '' if none or not supported
         */
        function getRedirectSnippet() {
                return '';
        }
 
        /**
-        * @return Title object for the redirect to this page, null if none or not supported
+        * @return Title Title object for the redirect to this page, null if none or not supported
         */
        function getRedirectTitle() {
                return null;
        }
 
        /**
-        * @return string highlighted relevant section name, null if none or not supported
+        * @return string Highlighted relevant section name, null if none or not supported
         */
        function getSectionSnippet() {
                return '';
        }
 
        /**
-        * @return Title object (pagename+fragment) for the section, null if none or not supported
+        * @return Title Title object (pagename+fragment) for the section, null if none or not supported
         */
        function getSectionTitle() {
                return null;
        }
 
        /**
-        * @return String: timestamp
+        * @return string timestamp
         */
        function getTimestamp() {
                if ( $this->mRevision ) {
@@ -229,7 +229,7 @@ class SearchResult {
        }
 
        /**
-        * @return Integer: number of words
+        * @return int Number of words
         */
        function getWordCount() {
                $this->initText();
@@ -237,7 +237,7 @@ class SearchResult {
        }
 
        /**
-        * @return Integer: size in bytes
+        * @return int Size in bytes
         */
        function getByteSize() {
                $this->initText();
@@ -245,21 +245,21 @@ class SearchResult {
        }
 
        /**
-        * @return Boolean if hit has related articles
+        * @return bool If hit has related articles
         */
        function hasRelated() {
                return false;
        }
 
        /**
-        * @return String: interwiki prefix of the title (return iw even if title is broken)
+        * @return string Interwiki prefix of the title (return iw even if title is broken)
         */
        function getInterwikiPrefix() {
                return '';
        }
 
        /**
-        * @return string interwiki namespace of the title (since we likely can't resolve it locally)
+        * @return string Interwiki namespace of the title (since we likely can't resolve it locally)
         */
        function getInterwikiNamespaceText() {
                return '';
@@ -267,6 +267,7 @@ class SearchResult {
 
        /**
         * Did this match file contents (eg: PDF/DJVU)?
+        * @return bool
         */
        function isFileMatch() {
                return false;
index e689389..178129a 100644 (file)
@@ -30,7 +30,7 @@ class SearchResultSet {
         * the search terms as parsed by this engine in a text extract.
         * STUB
         *
-        * @return Array
+        * @return array
         */
        function termMatches() {
                return array();
@@ -44,7 +44,7 @@ class SearchResultSet {
         * Return true if results are included in this result set.
         * STUB
         *
-        * @return Boolean
+        * @return bool
         */
        function hasResults() {
                return false;
@@ -58,7 +58,7 @@ class SearchResultSet {
         *
         * Return null if no total hits number is supported.
         *
-        * @return Integer
+        * @return int
         */
        function getTotalHits() {
                return null;
@@ -68,21 +68,21 @@ class SearchResultSet {
         * Some search modes return a suggested alternate term if there are
         * no exact hits. Returns true if there is one on this set.
         *
-        * @return Boolean
+        * @return bool
         */
        function hasSuggestion() {
                return false;
        }
 
        /**
-        * @return String: suggested query, null if none
+        * @return string Suggested query, null if none
         */
        function getSuggestionQuery() {
                return null;
        }
 
        /**
-        * @return String: HTML highlighted suggested query, '' if none
+        * @return string HTML highlighted suggested query, '' if none
         */
        function getSuggestionSnippet() {
                return '';
@@ -100,7 +100,7 @@ class SearchResultSet {
        /**
         * Check if there are results on other wikis
         *
-        * @return Boolean
+        * @return bool
         */
        function hasInterwikiResults() {
                return $this->getInterwikiResults() != null;
@@ -127,6 +127,7 @@ class SearchResultSet {
         * Did the search contain search syntax?  If so, Special:Search won't offer
         * the user a link to a create a page named by the search string because the
         * name would contain the search syntax.
+        * @return bool
         */
        public function searchContainedSyntax() {
                return false;
@@ -187,7 +188,7 @@ class SearchNearMatchResultSet extends SearchResultSet {
        private $fetched = false;
 
        /**
-        * @param $match mixed Title if matched, else null
+        * @param Title|null $match Title if matched, else null
         */
        public function __construct( $match ) {
                $this->result = $match;
index 6b2b3c6..1a05ee2 100644 (file)
@@ -28,7 +28,7 @@
 class SearchSqlite extends SearchDatabase {
        /**
         * Whether fulltext search is supported by current schema
-        * @return Boolean
+        * @return bool
         */
        function fulltextSearchSupported() {
                return $this->db->checkForEnabledSearch();
@@ -144,7 +144,7 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Perform a full text search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqliteSearchResultSet
         */
        function searchText( $term ) {
@@ -154,7 +154,7 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Perform a title-only search query and return a result set.
         *
-        * @param string $term raw search term
+        * @param string $term Raw search term
         * @return SqliteSearchResultSet
         */
        function searchTitle( $term ) {
@@ -186,7 +186,7 @@ class SearchSqlite extends SearchDatabase {
 
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
-        * @return String
+        * @return string
         */
        function queryNamespaces() {
                if ( is_null( $this->namespaces ) ) {
@@ -202,8 +202,8 @@ class SearchSqlite extends SearchDatabase {
 
        /**
         * Returns a query with limit for number of results set.
-        * @param $sql String:
-        * @return String
+        * @param string $sql
+        * @return string
         */
        function limitResult( $sql ) {
                return $this->db->limitResult( $sql, $this->limit, $this->offset );
@@ -212,9 +212,9 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Construct the full SQL query to do the search.
         * The guts shoulds be constructed in queryMain()
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->limitResult(
@@ -225,8 +225,8 @@ class SearchSqlite extends SearchDatabase {
 
        /**
         * Picks which field to index on, depending on what type of query.
-        * @param $fulltext Boolean
-        * @return String
+        * @param bool $fulltext
+        * @return string
         */
        function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
@@ -235,9 +235,9 @@ class SearchSqlite extends SearchDatabase {
        /**
         * Get the base part of the search query.
         *
-        * @param $filteredTerm String
-        * @param $fulltext Boolean
-        * @return String
+        * @param string $filteredTerm
+        * @param bool $fulltext
+        * @return string
         */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
@@ -262,9 +262,9 @@ class SearchSqlite extends SearchDatabase {
         * Create or update the search index record for the given page.
         * Title and text should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
-        * @param $text String
+        * @param int $id
+        * @param string $title
+        * @param string $text
         */
        function update( $id, $title, $text ) {
                if ( !$this->fulltextSearchSupported() ) {
@@ -288,8 +288,8 @@ class SearchSqlite extends SearchDatabase {
         * Update a search index record's title only.
         * Title should be pre-processed.
         *
-        * @param $id Integer
-        * @param $title String
+        * @param int $id
+        * @param string $title
         */
        function updateTitle( $id, $title ) {
                if ( !$this->fulltextSearchSupported() ) {
index 61bb1cd..0c4252e 100644 (file)
@@ -551,7 +551,7 @@ class SpecialSearch extends SpecialPage {
                $profile = new ProfileSection( __METHOD__ );
 
                if ( $result->isBrokenTitle() ) {
-                       return "<!-- Broken link in search result -->\n";
+                       return '';
                }
 
                $title = $result->getTitle();
@@ -583,7 +583,7 @@ class SpecialSearch extends SpecialPage {
                // The least confusing at this point is to drop the result.
                // You may get less results, but... oh well. :P
                if ( $result->isMissingRevision() ) {
-                       return "<!-- missing page " . htmlspecialchars( $title->getPrefixedText() ) . "-->\n";
+                       return '';
                }
 
                // format redirects / relevant sections
@@ -783,7 +783,7 @@ class SpecialSearch extends SpecialPage {
                $profile = new ProfileSection( __METHOD__ );
 
                if ( $result->isBrokenTitle() ) {
-                       return "<!-- Broken link in search result -->\n";
+                       return '';
                }
 
                $title = $result->getTitle();
diff --git a/languages/FakeConverter.php b/languages/FakeConverter.php
new file mode 100644 (file)
index 0000000..47d24dc
--- /dev/null
@@ -0,0 +1,122 @@
+<?php
+/**
+ * Internationalisation code.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Language
+ */
+
+/**
+ * A fake language converter
+ *
+ * @ingroup Language
+ */
+class FakeConverter {
+       /**
+        * @var Language
+        */
+       public $mLang;
+
+       function __construct( $langobj ) {
+               $this->mLang = $langobj;
+       }
+
+       function autoConvert( $text, $variant = false ) {
+               return $text;
+       }
+
+       function autoConvertToAllVariants( $text ) {
+               return array( $this->mLang->getCode() => $text );
+       }
+
+       function convert( $t ) {
+               return $t;
+       }
+
+       function convertTo( $text, $variant ) {
+               return $text;
+       }
+
+       /**
+        * @param Title $t
+        * @return mixed
+        */
+       function convertTitle( $t ) {
+               return $t->getPrefixedText();
+       }
+
+       function convertNamespace( $ns ) {
+               return $this->mLang->getFormattedNsText( $ns );
+       }
+
+       function getVariants() {
+               return array( $this->mLang->getCode() );
+       }
+
+       function getVariantFallbacks( $variant ) {
+               return $this->mLang->getCode();
+       }
+
+       function getPreferredVariant() {
+               return $this->mLang->getCode();
+       }
+
+       function getDefaultVariant() {
+               return $this->mLang->getCode();
+       }
+
+       function getURLVariant() {
+               return '';
+       }
+
+       function getConvRuleTitle() {
+               return false;
+       }
+
+       function findVariantLink( &$l, &$n, $ignoreOtherCond = false ) {
+       }
+
+       function getExtraHashOptions() {
+               return '';
+       }
+
+       function getParsedTitle() {
+               return '';
+       }
+
+       function markNoConversion( $text, $noParse = false ) {
+               return $text;
+       }
+
+       function convertCategoryKey( $key ) {
+               return $key;
+       }
+
+       /** @deprecated since 1.22 is no longer used */
+       function armourMath( $text ) {
+               return $text;
+       }
+
+       function validateVariant( $variant = null ) {
+               return $variant === $this->mLang->getCode() ? $variant : null;
+       }
+
+       function translate( $text, $variant ) {
+               return $text;
+       }
+}
index 6400786..c635ebb 100644 (file)
@@ -34,46 +34,11 @@ if ( function_exists( 'mb_strtoupper' ) ) {
        mb_internal_encoding( 'UTF-8' );
 }
 
-/**
- * a fake language converter
- *
- * @ingroup Language
- */
-class FakeConverter {
-       /**
-        * @var Language
-        */
-       public $mLang;
-       function __construct( $langobj ) { $this->mLang = $langobj; }
-       function autoConvert( $text, $variant = false ) { return $text; }
-       function autoConvertToAllVariants( $text ) { return array( $this->mLang->getCode() => $text ); }
-       function convert( $t ) { return $t; }
-       function convertTo( $text, $variant ) { return $text; }
-       function convertTitle( $t ) { return $t->getPrefixedText(); }
-       function convertNamespace( $ns ) { return $this->mLang->getFormattedNsText( $ns ); }
-       function getVariants() { return array( $this->mLang->getCode() ); }
-       function getVariantFallbacks( $variant ) { return $this->mLang->getCode(); }
-       function getPreferredVariant() { return $this->mLang->getCode(); }
-       function getDefaultVariant() { return $this->mLang->getCode(); }
-       function getURLVariant() { return ''; }
-       function getConvRuleTitle() { return false; }
-       function findVariantLink( &$l, &$n, $ignoreOtherCond = false ) { }
-       function getExtraHashOptions() { return ''; }
-       function getParsedTitle() { return ''; }
-       function markNoConversion( $text, $noParse = false ) { return $text; }
-       function convertCategoryKey( $key ) { return $key; }
-       /** @deprecated since 1.22 is no longer used */
-       function armourMath( $text ) { return $text; }
-       function validateVariant( $variant = null ) { return $variant === $this->mLang->getCode() ? $variant : null; }
-       function translate( $text, $variant ) { return $text; }
-}
-
 /**
  * Internationalisation code
  * @ingroup Language
  */
 class Language {
-
        /**
         * @var LanguageConverter
         */
@@ -475,7 +440,8 @@ class Language {
         * Hook which will be called if this is the content language.
         * Descendants can use this to register hook functions or modify globals
         */
-       function initContLang() { }
+       function initContLang() {
+       }
 
        /**
         * Same as getFallbacksFor for current language.
@@ -484,6 +450,7 @@ class Language {
         */
        function getFallbackLanguageCode() {
                wfDeprecated( __METHOD__, '1.19' );
+
                return self::getFallbackFor( $this->mCode );
        }
 
@@ -540,6 +507,7 @@ class Language {
 
                        wfRunHooks( 'LanguageGetNamespaces', array( &$this->namespaceNames ) );
                }
+
                return $this->namespaceNames;
        }
 
@@ -589,6 +557,7 @@ class Language {
         */
        function getNsText( $index ) {
                $ns = $this->getNamespaces();
+
                return isset( $ns[$index] ) ? $ns[$index] : false;
        }
 
@@ -607,6 +576,7 @@ class Language {
         */
        function getFormattedNsText( $index ) {
                $ns = $this->getNsText( $index );
+
                return strtr( $ns, '_', ' ' );
        }
 
@@ -621,7 +591,9 @@ class Language {
        function getGenderNsText( $index, $gender ) {
                global $wgExtraGenderNamespaces;
 
-               $ns = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
+               $ns = $wgExtraGenderNamespaces +
+                       self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
+
                return isset( $ns[$index][$gender] ) ? $ns[$index][$gender] : $this->getNsText( $index );
        }
 
@@ -680,7 +652,8 @@ class Language {
                        }
 
                        global $wgExtraGenderNamespaces;
-                       $genders = $wgExtraGenderNamespaces + (array)self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
+                       $genders = $wgExtraGenderNamespaces +
+                               (array)self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
                        foreach ( $genders as $index => $forms ) {
                                foreach ( $forms as $alias ) {
                                        $aliases[$alias] = $index;
@@ -700,6 +673,7 @@ class Language {
 
                        $this->namespaceAliases = $aliases + $convertedNames;
                }
+
                return $this->namespaceAliases;
        }
 
@@ -1143,14 +1117,21 @@ class Language {
                        throw new MWException( __METHOD__ . ": The timestamp $ts should be a number" );
                }
 
-               for ( $p = 0; $p < strlen( $format ); $p++ ) {
+               $formatLength = strlen( $format );
+               for ( $p = 0; $p < $formatLength; $p++ ) {
                        $num = false;
                        $code = $format[$p];
-                       if ( $code == 'x' && $p < strlen( $format ) - 1 ) {
+                       if ( $code == 'x' && $p < $formatLength - 1 ) {
                                $code .= $format[++$p];
                        }
 
-                       if ( ( $code === 'xi' || $code == 'xj' || $code == 'xk' || $code == 'xm' || $code == 'xo' || $code == 'xt' ) && $p < strlen( $format ) - 1 ) {
+                       if ( ( $code === 'xi'
+                                       || $code === 'xj'
+                                       || $code === 'xk'
+                                       || $code === 'xm'
+                                       || $code === 'xo'
+                                       || $code === 'xt' )
+                               && $p < $formatLength - 1 ) {
                                $code .= $format[++$p];
                        }
 
@@ -1381,7 +1362,7 @@ class Language {
                                        break;
                                case '\\':
                                        # Backslash escaping
-                                       if ( $p < strlen( $format ) - 1 ) {
+                                       if ( $p < $formatLength - 1 ) {
                                                $s .= $format[++$p];
                                        } else {
                                                $s .= '\\';
@@ -1389,7 +1370,7 @@ class Language {
                                        break;
                                case '"':
                                        # Quoted literal
-                                       if ( $p < strlen( $format ) - 1 ) {
+                                       if ( $p < $formatLength - 1 ) {
                                                $endQuote = strpos( $format, '"', $p + 1 );
                                                if ( $endQuote === false ) {
                                                        # No terminating quote, assume literal "
@@ -1421,6 +1402,7 @@ class Language {
                                }
                        }
                }
+
                return $s;
        }
 
@@ -1523,8 +1505,10 @@ class Language {
                $zl = $zjd -1948440 + 10632;
                $zn = (int)( ( $zl - 1 ) / 10631 );
                $zl = $zl - 10631 * $zn + 354;
-               $zj = ( (int)( ( 10985 - $zl ) / 5316 ) ) * ( (int)( ( 50 * $zl ) / 17719 ) ) + ( (int)( $zl / 5670 ) ) * ( (int)( ( 43 * $zl ) / 15238 ) );
-               $zl = $zl - ( (int)( ( 30 - $zj ) / 15 ) ) * ( (int)( ( 17719 * $zj ) / 50 ) ) - ( (int)( $zj / 16 ) ) * ( (int)( ( 15238 * $zj ) / 43 ) ) + 29;
+               $zj = ( (int)( ( 10985 - $zl ) / 5316 ) ) * ( (int)( ( 50 * $zl ) / 17719 ) ) +
+                       ( (int)( $zl / 5670 ) ) * ( (int)( ( 43 * $zl ) / 15238 ) );
+               $zl = $zl - ( (int)( ( 30 - $zj ) / 15 ) ) * ( (int)( ( 17719 * $zj ) / 50 ) ) -
+                       ( (int)( $zj / 16 ) ) * ( (int)( ( 15238 * $zj ) / 43 ) ) + 29;
                $zm = (int)( ( 24 * $zl ) / 709 );
                $zd = $zl - (int)( ( 709 * $zm ) / 24 );
                $zy = 30 * $zn + $zj - 30;
@@ -1746,7 +1730,10 @@ class Language {
                        # Deduct years from the Gregorian calendar
                        # depending on the nengo periods
                        # Months and days are identical
-                       if ( ( $gy < 1912 ) || ( ( $gy == 1912 ) && ( $gm < 7 ) ) || ( ( $gy == 1912 ) && ( $gm == 7 ) && ( $gd < 31 ) ) ) {
+                       if ( ( $gy < 1912 )
+                               || ( ( $gy == 1912 ) && ( $gm < 7 ) )
+                               || ( ( $gy == 1912 ) && ( $gm == 7 ) && ( $gd < 31 ) )
+                       ) {
                                # Meiji period
                                $gy_gannen = $gy - 1868 + 1;
                                $gy_offset = $gy_gannen;
@@ -1808,7 +1795,8 @@ class Language {
                        array( '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X' ),
                        array( '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', 'C' ),
                        array( '', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', 'M' ),
-                       array( '', 'M', 'MM', 'MMM', 'MMMM', 'MMMMM', 'MMMMMM', 'MMMMMMM', 'MMMMMMMM', 'MMMMMMMMM', 'MMMMMMMMMM' )
+                       array( '', 'M', 'MM', 'MMM', 'MMMM', 'MMMMM', 'MMMMMM', 'MMMMMMM',
+                               'MMMMMMMM', 'MMMMMMMMM', 'MMMMMMMMMM' )
                );
 
                $num = intval( $num );
@@ -2130,7 +2118,16 @@ class Language {
         */
        public function getDurationIntervals( $seconds, array $chosenIntervals = array() ) {
                if ( empty( $chosenIntervals ) ) {
-                       $chosenIntervals = array( 'millennia', 'centuries', 'decades', 'years', 'days', 'hours', 'minutes', 'seconds' );
+                       $chosenIntervals = array(
+                               'millennia',
+                               'centuries',
+                               'decades',
+                               'years',
+                               'days',
+                               'hours',
+                               'minutes',
+                               'seconds'
+                       );
                }
 
                $intervals = array_intersect_key( self::$durationIntervals, array_flip( $chosenIntervals ) );
@@ -2276,9 +2273,12 @@ class Language {
         */
        public function getHumanTimestamp( MWTimestamp $ts, MWTimestamp $relativeTo, User $user ) {
                $diff = $ts->diff( $relativeTo );
-               $diffDay = (bool)( (int)$ts->timestamp->format( 'w' ) - (int)$relativeTo->timestamp->format( 'w' ) );
+               $diffDay = (bool)( (int)$ts->timestamp->format( 'w' ) -
+                       (int)$relativeTo->timestamp->format( 'w' ) );
                $days = $diff->days ?: (int)$diffDay;
-               if ( $diff->invert || $days > 5 && $ts->timestamp->format( 'Y' ) !== $relativeTo->timestamp->format( 'Y' ) ) {
+               if ( $diff->invert || $days > 5
+                       && $ts->timestamp->format( 'Y' ) !== $relativeTo->timestamp->format( 'Y' )
+               ) {
                        // Timestamps are in different years: use full timestamp
                        // Also do full timestamp for future dates
                        /**
@@ -2574,7 +2574,8 @@ class Language {
                        $breaks = "[ \-\(\)\}\{\.,\?!]";
 
                        // find first letter after word break
-                       $replaceRegexp = "/^([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)|$breaks([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/";
+                       $replaceRegexp = "/^([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)|" .
+                               "$breaks([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/";
 
                        if ( function_exists( 'mb_strtoupper' ) ) {
                                return preg_replace_callback(
@@ -2952,7 +2953,8 @@ class Language {
        /**
         * An arrow, depending on the language direction.
         *
-        * @param string $direction The direction of the arrow: forwards (default), backwards, left, right, up, down.
+        * @param string $direction The direction of the arrow: forwards (default),
+        *   backwards, left, right, up, down.
         * @return string
         */
        function getArrow( $direction = 'forwards' ) {
@@ -3574,6 +3576,7 @@ class Language {
                if ( isset( $wgGrammarForms[$this->getCode()][$case][$word] ) ) {
                        return $wgGrammarForms[$this->getCode()][$case][$word];
                }
+
                return $word;
        }
        /**
@@ -3583,9 +3586,12 @@ class Language {
         */
        function getGrammarForms() {
                global $wgGrammarForms;
-               if ( isset( $wgGrammarForms[$this->getCode()] ) && is_array( $wgGrammarForms[$this->getCode()] ) ) {
+               if ( isset( $wgGrammarForms[$this->getCode()] )
+                       && is_array( $wgGrammarForms[$this->getCode()] )
+               ) {
                        return $wgGrammarForms[$this->getCode()];
                }
+
                return array();
        }
        /**
@@ -4102,7 +4108,7 @@ class Language {
                        throw new MWException( "Invalid language code \"$code\"" );
                }
 
-               return "$IP/languages/i18n/$code.json" ;
+               return "$IP/languages/i18n/$code.json";
        }
 
        /**
@@ -4301,10 +4307,12 @@ class Language {
         * @todo Document
         * @param int|float $seconds
         * @param array $format Optional
-        *              If $format['avoid'] == 'avoidseconds' - don't mention seconds if $seconds >= 1 hour
-        *              If $format['avoid'] == 'avoidminutes' - don't mention seconds/minutes if $seconds > 48 hours
-        *              If $format['noabbrevs'] is true - use 'seconds' and friends instead of 'seconds-abbrev' and friends
-        *              For backwards compatibility, $format may also be one of the strings 'avoidseconds' or 'avoidminutes'
+        *   If $format['avoid'] === 'avoidseconds': don't mention seconds if $seconds >= 1 hour.
+        *   If $format['avoid'] === 'avoidminutes': don't mention seconds/minutes if $seconds > 48 hours.
+        *   If $format['noabbrevs'] is true: use 'seconds' and friends instead of 'seconds-abbrev'
+        *     and friends.
+        *   For backwards compatibility, $format may also be one of the strings 'avoidseconds'
+        *     or 'avoidminutes'.
         * @return string
         */
        function formatTimePeriod( $seconds, $format = array() ) {
@@ -4398,10 +4406,11 @@ class Language {
 
        /**
         * Format a bitrate for output, using an appropriate
-        * unit (bps, kbps, Mbps, Gbps, Tbps, Pbps, Ebps, Zbps or Ybps) according to the magnitude in question
+        * unit (bps, kbps, Mbps, Gbps, Tbps, Pbps, Ebps, Zbps or Ybps) according to
+        *   the magnitude in question.
         *
         * This use base 1000. For base 1024 use formatSize(), for another base
-        * see formatComputingNumbers()
+        * see formatComputingNumbers().
         *
         * @param int $bps
         * @return string
@@ -4485,7 +4494,9 @@ class Language {
         * @param bool $atend Optional param for specified if this is the last page
         * @return string
         */
-       public function viewPrevNext( Title $title, $offset, $limit, array $query = array(), $atend = false ) {
+       public function viewPrevNext( Title $title, $offset, $limit,
+               array $query = array(), $atend = false
+       ) {
                // @todo FIXME: Why on earth this needs one message for the text and another one for tooltip?
 
                # Make 'previous' link
@@ -4529,9 +4540,13 @@ class Language {
         * @param string $class Value of the "class" attribute of the link
         * @return string HTML fragment
         */
-       private function numLink( Title $title, $offset, $limit, array $query, $link, $tooltipMsg, $class ) {
+       private function numLink( Title $title, $offset, $limit, array $query, $link,
+               $tooltipMsg, $class
+       ) {
                $query = array( 'limit' => $limit, 'offset' => $offset ) + $query;
-               $tooltip = wfMessage( $tooltipMsg )->inLanguage( $this )->title( $title )->numParams( $limit )->text();
+               $tooltip = wfMessage( $tooltipMsg )->inLanguage( $this )->title( $title )
+                       ->numParams( $limit )->text();
+
                return Html::element( 'a', array( 'href' => $title->getLocalURL( $query ),
                        'title' => $tooltip, 'class' => $class ), $link );
        }
index 92cf68c..98938b2 100644 (file)
  * @ingroup Language
  *
  * @author Zhengzhu Feng <zhengzhu@gmail.com>
- * @maintainers fdcn <fdcn64@gmail.com>, shinjiman <shinjiman@gmail.com>, PhiLiP <philip.npc@gmail.com>
+ * @author fdcn <fdcn64@gmail.com>
+ * @author shinjiman <shinjiman@gmail.com>
+ * @author PhiLiP <philip.npc@gmail.com>
  */
 class LanguageConverter {
-
        /**
         * languages supporting variants
         * @since 1.20
@@ -809,6 +810,7 @@ class LanguageConverter {
         */
        public function getExtraHashOptions() {
                $variant = $this->getPreferredVariant();
+
                return '!' . $variant;
        }
 
@@ -835,6 +837,7 @@ class LanguageConverter {
         */
        function loadDefaultTables() {
                $name = get_class( $this );
+
                throw new MWException( "Must implement loadDefaultTables() method in class $name" );
        }
 
@@ -881,7 +884,8 @@ class LanguageConverter {
        /**
         * Hook for post processing after conversion tables are loaded.
         */
-       function postLoadTables() { }
+       function postLoadTables() {
+       }
 
        /**
         * Reload the conversion tables.
@@ -892,6 +896,7 @@ class LanguageConverter {
                if ( $this->mTables ) {
                        unset( $this->mTables );
                }
+
                $this->mTablesLoaded = false;
                $this->loadTables( false );
        }
index 783ce48..dade4ec 100644 (file)
     "readonly_lag": "The database has been automatically locked while the slave database servers catch up to the master",
     "internalerror": "Internal error",
     "internalerror_info": "Internal error: $1",
-    "fileappenderrorread": "Could not read \"$1\" during append.",
-    "fileappenderror": "Could not append \"$1\" to \"$2\".",
     "filecopyerror": "Could not copy file \"$1\" to \"$2\".",
     "filerenameerror": "Could not rename file \"$1\" to \"$2\".",
     "filedeleteerror": "Could not delete file \"$1\".",
     "directorycreateerror": "Could not create directory \"$1\".",
     "filenotfound": "Could not find file \"$1\".",
-    "fileexistserror": "Unable to write to file \"$1\": File exists.",
     "unexpected": "Unexpected value: \"$1\"=\"$2\".",
     "formerror": "Error: Could not submit form.",
     "badarticleerror": "This action cannot be performed on this page.",
     "savearticle": "Save page",
     "preview": "Preview",
     "showpreview": "Show preview",
-    "showlivepreview": "Live preview",
     "showdiff": "Show changes",
     "anoneditwarning": "<strong>Warning:</strong> You are not logged in.\nYour IP address will be recorded in this page's edit history.",
     "anonpreviewwarning": "<em>You are not logged in. Saving will record your IP address in this page's edit history.</em>",
     "group-bot.js": "/* Any JavaScript here will be loaded for bots only */",
     "group-sysop.js": "/* Any JavaScript here will be loaded for sysops only */",
     "group-bureaucrat.js": "/* Any JavaScript here will be loaded for bureaucrats only */",
-    "notacceptable": "The wiki server cannot provide data in a format your client can read.",
     "anonymous": "Anonymous {{PLURAL:$1|user|users}} of {{SITENAME}}",
     "siteuser": "{{SITENAME}} user $1",
     "anonuser": "{{SITENAME}} anonymous user $1",
     "bitrate-zetabits": "$1 Zbps",
     "bitrate-yottabits": "$1 Ybps",
     "livepreview-loading": "Loading...",
-    "livepreview-ready": "Loading... Ready!",
-    "livepreview-failed": "Live preview failed!\nTry normal preview.",
-    "livepreview-error": "Failed to connect: $1 \"$2\".\nTry normal preview.",
     "lag-warn-normal": "Changes newer than $1 {{PLURAL:$1|second|seconds}} may not be shown in this list.",
     "lag-warn-high": "Due to high database server lag, changes newer than $1 {{PLURAL:$1|second|seconds}} may not be shown in this list.",
     "editwatchlist-summary": "",
     "compare-invalid-title": "The title you specified is invalid.",
     "compare-title-not-exists": "The title you specified does not exist.",
     "compare-revision-not-exists": "The revision you specified does not exist.",
-    "dberr-header": "This wiki has a problem",
     "dberr-problems": "Sorry! This site is experiencing technical difficulties.",
     "dberr-again": "Try waiting a few minutes and reloading.",
     "dberr-info": "(Cannot contact the database server: $1)",
index 23c134b..6c4ff20 100644 (file)
@@ -37,15 +37,27 @@ class GenerateJsonI18n extends Maintenance {
                parent::__construct();
                $this->mDescription = "Build JSON messages files from a PHP messages file";
                $this->addArg( 'phpfile', 'PHP file defining a $messages array', true );
-               $this->addArg( 'jsondir', 'Directory to write JSON files to', true );
+               $this->addArg( 'jsondir', 'Directory to write JSON files to. ' .
+                       'Required unless <phpfile> exists and --shim-only is specified', false );
                $this->addOption( 'langcode', 'Language code; only needed for converting core i18n files',
                        false, true );
+               $this->addOption( 'shim-only', 'Only create or update the backward-compatibility shim' );
        }
 
        public function execute() {
                $phpfile = $this->getArg( 0 );
                $jsondir = $this->getArg( 1 );
 
+               if ( $this->hasOption( 'shim-only' ) ) {
+                       $this->shimOnly( $phpfile, $jsondir );
+                       return;
+               }
+
+               if ( $jsondir === null ) {
+                       $this->error( 'Argument [jsondir] is required unless --shim-only is specified.' );
+                       $this->maybeHelp( true );
+               }
+
                if ( !is_readable( $phpfile ) ) {
                        $this->error( "Error reading $phpfile\n", 1 );
                }
@@ -83,7 +95,7 @@ class GenerateJsonI18n extends Maintenance {
                        $jsonfile = "$jsondir/$langcode.json";
                        $success = file_put_contents(
                                $jsonfile,
-                               FormatJson::encode( $langmsgs, true, FormatJson::ALL_OK ) . "\n"
+                               FormatJson::encode( $langmsgs, "\t", FormatJson::ALL_OK ) . "\n"
                        );
                        if ( $success === false ) {
                                $this->error( "FAILED to write $jsonfile", 1 );
@@ -100,6 +112,35 @@ class GenerateJsonI18n extends Maintenance {
                $this->output( "Also add \$wgMessagesDirs['YourExtension'] = __DIR__ . '/i18n';\n" );
        }
 
+       protected function shimOnly( $phpfile, $jsondir ) {
+               if ( file_exists( $phpfile ) ) {
+                       if ( !is_readable( $phpfile ) ) {
+                               $this->error( "Error reading $phpfile\n", 1 );
+                       }
+
+                       $phpfileContents = file_get_contents( $phpfile );
+                       $m = array();
+                       if ( !preg_match( '!"/([^"$]+)/\$csCode.json";!', $phpfileContents, $m ) ) {
+                               $this->error( "Cannot recognize $phpfile as a shim.\n", 1 );
+                       }
+
+                       if ( $jsondir === null ) {
+                               $jsondir = $m[1];
+                       }
+
+                       $this->output( "Updating existing shim $phpfile\n" );
+               } elseif ( $jsondir === null ) {
+                       $this->error( "$phpfile does not exist.\n" .
+                               "Argument [jsondir] is required in order to create a new shim.\n", 1 );
+               } else {
+                       $this->output( "Creating new shim $phpfile\n" );
+               }
+
+               $shim = $this->doShim( $jsondir );
+               file_put_contents( $phpfile, $shim );
+               $this->output( "All done.\n" );
+       }
+
        protected function doShim( $jsondir ) {
                $shim = <<<'PHP'
 <?php
@@ -115,29 +156,34 @@ class GenerateJsonI18n extends Maintenance {
  * This shim maintains compatibility back to MediaWiki 1.17.
  */
 $messages = array();
-$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, &$cachedData ) {
-       $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
-       foreach ( $codeSequence as $csCode ) {
-               $fileName = __DIR__ . "/{{OUT}}/$csCode.json";
-               if ( is_readable( $fileName ) ) {
-                       $data = FormatJson::decode( file_get_contents( $fileName ), true );
-                       foreach ( array_keys( $data ) as $key ) {
-                               if ( $key === '' || $key[0] === '@' ) {
-                                       unset( $data[$key] );
+if ( !function_exists( '{{FUNC}}' ) ) {
+       function {{FUNC}}( $cache, $code, &$cachedData ) {
+               $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
+               foreach ( $codeSequence as $csCode ) {
+                       $fileName = dirname( __FILE__ ) . "/{{OUT}}/$csCode.json";
+                       if ( is_readable( $fileName ) ) {
+                               $data = FormatJson::decode( file_get_contents( $fileName ), true );
+                               foreach ( array_keys( $data ) as $key ) {
+                                       if ( $key === '' || $key[0] === '@' ) {
+                                               unset( $data[$key] );
+                                       }
                                }
+                               $cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
                        }
-                       $cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
-               }
 
-               $cachedData['deps'][] = new FileDependency( $fileName );
+                       $cachedData['deps'][] = new FileDependency( $fileName );
+               }
+               return true;
        }
-       return true;
-};
+
+       $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = '{{FUNC}}';
+}
 
 PHP;
 
                $jsondir = str_replace( '\\', '/', $jsondir );
                $shim = str_replace( '{{OUT}}', $jsondir, $shim );
+               $shim = str_replace( '{{FUNC}}', 'wfJsonI18nShim' . wfRandomString( 16 ), $shim );
                return $shim;
        }