Cleanup some docs (includes/[m-r])
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 24 Jul 2014 17:43:25 +0000 (19:43 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 24 Jul 2014 17:43:25 +0000 (19:43 +0200)
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I8ebfbcea0e2ae2670553822acedde49c1aa7e98d

37 files changed:
includes/media/BitmapMetadataHandler.php
includes/media/DjVuImage.php
includes/media/Exif.php
includes/media/FormatMetadata.php
includes/media/IPTC.php
includes/media/Jpeg.php
includes/media/JpegMetadataExtractor.php
includes/media/MediaHandler.php
includes/media/MediaTransformOutput.php
includes/media/PNG.php
includes/media/PNGMetadataExtractor.php
includes/media/SVG.php
includes/media/XCF.php
includes/media/XMP.php
includes/objectcache/BagOStuff.php
includes/objectcache/WinCacheBagOStuff.php
includes/page/Article.php
includes/page/ImagePage.php
includes/page/WikiPage.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/Preprocessor_Hash.php
includes/poolcounter/PoolCounter.php
includes/profiler/Profiler.php
includes/profiler/ProfilerMwprof.php
includes/profiler/ProfilerStandard.php
includes/rcfeed/RCFeedEngine.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderLanguageNamesModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/revisiondelete/RevisionDeleter.php

index 2a393db..053c586 100644 (file)
@@ -97,7 +97,7 @@ class BitmapMetadataHandler {
        /** Add misc metadata. Warning: atm if the metadata category
         * doesn't have a priority, it will be silently discarded.
         *
-        * @param array $metaArray array of metadata values
+        * @param array $meta Array of metadata values
         * @param string $type Type. defaults to other. if two things have the same type they're merged
         */
        function addMetadata( $metaArray, $type = 'other' ) {
@@ -149,9 +149,9 @@ class BitmapMetadataHandler {
 
        /** Main entry point for jpeg's.
         *
-        * @param string $filename filename (with full path)
+        * @param string $filename Filename (with full path)
         * @return array Metadata result array.
-        * @throws MWException on invalid file.
+        * @throws MWException On invalid file.
         */
        static function Jpeg( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
@@ -224,7 +224,7 @@ class BitmapMetadataHandler {
         * They don't really have native metadata, so just merges together
         * XMP and image comment.
         *
-        * @param string $filename full path to file
+        * @param string $filename Full path to file
         * @return array Metadata array
         */
        public static function GIF( $filename ) {
index 099375b..6ff19c9 100644 (file)
@@ -88,7 +88,7 @@ class DjVuImage {
                // something that explicitly initializes local variables.
                extract( unpack( 'a4magic/a4chunk/NchunkLength', $header ) );
                /** @var string $chunk
-                *  @var string $chunkLength */
+                * @var string $chunkLength */
                echo "$chunk $chunkLength\n";
                $this->dumpForm( $file, $chunkLength, 1 );
                fclose( $file );
@@ -107,7 +107,7 @@ class DjVuImage {
                        // something that explicitly initializes local variables.
                        extract( unpack( 'a4chunk/NchunkLength', $chunkHeader ) );
                        /** @var string $chunk
-                        *  @var string $chunkLength */
+                        * @var string $chunkLength */
                        echo str_repeat( ' ', $indent * 4 ) . "$chunk $chunkLength\n";
 
                        if ( $chunk == 'FORM' ) {
@@ -143,9 +143,9 @@ class DjVuImage {
                        extract( unpack( 'a4magic/a4form/NformLength/a4subtype', $header ) );
 
                        /** @var string $magic
-                        *  @var string $subtype
-                        *  @var string $formLength
-                        *  @var string $formType */
+                        * @var string $subtype
+                        * @var string $formLength
+                        * @var string $formType */
                        if ( $magic != 'AT&T' ) {
                                wfDebug( __METHOD__ . ": not a DjVu file\n" );
                        } elseif ( $subtype == 'DJVU' ) {
@@ -173,7 +173,7 @@ class DjVuImage {
                        extract( unpack( 'a4chunk/Nlength', $header ) );
 
                        /** @var string $chunk
-                        *  @var string $length */
+                        * @var string $length */
                        return array( $chunk, $length );
                }
        }
@@ -249,12 +249,12 @@ class DjVuImage {
                # Newer files have rotation info in byte 10, but we don't use it yet.
 
                /** @var string $width
-                *  @var string $height
-                *  @var string $major
-                *  @var string $minor
-                *  @var string $resolution
-                *  @var string $length
-                *  @var string $gamma */
+                * @var string $height
+                * @var string $major
+                * @var string $minor
+                * @var string $resolution
+                * @var string $length
+                * @var string $gamma */
                return array(
                        'width' => $width,
                        'height' => $height,
index d630136..d285c0c 100644 (file)
@@ -442,7 +442,7 @@ class Exif {
         * Do userComment tags and similar. See pg. 34 of exif standard.
         * basically first 8 bytes is charset, rest is value.
         * This has not been tested on any shift-JIS strings.
-        * @param string $prop prop name.
+        * @param string $prop Prop name
         */
        private function charCodeString( $prop ) {
                if ( isset( $this->mFilteredExifData[$prop] ) ) {
@@ -729,8 +729,8 @@ class Exif {
        /**
         * Validates if a tag has a legal value according to the Exif spec
         *
-        * @param string $section section where tag is located.
-        * @param string $tag the tag to check.
+        * @param string $section Section where tag is located.
+        * @param string $tag The tag to check.
         * @param mixed $val The value of the tag.
         * @param bool $recursive True if called recursively for array types.
         * @return bool
@@ -840,7 +840,7 @@ class Exif {
        /**
         * Convenience function for debugging output
         *
-        * @param string $fname the name of the function calling this function
+        * @param string $fname The name of the function calling this function
         * @param bool $io Specify whether we're beginning or ending
         */
        private function debugFile( $fname, $io ) {
index 4200541..4356953 100644 (file)
@@ -72,7 +72,7 @@ class FormatMetadata extends ContextSource {
         *
         * This is the usual entry point for this class.
         *
-        * @param array $tags the Exif data to format ( as returned by
+        * @param array $tags The Exif data to format ( as returned by
         *   Exif::getFilteredData() or BitmapMetadataHandler )
         * @param bool|IContextSource $context Context to use (optional)
         * @return array
@@ -92,7 +92,7 @@ class FormatMetadata extends ContextSource {
         * value which most of the time are plain integers. This function
         * formats Exif (and other metadata) values into human readable form.
         *
-        * @param array $tags the Exif data to format ( as returned by
+        * @param array $tags The Exif data to format ( as returned by
         *   Exif::getFilteredData() or BitmapMetadataHandler )
         * @return array
         * @since 1.23
@@ -1006,7 +1006,7 @@ class FormatMetadata extends ContextSource {
        /**
         * Flatten an array, using the user language for any messages.
         *
-        * @param array $vals array of values
+        * @param array $vals Array of values
         * @param string $type Type of array (either lang, ul, ol).
         *   lang = language assoc array with keys being the lang code
         *   ul = unordered list, ol = ordered list
@@ -1031,7 +1031,7 @@ class FormatMetadata extends ContextSource {
         *
         * This is public on the basis it might be useful outside of this class.
         *
-        * @param array $vals array of values
+        * @param array $vals Array of values
         * @param string $type Type of array (either lang, ul, ol).
         *     lang = language assoc array with keys being the lang code
         *     ul = unordered list, ol = ordered list
@@ -1706,7 +1706,7 @@ class FormatMetadata extends ContextSource {
         *
         * @param File $file File to use
         * @param array $extendedMetadata
-        * @param int $maxCacheTime hook handlers might use this parameter to override cache time
+        * @param int $maxCacheTime Hook handlers might use this parameter to override cache time
         *
         * @return array [<property name> => ['value' => <value>]], or [] on error
         * @since 1.23
@@ -1741,7 +1741,7 @@ class FormatMetadata extends ContextSource {
         * If the value is not a multilang array, it is returned unchanged.
         * See mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
         * @param mixed $value
-        * @return mixed value in best language, null if there were no languages at all
+        * @return mixed Value in best language, null if there were no languages at all
         * @since 1.23
         */
        protected function resolveMultilangValue( $value ) {
index 503b968..478249f 100644 (file)
@@ -34,7 +34,7 @@ class IPTC {
         *
         * @see http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
         *
-        * @param string $rawData app13 block from jpeg containing iptc/iim data
+        * @param string $rawData The app13 block from jpeg containing iptc/iim data
         * @return array IPTC metadata array
         */
        static function parse( $rawData ) {
@@ -470,7 +470,7 @@ class IPTC {
        /**
         * take the value of 1:90 tag and returns a charset
         * @param string $tag 1:90 tag.
-        * @return string charset name or "?"
+        * @return string Charset name or "?"
         * Warning, this function does not (and is not intended to) detect
         * all iso 2022 escape codes. In practise, the code for utf-8 is the
         * only code that seems to have wide use. It does detect that code.
index 918d4ae..fbdbdfe 100644 (file)
@@ -51,8 +51,8 @@ class JpegHandler extends ExifBitmapHandler {
        }
 
        /** Validate and normalize quality value to be between 1 and 100 (inclusive).
-        * @param int $value quality value, will be converted to integer or 0 if invalid
-        * @return bool true if the value is valid
+        * @param int $value Quality value, will be converted to integer or 0 if invalid
+        * @return bool True if the value is valid
         */
        private static function validateQuality( $value ) {
                return $value === 'low';
index a0f8524..8c5b46b 100644 (file)
@@ -43,9 +43,9 @@ class JpegMetadataExtractor {
         * but gis doesn't support having multiple app1 segments
         * and those can't extract xmp on files containing both exif and xmp data
         *
-        * @param string $filename name of jpeg file
-        * @return array of interesting segments.
-        * @throws MWException if given invalid file.
+        * @param string $filename Name of jpeg file
+        * @return array Array of interesting segments.
+        * @throws MWException If given invalid file.
         */
        static function segmentSplitter( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
@@ -193,7 +193,7 @@ class JpegMetadataExtractor {
         *
         * This should generally be called by BitmapMetadataHandler::doApp13()
         *
-        * @param string $app13 photoshop psir app13 block from jpg.
+        * @param string $app13 Photoshop psir app13 block from jpg.
         * @throws MWException (It gets caught next level up though)
         * @return string If the iptc hash is good or not. One of 'iptc-no-hash',
         *   'iptc-good-hash', 'iptc-bad-hash'.
index 2612685..e8f8360 100644 (file)
@@ -124,7 +124,7 @@ abstract class MediaHandler {
         *  first page.
         *
         * @param File $image The image object, or false if there isn't one
-        * @param string $path the filename
+        * @param string $path The filename
         * @return array Follow the format of PHP getimagesize() internal function.
         *   See http://www.php.net/getimagesize. MediaWiki will only ever use the
         *   first two array keys (the width and height), and the 'bits' associative
@@ -308,7 +308,7 @@ abstract class MediaHandler {
         * @param string $ext Extension of original file
         * @param string $mime MIME type of original file
         * @param array $params Handler specific rendering parameters
-        * @return array thumbnail extension and MIME type
+        * @return array Thumbnail extension and MIME type
         */
        function getThumbType( $ext, $mime, $params = null ) {
                $magic = MimeMagic::singleton();
@@ -689,7 +689,7 @@ abstract class MediaHandler {
         * relevant errors.
         *
         * @param string $fileName The local path to the file.
-        * @return Status object
+        * @return Status
         */
        function verifyUpload( $fileName ) {
                return Status::newGood();
@@ -843,8 +843,8 @@ abstract class MediaHandler {
        /**
         * Returns whether or not this handler supports the chained generation of thumbnails according
         * to buckets
-        * @return boolean
-        * @since  1.24
+        * @return bool
+        * @since 1.24
         */
        public function supportsBucketing() {
                return false;
index d8d56a4..bc9e917 100644 (file)
@@ -32,7 +32,7 @@ abstract class MediaTransformOutput {
         */
        public $responsiveUrls = array();
 
-       /** @var File object */
+       /** @var File */
        protected $file;
 
        /** @var int Image width */
@@ -71,7 +71,7 @@ abstract class MediaTransformOutput {
        }
 
        /**
-        * @return File file
+        * @return File
         */
        public function getFile() {
                return $this->file;
index d879c12..7b3ddb5 100644 (file)
@@ -100,7 +100,7 @@ class PNGHandler extends BitmapHandler {
        /**
         * We do not support making APNG thumbnails, so always false
         * @param File $image
-        * @return bool false
+        * @return bool False
         */
        function canAnimateThumbnail( $image ) {
                return false;
index 30376f1..bccd36c 100644 (file)
@@ -413,7 +413,7 @@ class PNGMetadataExtractor {
         *
         * @param resource $fh The file handle
         * @param int $size Size in bytes.
-        * @throws Exception if too big.
+        * @throws Exception If too big
         * @return string The chunk.
         */
        private static function read( $fh, $size ) {
index e28b38f..e890b29 100644 (file)
@@ -446,7 +446,7 @@ class SvgHandler extends ImageHandler {
        }
 
        /**
-        * @param array $params name=>value pairs of parameters
+        * @param array $params Name=>value pairs of parameters
         * @return string Filename to use
         */
        function makeParamString( $params ) {
index 9e69137..04099c3 100644 (file)
@@ -93,7 +93,7 @@ class XCFHandler extends BitmapHandler {
         * @author Hashar
         *
         * @param string $filename Full path to a XCF file
-        * @return bool|array metadata array just like PHP getimagesize()
+        * @return bool|array Metadata Array just like PHP getimagesize()
         */
        static function getXCFMetaData( $filename ) {
                # Decode master structure
index a74b701..154c85d 100644 (file)
@@ -406,7 +406,7 @@ class XMPReader {
         *
         * @param XMLParser $parser XMLParser reference to the xml parser
         * @param string $data Character data
-        * @throws MWException on invalid data
+        * @throws MWException On invalid data
         */
        function char( $parser, $data ) {
 
@@ -726,7 +726,7 @@ class XMPReader {
         * this should always be <rdf:Bag>
         *
         * @param string $elm Namespace . ' ' . tag
-        * @throws MWException if we have an element that's not <rdf:Bag>
+        * @throws MWException If we have an element that's not <rdf:Bag>
         */
        private function startElementModeBag( $elm ) {
                if ( $elm === self::NS_RDF . ' Bag' ) {
@@ -741,7 +741,7 @@ class XMPReader {
         * this should always be <rdf:Seq>
         *
         * @param string $elm Namespace . ' ' . tag
-        * @throws MWException if we have an element that's not <rdf:Seq>
+        * @throws MWException If we have an element that's not <rdf:Seq>
         */
        private function startElementModeSeq( $elm ) {
                if ( $elm === self::NS_RDF . ' Seq' ) {
@@ -768,7 +768,7 @@ class XMPReader {
         * we don't care about.
         *
         * @param string $elm Namespace . ' ' . tag
-        * @throws MWException if we have an element that's not <rdf:Alt>
+        * @throws MWException If we have an element that's not <rdf:Alt>
         */
        private function startElementModeLang( $elm ) {
                if ( $elm === self::NS_RDF . ' Alt' ) {
@@ -963,7 +963,7 @@ class XMPReader {
         *
         * @param string $elm Namespace . ' ' . tagname
         * @param array $attribs Attributes. (needed for BAGSTRUCTS)
-        * @throws MWException if gets a tag other than <rdf:li>
+        * @throws MWException If gets a tag other than <rdf:li>
         */
        private function startElementModeLi( $elm, $attribs ) {
                if ( ( $elm ) !== self::NS_RDF . ' li' ) {
index de3efd1..6f8f9af 100644 (file)
@@ -251,7 +251,7 @@ abstract class BagOStuff {
         * Batch insertion
         * @param array $data $key => $value assoc array
         * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
-        * @return bool success
+        * @return bool Success
         * @since 1.24
         */
        public function setMulti( array $data, $exptime = 0 ) {
@@ -330,9 +330,9 @@ abstract class BagOStuff {
         * This will create the key with value $init and TTL $ttl if not present
         *
         * @param string $key
-        * @param integer $ttl
-        * @param integer $value
-        * @param integer $init
+        * @param int $ttl
+        * @param int $value
+        * @param int $init
         * @return bool
         * @since 1.24
         */
index a6c7d9c..2a882ac 100644 (file)
@@ -52,7 +52,7 @@ class WinCacheBagOStuff extends BagOStuff {
         * Store a value in the WinCache object cache
         *
         * @param string $key Cache key
-        * @param mixed $valueObject to store
+        * @param mixed $valueObject Value to store
         * @param int $expire Expiration time
         * @return bool
         */
index 40a7d51..b789b7f 100644 (file)
@@ -1268,7 +1268,7 @@ class Article implements Page {
         * If the revision requested for view is deleted, check permissions.
         * Send either an error message or a warning header to the output.
         *
-        * @return bool true if the view is allowed, false if not.
+        * @return bool True if the view is allowed, false if not.
         */
        public function showDeletedRevisionHeader() {
                if ( !$this->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
@@ -1818,7 +1818,7 @@ class Article implements Page {
         * output to the client that is necessary for this request.
         * (that is, it has sent a cached version of the page)
         *
-        * @return bool true if cached version send, false otherwise
+        * @return bool True if cached version send, false otherwise
         */
        protected function tryFileCache() {
                static $called = false;
@@ -1894,7 +1894,7 @@ class Article implements Page {
         * Override the ParserOptions used to render the primary article wikitext.
         *
         * @param ParserOptions $options
-        * @throws MWException if the parser options where already initialized.
+        * @throws MWException If the parser options where already initialized.
         */
        public function setParserOptions( ParserOptions $options ) {
                if ( $this->mParserOptions ) {
index 9aff6ef..e50592c 100644 (file)
@@ -1061,12 +1061,12 @@ EOT
         *  of the dimensions are bigger than the max, or if the
         *  image is vectorized.
         *
-        * @param $maxWidth integer Max width to display at
-        * @param $maxHeight integer Max height to display at
-        * @param $width integer Actual width of the image
-        * @param $height integer Actual height of the image
+        * @param int $maxWidth Max width to display at
+        * @param int $maxHeight Max height to display at
+        * @param int $width Actual width of the image
+        * @param int $height Actual height of the image
         * @throws MWException
-        * @return Array (width, height)
+        * @return array Array (width, height)
         */
        protected function getDisplayWidthHeight( $maxWidth, $maxHeight, $width, $height ) {
                if ( !$maxWidth || !$maxHeight ) {
@@ -1100,9 +1100,9 @@ EOT
         * Get alternative thumbnail sizes.
         *
         * @note This will only list several alternatives if thumbnails are rendered on 404
-        * @param $origWidth Actual width of image
-        * @param $origHeight Actual height of image
-        * @return Array An array of [width, height] pairs.
+        * @param int $origWidth Actual width of image
+        * @param int $origHeight Actual height of image
+        * @return array An array of [width, height] pairs.
         */
        protected function getThumbSizes( $origWidth, $origHeight ) {
                global $wgImageLimits;
index 8d0f0af..be5ce3f 100644 (file)
@@ -530,7 +530,7 @@ class WikiPage implements Page, IDBAccessObject {
 
        /**
         * Loads page_touched and returns a value indicating if it should be used
-        * @return bool true if not a redirect
+        * @return bool True if not a redirect
         */
        public function checkTouched() {
                if ( !$this->mDataLoaded ) {
@@ -563,7 +563,7 @@ class WikiPage implements Page, IDBAccessObject {
 
        /**
         * Get the page_latest field
-        * @return int rev_id of current revision
+        * @return int The rev_id of current revision
         */
        public function getLatest() {
                if ( !$this->mDataLoaded ) {
@@ -663,7 +663,7 @@ class WikiPage implements Page, IDBAccessObject {
        /**
         * Get the content of the current revision. No side-effects...
         *
-        * @param int $audience int One of:
+        * @param int $audience One of:
         *   Revision::FOR_PUBLIC       to be displayed to all users
         *   Revision::FOR_THIS_USER    to be displayed to $wgUser
         *   Revision::RAW              get the text regardless of permissions
@@ -743,7 +743,7 @@ class WikiPage implements Page, IDBAccessObject {
         *   Revision::RAW              get the text regardless of permissions
         * @param User $user User object to check for, only if FOR_THIS_USER is passed
         *   to the $audience parameter
-        * @return int user ID for the user that made the last article revision
+        * @return int User ID for the user that made the last article revision
         */
        public function getUser( $audience = Revision::FOR_PUBLIC, User $user = null ) {
                $this->loadLastEdit();
@@ -781,7 +781,7 @@ class WikiPage implements Page, IDBAccessObject {
         *   Revision::RAW              get the text regardless of permissions
         * @param User $user User object to check for, only if FOR_THIS_USER is passed
         *   to the $audience parameter
-        * @return string username of the user that made the last article revision
+        * @return string Username of the user that made the last article revision
         */
        public function getUserText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
                $this->loadLastEdit();
@@ -968,7 +968,7 @@ class WikiPage implements Page, IDBAccessObject {
        /**
         * Get the Title object or URL this page redirects to
         *
-        * @return bool|Title|string false, Title of in-wiki target, or string with URL
+        * @return bool|Title|string False, Title of in-wiki target, or string with URL
         */
        public function followRedirect() {
                return $this->getRedirectURL( $this->getRedirectTarget() );
@@ -979,7 +979,7 @@ class WikiPage implements Page, IDBAccessObject {
         * objects for same-wiki, non-special redirects and URLs for everything
         * else.
         * @param Title $rt Redirect target
-        * @return bool|Title|string false, Title object of local target, or string with URL
+        * @return bool|Title|string False, Title object of local target, or string with URL
         */
        public function getRedirectURL( $rt ) {
                if ( !$rt ) {
@@ -1295,7 +1295,7 @@ class WikiPage implements Page, IDBAccessObject {
         *   Giving 0 indicates the new page flag should be set on.
         * @param bool $lastRevIsRedirect If given, will optimize adding and
         *   removing rows in redirect table.
-        * @return bool true on success, false on failure
+        * @return bool True on success, false on failure
         */
        public function updateRevisionOn( $dbw, $revision, $lastRevision = null,
                $lastRevIsRedirect = null
@@ -1357,7 +1357,7 @@ class WikiPage implements Page, IDBAccessObject {
         *   or NULL if this is not a redirect
         * @param null|bool $lastRevIsRedirect If given, will optimize adding and
         *   removing rows in redirect table.
-        * @return bool true on success, false on failure
+        * @return bool True on success, false on failure
         * @private
         */
        public function updateRedirectOn( $dbw, $redirectTitle, $lastRevIsRedirect = null ) {
@@ -1433,7 +1433,7 @@ class WikiPage implements Page, IDBAccessObject {
         * must exist and must not be deleted
         * @param Revision $undo
         * @param Revision $undoafter Must be an earlier revision than $undo
-        * @return mixed string on success, false on failure
+        * @return mixed String on success, false on failure
         * @since 1.21
         * Before we had the Content object, this was done in getUndoText
         */
@@ -1448,7 +1448,7 @@ class WikiPage implements Page, IDBAccessObject {
         * must exist and must not be deleted
         * @param Revision $undo
         * @param Revision $undoafter Must be an earlier revision than $undo
-        * @return string|bool string on success, false on failure
+        * @return string|bool String on success, false on failure
         * @deprecated since 1.21: use ContentHandler::getUndoContent() instead.
         */
        public function getUndoText( Revision $undo, Revision $undoafter = null ) {
@@ -1563,7 +1563,7 @@ class WikiPage implements Page, IDBAccessObject {
         * or 'new' for a new section.
         * @param Content $sectionContent New content of the section.
         * @param string $sectionTitle New section's subject, only if $section is "new".
-        * @param string $baseRevId integer|null
+        * @param int|null $baseRevId
         *
         * @throws MWException
         * @return Content New complete article content, or null if error.
@@ -1666,7 +1666,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param User $user The user doing the edit
         *
         * @throws MWException
-        * @return Status object. Possible errors:
+        * @return Status Possible errors:
         *   edit-hook-aborted: The ArticleSave hook aborted the edit but didn't
         *     set the fatal flag of $status
         *   edit-gone-missing: In update mode, but the article didn't exist.
@@ -1728,7 +1728,7 @@ class WikiPage implements Page, IDBAccessObject {
         *   database.
         *
         * @throws MWException
-        * @return Status object. Possible errors:
+        * @return Status Possible errors:
         *     edit-hook-aborted: The ArticleSave hook aborted the edit but didn't
         *       set the fatal flag of $status.
         *     edit-gone-missing: In update mode, but the article didn't exist.
@@ -2313,7 +2313,7 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @param Content $content Content submitted
         * @param User $user The relevant user
-        * @param string $comment comment submitted
+        * @param string $comment Comment submitted
         * @param string $serialisation_format Format for storing the content in the database
         * @param bool $minor Whereas it's a minor modification
         */
@@ -2739,7 +2739,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param bool $commit Defaults to true, triggers transaction end
         * @param array &$error Array of errors to append to
         * @param User $user The deleting user
-        * @return bool true if successful
+        * @return bool True if successful
         */
        public function doDeleteArticle(
                $reason, $suppress = false, $id = 0, $commit = true, &$error = '', User $user = null
@@ -2904,7 +2904,7 @@ class WikiPage implements Page, IDBAccessObject {
        /**
         * Do some database updates after deletion
         *
-        * @param int $id page_id value of the page being deleted
+        * @param int $id The page_id value of the page being deleted
         * @param Content $content Optional page content to be used when determining
         *   the required updates. This may be needed because $this->getContent()
         *   may already return null when the page proper was deleted.
@@ -2949,7 +2949,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param string $token Rollback token.
         * @param bool $bot If true, mark all reverted edits as bot.
         *
-        * @param array $resultDetails contains result-specific array of additional values
+        * @param array $resultDetails Array contains result-specific array of additional values
         *    'alreadyrolled' : 'current' (rev)
         *    success        : 'summary' (str), 'current' (rev), 'target' (rev)
         *
@@ -3525,7 +3525,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param int &$cascade Set to false if cascading protection isn't allowed.
         * @param array $expiry Per restriction type expiration
         * @param User $user The user updating the restrictions
-        * @return bool true on success
+        * @return bool True on success
         */
        public function updateRestrictions(
                $limit = array(), $reason = '', &$cascade = 0, $expiry = array(), User $user = null
index cfd5370..0bf2ffc 100644 (file)
@@ -122,7 +122,7 @@ class DateFormatter {
         *
         * @param Language|string|null $lang In which language to format the date
         *              Defaults to the site content language
-        * @return DateFormatter object
+        * @return DateFormatter
         */
        public static function &getInstance( $lang = null ) {
                global $wgMemc, $wgContLang;
index 648667b..30bb2cf 100644 (file)
@@ -265,7 +265,7 @@ class LinkHolderArray {
        /**
         * Replace <!--LINK--> link placeholders with actual links, in the buffer
         *
-        * @param $text
+        * @param string $text
         * @return array Array of link CSS classes, indexed by PDBK.
         */
        function replace( &$text ) {
index b37e977..bc4fcce 100644 (file)
@@ -211,7 +211,7 @@ class Parser {
        var $mLangLinkLanguages;
 
        /**
-        * @var boolean Recursive call protection.
+        * @var bool Recursive call protection.
         * This variable should be treated as if it were private.
         */
        public $mInParse = false;
@@ -349,7 +349,7 @@ class Parser {
         * Convert wikitext to HTML
         * Do not call this function recursively.
         *
-        * @param string $text text we want to parse
+        * @param string $text Text we want to parse
         * @param Title $title
         * @param ParserOptions $options
         * @param bool $linestart
@@ -798,7 +798,7 @@ class Parser {
        /**
         * Get the ParserOptions object
         *
-        * @return ParserOptions object
+        * @return ParserOptions
         */
        function getOptions() {
                return $this->mOptions;
@@ -1434,7 +1434,7 @@ class Parser {
         *
         * @param string $text
         *
-        * @return string the altered text
+        * @return string The altered text
         */
        function doAllQuotes( $text ) {
                wfProfileIn( __METHOD__ );
index 33f0f96..6102ca4 100644 (file)
@@ -26,7 +26,7 @@
  * @todo document
  */
 class ParserCache {
-       /** @var MWMemcached  */
+       /** @var MWMemcached */
        private $mMemc;
        /**
         * Get an instance of this object
index 2cd208c..411702f 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 /**
- * \brief Set options of the Parser
+ * @brief Set options of the Parser
  *
  * All member variables are supposed to be private in theory, although in
  * practise this is not the case.
index 1903fc4..f6ad931 100644 (file)
@@ -396,7 +396,7 @@ class ParserOutput extends CacheTime {
 
        /**
         * @param Title $title Title object, must be an interwiki link
-        * @throws MWException if given invalid input
+        * @throws MWException If given invalid input
         */
        function addInterwikiLink( $title ) {
                if ( !$title->isExternal() ) {
@@ -478,7 +478,7 @@ class ParserOutput extends CacheTime {
         * -- this is assumed to have been validated
         * (check equal normalisation, etc.)
         *
-        * @param string $text desired title text
+        * @param string $text Desired title text
         */
        public function setDisplayTitle( $text ) {
                $this->setTitleText( $text );
@@ -576,7 +576,7 @@ class ParserOutput extends CacheTime {
        /**
         * @param string $name The property name to look up.
         *
-        * @return mixed|false The value previously set using setProperty(). False if null or no value
+        * @return mixed|bool The value previously set using setProperty(). False if null or no value
         * was set for the given property name.
         *
         * @note You need to use getProperties() to check for boolean and null properties.
index bf2bf61..26daca1 100644 (file)
@@ -995,7 +995,7 @@ class PPFrame_Hash implements PPFrame {
 
        /**
         * @throws MWException
-        * @param string|PPNode$root
+        * @param string|PPNode $root
         * @param int $flags
         * @return string
         */
index f8d48cc..e77ffd7 100644 (file)
@@ -132,7 +132,7 @@ abstract class PoolCounter {
         * Lets another one grab the lock, and returns the workers
         * waiting on acquireForAnyone()
         *
-        * @return Status value is one of Released/NotLocked/Error
+        * @return Status Value is one of Released/NotLocked/Error
         */
        abstract public function release();
 
@@ -143,7 +143,7 @@ abstract class PoolCounter {
         * the same key can acquire a lock.
         *
         * @param string $key PoolCounter instance key (any string)
-        * @param int $slots the number of slots (max allowed value is 65536)
+        * @param int $slots The number of slots (max allowed value is 65536)
         * @return int
         */
        protected function hashKeyIntoSlots( $key, $slots ) {
index cd1e859..7b8f340 100644 (file)
@@ -25,7 +25,7 @@
 
 /**
  * Begin profiling of a function
- * @param string $functionname name of the function we will profile
+ * @param string $functionname Name of the function we will profile
  */
 function wfProfileIn( $functionname ) {
        if ( Profiler::$__instance === null ) { // use this directly to reduce overhead
@@ -38,7 +38,7 @@ function wfProfileIn( $functionname ) {
 
 /**
  * Stop profiling of a function
- * @param string $functionname name of the function we have profiled
+ * @param string $functionname Name of the function we have profiled
  */
 function wfProfileOut( $functionname = 'missing' ) {
        if ( Profiler::$__instance === null ) { // use this directly to reduce overhead
@@ -196,7 +196,7 @@ abstract class Profiler {
        /**
         * Called by wfProfieOut()
         *
-        * @param  string $functionname
+        * @param string $functionname
         */
        abstract public function profileOut( $functionname );
 
@@ -326,7 +326,7 @@ abstract class Profiler {
        /**
         * Add an entry in the debug log file
         *
-        * @param string $s to output
+        * @param string $s String to output
         */
        protected function debug( $s ) {
                if ( function_exists( 'wfDebug' ) ) {
@@ -338,7 +338,7 @@ abstract class Profiler {
         * Add an entry in the debug log group
         *
         * @param string $group Group to send the message to
-        * @param string $s to output
+        * @param string $s String to output
         */
        protected function debugGroup( $group, $s ) {
                if ( function_exists( 'wfDebugLog' ) ) {
@@ -356,7 +356,7 @@ abstract class Profiler {
  * @since 1.24
  */
 class TransactionProfiler {
-       /** @var float seconds */
+       /** @var float Seconds */
        protected $mDBLockThreshold = 3.0;
        /** @var array DB/server name => (active trx count, time, DBs involved) */
        protected $mDBTrxHoldingLocks = array();
index abcd23c..af3c774 100644 (file)
@@ -94,8 +94,8 @@ class ProfilerMwprof extends Profiler {
         * Update an entry with timing data.
         *
         * @param string $name Section name
-        * @param float $elapsedCpu elapsed CPU time
-        * @param float $elapsedWall elapsed wall-clock time
+        * @param float $elapsedCpu Elapsed CPU time
+        * @param float $elapsedWall Elapsed wall-clock time
         */
        public function updateRunningEntry( $name, $elapsedCpu, $elapsedWall ) {
                // If this is the first measurement for this entry, store plain values.
index 5de9982..7fd86eb 100644 (file)
@@ -299,7 +299,7 @@ class ProfilerStandard extends Profiler {
        /**
         * Recursive function the format the current profiling array into a tree
         *
-        * @param array $stack profiling array
+        * @param array $stack Profiling array
         * @return array
         */
        protected function remapCallTree( array $stack ) {
index 066ecbe..768dd7f 100644 (file)
@@ -31,7 +31,7 @@ interface RCFeedEngine {
         * @see RecentChange::cleanupForIRC
         * @param array $feed The feed, as configured in an associative array
         * @param string $line The text to send
-        * @return bool success
+        * @return bool Success
         */
        public function send( array $feed, $line );
 }
index 36e3a1b..a89b45f 100644 (file)
@@ -50,7 +50,7 @@ class ResourceLoader {
         */
        protected $testModuleNames = array();
 
-       /** @var array e.g. array( 'source-id' => array( 'loadScript' => 'http://.../load.php' ) ) */
+       /** @var array E.g. array( 'source-id' => array( 'loadScript' => 'http://.../load.php' ) ) */
        protected $sources = array();
 
        /** @var bool */
@@ -463,7 +463,7 @@ class ResourceLoader {
         *
         * @since 1.24
         * @param string $source
-        * @throws MWException on an invalid $source name
+        * @throws MWException On an invalid $source name
         * @return string
         */
        public function getLoadScript( $source ) {
@@ -1250,7 +1250,7 @@ class ResourceLoader {
         * Build a load.php URL
         *
         * @since 1.24
-        * @param string $source name of the ResourceLoader source
+        * @param string $source Name of the ResourceLoader source
         * @param ResourceLoaderContext $context
         * @param array $extraQuery
         * @return string URL to load.php. May be protocol-relative (if $wgLoadScript is procol-relative)
index 3a6d5d2..43bd562 100644 (file)
@@ -331,7 +331,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        /**
         * Get loader script.
         *
-        * @return string|false JavaScript code to be added to startup module
+        * @return string|bool JavaScript code to be added to startup module
         */
        public function getLoaderScript() {
                if ( count( $this->loaderScripts ) === 0 ) {
@@ -804,7 +804,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param bool $flip
         *
         * @return string CSS data in script file
-        * @throws MWException if the file doesn't exist
+        * @throws MWException If the file doesn't exist
         */
        protected function readStyleFile( $path, $flip ) {
                $localPath = $this->getLocalPath( $path );
index 73b6ea7..fe0c845 100644 (file)
@@ -34,7 +34,7 @@ class ResourceLoaderLanguageNamesModule extends ResourceLoaderModule {
 
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return array
         */
        protected function getData( ResourceLoaderContext $context ) {
@@ -45,7 +45,7 @@ class ResourceLoaderLanguageNamesModule extends ResourceLoaderModule {
        }
 
        /**
-        * @param $context ResourceLoaderContext
+        * @param ResourceLoaderContext $context
         * @return string JavaScript code
         */
        public function getScript( ResourceLoaderContext $context ) {
index 00d245c..0ace76a 100644 (file)
@@ -188,7 +188,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 ) {
                $resourceLoader = $context->getResourceLoader();
@@ -548,7 +548,7 @@ abstract class ResourceLoaderModule {
                return false;
        }
 
-       /** @var JSParser lazy-initialized; use self::javaScriptParser() */
+       /** @var JSParser Lazy-initialized; use self::javaScriptParser() */
        private static $jsParser;
        private static $parseCacheVersion = 1;
 
index 87782ec..2c0f8df 100644 (file)
@@ -168,7 +168,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
         * This way we can reasonably reduce the amout of module registration
         * data send to the client.
         *
-        * @param Array &$registryData Modules keyed by name with properties:
+        * @param array &$registryData Modules keyed by name with properties:
         *  - string 'version'
         *  - array 'dependencies'
         *  - string|null 'group'
index e42301b..dc52969 100644 (file)
@@ -91,7 +91,7 @@ class RevisionDeleter {
         * Checks for a change in the bitfield for a certain option and updates the
         * provided array accordingly.
         *
-        * @param string $desc description to add to the array if the option was
+        * @param string $desc Description to add to the array if the option was
         * enabled / disabled.
         * @param int $field The bitmask describing the single option.
         * @param int $diff The xor of the old and new bitfields.