Merge "List new comment tables in ParserTestRunner"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 12 Jan 2018 15:43:14 +0000 (15:43 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 12 Jan 2018 15:43:14 +0000 (15:43 +0000)
62 files changed:
includes/EditPage.php
includes/FeedUtils.php
includes/GlobalFunctions.php
includes/Linker.php
includes/OutputPage.php
includes/Preferences.php
includes/Storage/RevisionStore.php
includes/WebRequest.php
includes/Xml.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/api/ApiBase.php
includes/api/ApiPageSet.php
includes/auth/LegacyHookPreAuthenticationProvider.php
includes/cache/CacheDependency.php
includes/cache/GenderCache.php
includes/cache/MessageCache.php
includes/changes/ChangesListBooleanFilterGroup.php
includes/changes/ChangesListFilter.php
includes/changes/ChangesListFilterGroup.php
includes/changes/ChangesListStringOptionsFilterGroup.php
includes/changetags/ChangeTags.php
includes/content/AbstractContent.php
includes/content/JsonContent.php
includes/content/TextContent.php
includes/exception/LocalizedException.php
includes/gallery/ImageGalleryBase.php
includes/installer/PostgresInstaller.php
includes/libs/IEUrlExtension.php
includes/libs/StatusValue.php
includes/libs/mime/XmlTypeCheck.php
includes/libs/objectcache/MemcachedClient.php
includes/libs/rdbms/TransactionProfiler.php
includes/logging/LogEventsList.php
includes/logging/LogPage.php
includes/media/BitmapMetadataHandler.php
includes/media/IPTC.php
includes/media/MediaHandler.php
includes/media/WebP.php
includes/media/XCF.php
includes/parser/Parser.php
includes/parser/StripState.php
includes/resourceloader/ResourceLoaderModule.php
includes/revisiondelete/RevDelItem.php
includes/search/SearchExactMatchRescorer.php
includes/session/SessionBackend.php
includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialUploadStash.php
includes/specials/pagers/UsersPager.php
includes/user/User.php
maintenance/generateSitemap.php
maintenance/importImages.php
maintenance/sql.php
tests/phpunit/includes/Storage/RevisionStoreDbTest.php
tests/phpunit/includes/Storage/RevisionStoreTest.php
tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php
tests/phpunit/includes/collation/CollationTest.php
tests/phpunit/includes/session/TestBagOStuff.php
tests/phpunit/includes/session/TestUtils.php
tests/phpunit/mocks/content/DummyContentForTesting.php
tests/phpunit/mocks/content/DummyNonTextContent.php

index f9d1129..a41e6d9 100644 (file)
@@ -780,7 +780,7 @@ class EditPage {
 
        /**
         * Display a read-only View Source page
-        * @param Content $content content object
+        * @param Content $content
         * @param string $errorMessage additional wikitext error message to display
         */
        protected function displayViewSourcePage( Content $content, $errorMessage = '' ) {
index 6c343ab..6108ca1 100644 (file)
@@ -97,7 +97,7 @@ class FeedUtils {
        /**
         * Really format a diff for the newsfeed
         *
-        * @param Title $title Title object
+        * @param Title $title
         * @param int $oldid Old revision's id
         * @param int $newid New revision's id
         * @param int $timestamp New revision's timestamp
index 621dd65..b0057eb 100644 (file)
@@ -1010,7 +1010,7 @@ function wfMakeUrlIndexes( $url ) {
 
 /**
  * Check whether a given URL has a domain that occurs in a given set of domains
- * @param string $url URL
+ * @param string $url
  * @param array $domains Array of domains (strings)
  * @return bool True if the host part of $url ends in one of the strings in $domains
  */
index 3b0e72d..9f6d34e 100644 (file)
@@ -1023,7 +1023,7 @@ class Linker {
 
        /**
         * @since 1.16.3
-        * @param int $userId Userid
+        * @param int $userId
         * @param string $userText User name in database.
         * @return string HTML fragment with block link
         */
@@ -1037,7 +1037,7 @@ class Linker {
        }
 
        /**
-        * @param int $userId Userid
+        * @param int $userId
         * @param string $userText User name in database.
         * @return string HTML fragment with e-mail user link
         */
index a2d445f..e8b000e 100644 (file)
@@ -323,7 +323,7 @@ class OutputPage extends ContextSource {
        /**
         * Redirect to $url rather than displaying the normal page
         *
-        * @param string $url URL
+        * @param string $url
         * @param string $responsecode HTTP status code
         */
        public function redirect( $url, $responsecode = '302' ) {
index 37de2a5..f08b155 100644 (file)
@@ -204,7 +204,7 @@ class Preferences {
        }
 
        /**
-        * @param User $user The User object
+        * @param User $user
         * @param IContextSource $context
         * @return array Text/links to display as key; $skinkey as value
         */
index 6c8cac9..b0c193b 100644 (file)
@@ -689,7 +689,7 @@ class RevisionStore implements IDBAccessObject, RevisionFactory, RevisionLookup
 
                $content = null;
                $blobData = null;
-               $blobFlags = '';
+               $blobFlags = null;
 
                if ( is_object( $row ) ) {
                        // archive row
@@ -706,7 +706,11 @@ class RevisionStore implements IDBAccessObject, RevisionFactory, RevisionLookup
                        if ( isset( $row->old_text ) ) {
                                // this happens when the text-table gets joined directly, in the pre-1.30 schema
                                $blobData = isset( $row->old_text ) ? strval( $row->old_text ) : null;
-                               $blobFlags = isset( $row->old_flags ) ? strval( $row->old_flags ) : '';
+                               // Check against selects that might have not included old_flags
+                               if ( !property_exists( $row, 'old_flags' ) ) {
+                                       throw new InvalidArgumentException( 'old_flags was not set in $row' );
+                               }
+                               $blobFlags = ( $row->old_flags === null ) ? '' : $row->old_flags;
                        }
 
                        $mainSlotRow->slot_revision = intval( $row->rev_id );
@@ -735,7 +739,9 @@ class RevisionStore implements IDBAccessObject, RevisionFactory, RevisionLookup
                        $mainSlotRow->format_name = isset( $row['content_format'] )
                                ? strval( $row['content_format'] ) : null;
                        $blobData = isset( $row['text'] ) ? rtrim( strval( $row['text'] ) ) : null;
-                       $blobFlags = isset( $row['flags'] ) ? trim( strval( $row['flags'] ) ) : '';
+                       // XXX: If the flags field is not set then $blobFlags should be null so that no
+                       // decoding will happen. An empty string will result in default decodings.
+                       $blobFlags = isset( $row['flags'] ) ? trim( strval( $row['flags'] ) ) : null;
 
                        // if we have a Content object, override mText and mContentModel
                        if ( !empty( $row['content'] ) ) {
@@ -797,7 +803,8 @@ class RevisionStore implements IDBAccessObject, RevisionFactory, RevisionLookup
         *
         * @param SlotRecord $slot The SlotRecord to load content for
         * @param string|null $blobData The content blob, in the form indicated by $blobFlags
-        * @param string $blobFlags Flags indicating how $blobData needs to be processed
+        * @param string|null $blobFlags Flags indicating how $blobData needs to be processed.
+        *  null if no processing should happen.
         * @param string|null $blobFormat MIME type indicating how $dataBlob is encoded
         * @param int $queryFlags
         *
@@ -807,23 +814,27 @@ class RevisionStore implements IDBAccessObject, RevisionFactory, RevisionLookup
        private function loadSlotContent(
                SlotRecord $slot,
                $blobData = null,
-               $blobFlags = '',
+               $blobFlags = null,
                $blobFormat = null,
                $queryFlags = 0
        ) {
                if ( $blobData !== null ) {
                        Assert::parameterType( 'string', $blobData, '$blobData' );
-                       Assert::parameterType( 'string', $blobFlags, '$blobFlags' );
+                       Assert::parameterType( 'string|null', $blobFlags, '$blobFlags' );
 
                        $cacheKey = $slot->hasAddress() ? $slot->getAddress() : null;
 
-                       $data = $this->blobStore->expandBlob( $blobData, $blobFlags, $cacheKey );
-
-                       if ( $data === false ) {
-                               throw new RevisionAccessException(
-                                       "Failed to expand blob data using flags $blobFlags (key: $cacheKey)"
-                               );
+                       if ( $blobFlags === null ) {
+                               $data = $blobData;
+                       } else {
+                               $data = $this->blobStore->expandBlob( $blobData, $blobFlags, $cacheKey );
+                               if ( $data === false ) {
+                                       throw new RevisionAccessException(
+                                               "Failed to expand blob data using flags $blobFlags (key: $cacheKey)"
+                                       );
+                               }
                        }
+
                } else {
                        $address = $slot->getAddress();
                        try {
index 3d5e372..cd62737 100644 (file)
@@ -407,7 +407,7 @@ class WebRequest {
         *
         * @since 1.28
         * @param string $name
-        * @param string|null $default Optional default
+        * @param string|null $default
         * @return string|null
         */
        public function getRawVal( $name, $default = null ) {
index b20f66e..7dcd4a4 100644 (file)
@@ -160,8 +160,9 @@ class Xml {
        }
 
        /**
-        * @param int $year
-        * @param int $month
+        * @param int|string $year Use '' or 0 to start with no year preselected.
+        * @param int|string $month A month in the 1..12 range. Use '', 0 or -1 to start with no month
+        *  preselected.
         * @return string Formatted HTML
         */
        public static function dateMenu( $year, $month ) {
index 85e8db6..f7ac21b 100644 (file)
@@ -611,7 +611,7 @@ class HistoryPager extends ReverseChronologicalPager {
         * Creates a submit button
         *
         * @param string $message Text of the submit button, will be escaped
-        * @param array $attributes Attributes
+        * @param array $attributes
         * @return string HTML output for the submit button
         */
        function submitButton( $message, $attributes = [] ) {
index a8a8317..3d33406 100644 (file)
@@ -186,7 +186,7 @@ class InfoAction extends FormlessAction {
         * Adds a table to the content that will be added to the output.
         *
         * @param string $content The content that will be added to the output
-        * @param string $table The table
+        * @param string $table
         * @return string The content with the table added
         */
        protected function addTable( $content, $table ) {
index 4d7ef28..1a126db 100644 (file)
@@ -1030,7 +1030,7 @@ abstract class ApiBase extends ContextSource {
         * @param string $paramName Parameter name
         * @param array|mixed $paramSettings Default value or an array of settings
         *  using PARAM_* constants.
-        * @param bool $parseLimit Parse limit?
+        * @param bool $parseLimit Whether to parse and validate 'limit' parameters
         * @return mixed Parameter value
         */
        protected function getParameterFromSettings( $paramName, $paramSettings, $parseLimit ) {
index cfac761..774ea1a 100644 (file)
@@ -753,7 +753,7 @@ class ApiPageSet extends ApiBase {
         * $this->getPageTableFields().
         *
         * @param IDatabase $db
-        * @param ResultWrapper $queryResult Query result object
+        * @param ResultWrapper $queryResult
         */
        public function populateFromQueryResult( $db, $queryResult ) {
                $this->initFromQueryResult( $queryResult );
index cab6e32..97bbde7 100644 (file)
@@ -115,9 +115,9 @@ class LegacyHookPreAuthenticationProvider extends AbstractPreAuthenticationProvi
         * Construct an appropriate failure response
         * @param User $user
         * @param User|null $creator
-        * @param int $constant LoginForm constant
-        * @param string|null $msg Message
-        * @param string $hook Hook
+        * @param int $constant One of the LoginForm::… constants
+        * @param string|null $msg Optional message key, will be derived from $constant otherwise
+        * @param string $hook Name of the hook for error logging and exception messages
         * @return StatusValue
         */
        protected function makeFailResponse( $user, $creator, $constant, $msg, $hook ) {
index dd4c49e..32dc8c0 100644 (file)
@@ -98,7 +98,7 @@ class DependencyWrapper {
         * it will be generated with the callback function (if present), and the newly
         * calculated value will be stored to the cache in a wrapper.
         *
-        * @param BagOStuff $cache A cache object
+        * @param BagOStuff $cache
         * @param string $key The cache key
         * @param int $expiry The expiry timestamp or interval in seconds
         * @param bool|callable $callback The callback for generating the value, or false
index a34d235..099a986 100644 (file)
@@ -56,7 +56,7 @@ class GenderCache {
 
        /**
         * Returns the gender for given username.
-        * @param string|User $username Username
+        * @param string|User $username
         * @param string $caller The calling method
         * @return string
         */
index d6e9b74..4872186 100644 (file)
@@ -156,22 +156,22 @@ class MessageCache {
        }
 
        /**
-        * @param WANObjectCache $wanCache WAN cache instance
-        * @param BagOStuff $clusterCache Cluster cache instance
-        * @param BagOStuff $srvCache Server cache instance
+        * @param WANObjectCache $wanCache
+        * @param BagOStuff $clusterCache
+        * @param BagOStuff $serverCache
         * @param bool $useDB Whether to look for message overrides (e.g. MediaWiki: pages)
         * @param int $expiry Lifetime for cache. @see $mExpiry.
         */
        public function __construct(
                WANObjectCache $wanCache,
                BagOStuff $clusterCache,
-               BagOStuff $srvCache,
+               BagOStuff $serverCache,
                $useDB,
                $expiry
        ) {
                $this->wanCache = $wanCache;
                $this->clusterCache = $clusterCache;
-               $this->srvCache = $srvCache;
+               $this->srvCache = $serverCache;
 
                $this->mDisable = !$useDB;
                $this->mExpiry = $expiry;
index 7bab97b..4401378 100644 (file)
@@ -54,7 +54,7 @@ class ChangesListBooleanFilterGroup extends ChangesListFilterGroup {
        /**
         * Registers a filter in this group
         *
-        * @param ChangesListBooleanFilter $filter ChangesListBooleanFilter
+        * @param ChangesListBooleanFilter $filter
         */
        public function registerFilter( ChangesListBooleanFilter $filter ) {
                $this->filters[$filter->getName()] = $filter;
index 1c86d44..d1ecd84 100644 (file)
@@ -184,8 +184,7 @@ abstract class ChangesListFilter {
         * (not filtered out), even for the hide-based filters.  So e.g. conflicting with
         * 'hideanons' means there is a conflict if only anonymous users are *shown*.
         *
-        * @param ChangesListFilterGroup|ChangesListFilter $other Other
-        *  ChangesListFilterGroup or ChangesListFilter
+        * @param ChangesListFilterGroup|ChangesListFilter $other
         * @param string $globalKey i18n key for top-level conflict message
         * @param string $forwardKey i18n key for conflict message in this
         *  direction (when in UI context of $this object)
@@ -216,8 +215,7 @@ abstract class ChangesListFilter {
         *
         * Internal use ONLY.
         *
-        * @param ChangesListFilterGroup|ChangesListFilter $other Other
-        *  ChangesListFilterGroup or ChangesListFilter
+        * @param ChangesListFilterGroup|ChangesListFilter $other
         * @param string $globalDescription i18n key for top-level conflict message
         * @param string $contextDescription i18n key for conflict message in this
         *  direction (when in UI context of $this object)
index 48c6e84..f569dca 100644 (file)
@@ -223,8 +223,7 @@ abstract class ChangesListFilterGroup {
         * (not filtered out), even for the hide-based filters.  So e.g. conflicting with
         * 'hideanons' means there is a conflict if only anonymous users are *shown*.
         *
-        * @param ChangesListFilterGroup|ChangesListFilter $other Other
-        *  ChangesListFilterGroup or ChangesListFilter
+        * @param ChangesListFilterGroup|ChangesListFilter $other
         * @param string $globalKey i18n key for top-level conflict message
         * @param string $forwardKey i18n key for conflict message in this
         *  direction (when in UI context of $this object)
@@ -255,8 +254,7 @@ abstract class ChangesListFilterGroup {
         *
         * Internal use ONLY.
         *
-        * @param ChangesListFilterGroup|ChangesListFilter $other Other
-        *  ChangesListFilterGroup or ChangesListFilter
+        * @param ChangesListFilterGroup|ChangesListFilter $other
         * @param string $globalDescription i18n key for top-level conflict message
         * @param string $contextDescription i18n key for conflict message in this
         *  direction (when in UI context of $this object)
index 775fd76..1497a44 100644 (file)
@@ -155,7 +155,7 @@ class ChangesListStringOptionsFilterGroup extends ChangesListFilterGroup {
        /**
         * Registers a filter in this group
         *
-        * @param ChangesListStringOptionsFilter $filter ChangesListStringOptionsFilter
+        * @param ChangesListStringOptionsFilter $filter
         */
        public function registerFilter( ChangesListStringOptionsFilter $filter ) {
                $this->filters[$filter->getName()] = $filter;
index db1f599..95848ea 100644 (file)
@@ -135,7 +135,7 @@ class ChangeTags {
         * exists, provided it is not disabled. If the message is disabled,
         * we consider the tag hidden, and return false.
         *
-        * @param string $tag Tag
+        * @param string $tag
         * @param IContextSource $context
         * @return string|bool Tag description or false if tag is to be hidden.
         * @since 1.25 Returns false if tag is to be hidden.
@@ -162,7 +162,7 @@ class ChangeTags {
         * or if message is disabled, returns false. Otherwise, returns the message object
         * for the long description.
         *
-        * @param string $tag Tag
+        * @param string $tag
         * @param IContextSource $context
         * @return Message|bool Message object of the tag long description or false if
         *  there is no description.
index c12d28d..65dc3bb 100644 (file)
@@ -492,7 +492,7 @@ abstract class AbstractContent implements Content {
         *
         * @param Title $title Context title for parsing
         * @param int|null $revId Revision ID (for {{REVISIONID}})
-        * @param ParserOptions|null $options Parser options
+        * @param ParserOptions|null $options
         * @param bool $generateHtml Whether or not to generate HTML
         *
         * @return ParserOutput Containing information derived from this content.
@@ -536,7 +536,7 @@ abstract class AbstractContent implements Content {
         *
         * @param Title $title Context title for parsing
         * @param int|null $revId Revision ID (for {{REVISIONID}})
-        * @param ParserOptions $options Parser options
+        * @param ParserOptions $options
         * @param bool $generateHtml Whether or not to generate HTML
         * @param ParserOutput &$output The output object to fill (reference).
         *
index 2b94f3f..7d8f67c 100644 (file)
@@ -75,8 +75,8 @@ class JsonContent extends TextContent {
        /**
         * Beautifies JSON prior to save.
         *
-        * @param Title $title Title
-        * @param User $user User
+        * @param Title $title
+        * @param User $user
         * @param ParserOptions $popts
         * @return JsonContent
         */
index e5a9f90..71f65b3 100644 (file)
@@ -236,7 +236,7 @@ class TextContent extends AbstractContent {
         *
         * @param Title $title Context title for parsing
         * @param int $revId Revision ID (for {{REVISIONID}})
-        * @param ParserOptions $options Parser options
+        * @param ParserOptions $options
         * @param bool $generateHtml Whether or not to generate HTML
         * @param ParserOutput &$output The output object to fill (reference).
         */
index d2cb5d1..f5f8c84 100644 (file)
@@ -45,7 +45,7 @@ class LocalizedException extends Exception implements ILocalizedException {
 
        /**
         * @param string|array|MessageSpecifier $messageSpec See Message::newFromSpecifier
-        * @param int $code Exception code
+        * @param int $code
         * @param Exception|Throwable $previous The previous exception used for the exception chaining.
         */
        public function __construct( $messageSpec, $code = 0, $previous = null ) {
index eeb8a8f..80fd22e 100644 (file)
@@ -177,7 +177,7 @@ abstract class ImageGalleryBase extends ContextSource {
        /**
         * Set the caption (as plain text)
         *
-        * @param string $caption Caption
+        * @param string $caption
         */
        function setCaption( $caption ) {
                $this->mCaption = htmlspecialchars( $caption );
@@ -186,7 +186,7 @@ abstract class ImageGalleryBase extends ContextSource {
        /**
         * Set the caption (as HTML)
         *
-        * @param string $caption Caption
+        * @param string $caption
         */
        public function setCaptionHtml( $caption ) {
                $this->mCaption = $caption;
index cb1b47e..21d83d2 100644 (file)
@@ -152,7 +152,7 @@ class PostgresInstaller extends DatabaseInstaller {
        /**
         * Open a PG connection with given parameters
         * @param string $user User name
-        * @param string $password Password
+        * @param string $password
         * @param string $dbName Database name
         * @param string $schema Database schema
         * @return Status
index 2d1c58b..0d969fb 100644 (file)
@@ -186,7 +186,7 @@ class IEUrlExtension {
         * - if we find a possible extension followed by a dot or another illegal
         *   character, we ignore it and continue searching
         *
-        * @param string $url URL
+        * @param string $url
         * @return mixed Detected extension (string), or false if none found
         */
        public static function findIE6Extension( $url ) {
index f9dcc1b..6f348c2 100644 (file)
@@ -214,7 +214,7 @@ class StatusValue {
        /**
         * Merge another status object into this one
         *
-        * @param StatusValue $other Other StatusValue object
+        * @param StatusValue $other
         * @param bool $overwriteValue Whether to override the "value" member
         */
        public function merge( $other, $overwriteValue = false ) {
index 9761108..648fb67 100644 (file)
@@ -294,7 +294,7 @@ class XmlTypeCheck {
 
        /**
         * @param string $name element or attribute name, maybe with a full or short prefix
-        * @param string $namespaceURI the namespaceURI
+        * @param string $namespaceURI
         * @return string the name prefixed with namespaceURI
         */
        private function expandNS( $name, $namespaceURI ) {
index 20e30c5..b937736 100644 (file)
@@ -363,7 +363,7 @@ class MemcachedClient {
        /**
         * Changes the TTL on a key from the server to $time
         *
-        * @param string $key Key
+        * @param string $key
         * @param int $time TTL in seconds
         *
         * @return bool True on success, false on failure
index 57a12a4..a828cd3 100644 (file)
@@ -82,7 +82,7 @@ class TransactionProfiler implements LoggerAwareInterface {
        }
 
        /**
-        * @param bool $value New value
+        * @param bool $value
         * @return bool Old value
         * @since 1.28
         */
index 00d3bd3..93a81cf 100644 (file)
@@ -98,8 +98,9 @@ class LogEventsList extends ContextSource {
         * @param string $user
         * @param string $page
         * @param string $pattern
-        * @param int $year Year
-        * @param int $month Month
+        * @param int|string $year Use 0 to start with no year preselected.
+        * @param int|string $month A month in the 1..12 range. Use 0 to start with no month
+        *  preselected.
         * @param array $filter
         * @param string $tagFilter Tag to select by default
         * @param string $action
@@ -426,7 +427,7 @@ class LogEventsList extends ContextSource {
        }
 
        /**
-        * @param stdClass $row Row
+        * @param stdClass $row
         * @return string
         */
        private function getShowHideLinks( $row ) {
@@ -496,7 +497,7 @@ class LogEventsList extends ContextSource {
        }
 
        /**
-        * @param stdClass $row Row
+        * @param stdClass $row
         * @param string|array $type
         * @param string|array $action
         * @param string $right
@@ -521,7 +522,7 @@ class LogEventsList extends ContextSource {
         * Determine if the current user is allowed to view a particular
         * field of this log row, if it's marked as deleted.
         *
-        * @param stdClass $row Row
+        * @param stdClass $row
         * @param int $field
         * @param User $user User to check, or null to use $wgUser
         * @return bool
@@ -558,7 +559,7 @@ class LogEventsList extends ContextSource {
        }
 
        /**
-        * @param stdClass $row Row
+        * @param stdClass $row
         * @param int $field One of DELETED_* bitfield constants
         * @return bool
         */
index e421209..77d9aa2 100644 (file)
@@ -319,7 +319,7 @@ class LogPage {
         *
         * @param string $action One of '', 'block', 'protect', 'rights', 'delete',
         *   'upload', 'move', 'move_redir'
-        * @param Title $target Title object
+        * @param Title $target
         * @param string $comment Description associated
         * @param array $params Parameters passed later to wfMessage function
         * @param null|int|User $doer The user doing the action. null for $wgUser
index 2ed5db3..9e0fc3d 100644 (file)
@@ -292,7 +292,7 @@ class BitmapMetadataHandler {
         * Read the first 2 bytes of a tiff file to figure out
         * Little Endian or Big Endian. Needed for exif stuff.
         *
-        * @param string $filename The filename
+        * @param string $filename
         * @return string 'BE' or 'LE' or false
         */
        static function getTiffByteOrder( $filename ) {
index 343adc2..894043a 100644 (file)
@@ -353,20 +353,20 @@ class IPTC {
         * @todo Potentially this should also capture the timezone offset.
         * @param array $date The date tag
         * @param array $time The time tag
-        * @param string $c The charset
+        * @param string $charset
         * @return string Date in EXIF format.
         */
-       private static function timeHelper( $date, $time, $c ) {
+       private static function timeHelper( $date, $time, $charset ) {
                if ( count( $date ) === 1 ) {
                        // the standard says this should always be 1
                        // just double checking.
-                       list( $date ) = self::convIPTC( $date, $c );
+                       list( $date ) = self::convIPTC( $date, $charset );
                } else {
                        return null;
                }
 
                if ( count( $time ) === 1 ) {
-                       list( $time ) = self::convIPTC( $time, $c );
+                       list( $time ) = self::convIPTC( $time, $charset );
                        $dateOnly = false;
                } else {
                        $time = '000000+0000'; // placeholder
@@ -420,7 +420,7 @@ class IPTC {
        /**
         * Helper function to convert charset for iptc values.
         * @param string|array $data The iptc string
-        * @param string $charset The charset
+        * @param string $charset
         *
         * @return string|array
         */
@@ -439,7 +439,7 @@ class IPTC {
        /**
         * Helper function of a helper function to convert charset for iptc values.
         * @param string|array $data The IPTC string
-        * @param string $charset The charset
+        * @param string $charset
         *
         * @return string
         */
index 8551a12..5dca24b 100644 (file)
@@ -255,7 +255,7 @@ abstract class MediaHandler {
         * Get a MediaTransformOutput object representing the transformed output. Does not
         * actually do the transform.
         *
-        * @param File $image The image object
+        * @param File $image
         * @param string $dstPath Filesystem destination path
         * @param string $dstUrl Destination URL to use in output HTML
         * @param array $params Arbitrary set of parameters validated by $this->validateParam()
@@ -269,7 +269,7 @@ abstract class MediaHandler {
         * Get a MediaTransformOutput object representing the transformed output. Does the
         * transform unless $flags contains self::TRANSFORM_LATER.
         *
-        * @param File $image The image object
+        * @param File $image
         * @param string $dstPath Filesystem destination path
         * @param string $dstUrl Destination URL to use in output HTML
         * @param array $params Arbitrary set of parameters validated by $this->validateParam()
@@ -497,7 +497,7 @@ abstract class MediaHandler {
         *
         * This is used by the media handlers that use the FormatMetadata class
         *
-        * @param array $metadataArray Metadata array
+        * @param array $metadataArray
         * @param bool|IContextSource $context Context to use (optional)
         * @return array Array for use displaying metadata.
         */
index e23989d..e0af6de 100644 (file)
@@ -154,7 +154,7 @@ class WebPHandler extends BitmapHandler {
 
        /**
         * Decodes a lossy chunk header
-        * @param string $header Header string
+        * @param string $header First few bytes of the header, expected to be at least 18 bytes long
         * @return bool|array See WebPHandler::decodeHeader
         */
        protected static function decodeLossyChunkHeader( $header ) {
@@ -180,7 +180,7 @@ class WebPHandler extends BitmapHandler {
 
        /**
         * Decodes a lossless chunk header
-        * @param string $header Header string
+        * @param string $header First few bytes of the header, expected to be at least 13 bytes long
         * @return bool|array See WebPHandler::decodeHeader
         */
        public static function decodeLosslessChunkHeader( $header ) {
@@ -205,7 +205,7 @@ class WebPHandler extends BitmapHandler {
 
        /**
         * Decodes an extended chunk header
-        * @param string $header Header string
+        * @param string $header First few bytes of the header, expected to be at least 18 bytes long
         * @return bool|array See WebPHandler::decodeHeader
         */
        public static function decodeExtendedChunkHeader( $header ) {
index 3587eba..1b6c4c8 100644 (file)
@@ -151,7 +151,7 @@ class XCFHandler extends BitmapHandler {
         *
         * @param File|FSFile $file The image object, or false if there isn't one.
         *   Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!)
-        * @param string $filename The filename
+        * @param string $filename
         * @return string
         */
        public function getMetadata( $file, $filename ) {
index f41ee01..dcd16eb 100644 (file)
@@ -4679,7 +4679,7 @@ class Parser {
         * Wrapper for preprocess()
         *
         * @param string $text The text to preprocess
-        * @param ParserOptions $options Options
+        * @param ParserOptions $options
         * @param Title|null $title Title object or null to use $wgTitle
         * @return string
         */
@@ -5972,7 +5972,7 @@ class Parser {
        /**
         * Remove any strip markers found in the given text.
         *
-        * @param string $text Input string
+        * @param string $text
         * @return string
         */
        public function killMarkers( $text ) {
index 4ed176c..298aad3 100644 (file)
@@ -233,7 +233,7 @@ class StripState {
        /**
         * Remove any strip markers found in the given text.
         *
-        * @param string $text Input string
+        * @param string $text
         * @return string
         */
        public function killMarkers( $text ) {
index 0104ec3..4deb7fa 100644 (file)
@@ -106,7 +106,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
         * Set this module's name. This is called by ResourceLoader::register()
         * when registering the module. Other code should not call this.
         *
-        * @param string $name Name
+        * @param string $name
         */
        public function setName( $name ) {
                $this->name = $name;
@@ -928,7 +928,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
         * Get this module's last modification timestamp for a given context.
         *
         * @deprecated since 1.26 Use getDefinitionSummary() instead
-        * @param ResourceLoaderContext $context Context object
+        * @param ResourceLoaderContext $context
         * @return int|null UNIX timestamp
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
index bf97bd4..4762085 100644 (file)
@@ -57,7 +57,7 @@ abstract class RevDelItem extends RevisionItemBase {
        /**
         * Get the return information about the revision for the API
         * @since 1.23
-        * @param ApiResult $result API result object
+        * @param ApiResult $result
         * @return array Data for the API result
         */
        abstract public function getApiData( ApiResult $result );
index 2687c8e..354b390 100644 (file)
@@ -34,7 +34,7 @@ class SearchExactMatchRescorer {
         * may sort based on other algorithms that may cause the exact title match
         * to not be in the results or be lower down the list.
         * @param string $search the query
-        * @param int[] $namespaces the namespaces
+        * @param int[] $namespaces
         * @param string[] $srchres results
         * @param int $limit the max number of results to return
         * @return string[] munged results
@@ -96,7 +96,7 @@ class SearchExactMatchRescorer {
        }
 
        /**
-        * @param string[] $titles as strings
+        * @param string[] $titles
         * @return array redirect target prefixedText to index of title in titles
         *   that is a redirect to it.
         */
index d37b73b..44806ed 100644 (file)
@@ -97,7 +97,7 @@ final class SessionBackend {
        private $shutdown = false;
 
        /**
-        * @param SessionId $id Session ID object
+        * @param SessionId $id
         * @param SessionInfo $info Session info to populate from
         * @param CachedBagOStuff $store Backend data store
         * @param LoggerInterface $logger
index 303184d..282d764 100644 (file)
@@ -1812,7 +1812,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         *
         * @since 1.31
         * @param Config $config
-        * @param User $user User object
+        * @param User $user
         * @return bool
         */
        public static function checkStructuredFilterUiEnabled( Config $config, User $user ) {
index 3559c99..7cc0dc6 100644 (file)
@@ -823,7 +823,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
        /**
         * Makes change an option link which carries all the other options
         *
-        * @param string $title Title
+        * @param string $title
         * @param array $override Options to override
         * @param array $options Current options
         * @param bool $active Whether to show the link in bold
index 8cdfb87..c8b1578 100644 (file)
@@ -315,7 +315,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * Output HTTP response of raw content
         * Side effect: writes HTTP response to STDOUT.
-        * @param string $content Content
+        * @param string $content
         * @param string $contentType MIME type
         * @throws SpecialUploadStashTooLargeException
         * @return bool
index 45d9a7f..4efe92d 100644 (file)
@@ -407,7 +407,7 @@ class UsersPager extends AlphabeticPager {
         * Format a link to a group description page
         *
         * @param string|UserGroupMembership $group Group name or UserGroupMembership object
-        * @param string $username Username
+        * @param string $username
         * @return string
         */
        protected function buildGroupLink( $group, $username ) {
index b26a577..a9fe5f8 100644 (file)
@@ -4584,7 +4584,7 @@ class User implements IDBAccessObject, UserIdentity {
         * (T8957 with Gmail and Internet Explorer).
         *
         * @param string $page Special page
-        * @param string $token Token
+        * @param string $token
         * @return string Formatted URL
         */
        protected function getTokenUrl( $page, $token ) {
index 1be2a27..4a70aaa 100644 (file)
@@ -440,8 +440,8 @@ class GenerateSitemap extends Maintenance {
        /**
         * Get a sitemap filename
         *
-        * @param int $namespace The namespace
-        * @param int $count The count
+        * @param int $namespace
+        * @param int $count
         * @return string
         */
        function sitemapFilename( $namespace, $count ) {
index d3aa280..a72ec67 100644 (file)
@@ -440,7 +440,7 @@ class ImportImages extends Maintenance {
        /**
         * Split a filename into filename and extension
         *
-        * @param string $filename Filename
+        * @param string $filename
         * @return array
         */
        private function splitFilename( $filename ) {
index 8e276e7..a67b28e 100644 (file)
@@ -167,7 +167,7 @@ class MwSql extends Maintenance {
 
        /**
         * Print the results, callback for $db->sourceStream()
-        * @param ResultWrapper|bool $res The results object
+        * @param ResultWrapper|bool $res
         * @param IDatabase $db
         */
        public function sqlPrintResult( $res, $db ) {
index 15f173a..e33de20 100644 (file)
@@ -6,8 +6,10 @@ use CommentStoreComment;
 use Exception;
 use HashBagOStuff;
 use InvalidArgumentException;
+use Language;
 use MediaWiki\Linker\LinkTarget;
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Storage\BlobStoreFactory;
 use MediaWiki\Storage\IncompleteRevisionException;
 use MediaWiki\Storage\MutableRevisionRecord;
 use MediaWiki\Storage\RevisionRecord;
@@ -611,9 +613,10 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
         */
        public function testNewRevisionFromRow_anonEdit() {
                $page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
+               $text = __METHOD__ . 'a-ä';
                /** @var Revision $rev */
                $rev = $page->doEditContent(
-                       new WikitextContent( __METHOD__. 'a' ),
+                       new WikitextContent( $text ),
                        __METHOD__. 'a'
                )->value['revision'];
 
@@ -624,6 +627,32 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
                        $page->getTitle()
                );
                $this->assertRevisionRecordMatchesRevision( $rev, $record );
+               $this->assertSame( $text, $rev->getContent()->serialize() );
+       }
+
+       /**
+        * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow
+        * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow_1_29
+        */
+       public function testNewRevisionFromRow_anonEdit_legacyEncoding() {
+               $this->setMwGlobals( 'wgLegacyEncoding', 'windows-1252' );
+               $this->overrideMwServices();
+               $page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
+               $text = __METHOD__ . 'a-ä';
+               /** @var Revision $rev */
+               $rev = $page->doEditContent(
+                       new WikitextContent( $text ),
+                       __METHOD__. 'a'
+               )->value['revision'];
+
+               $store = MediaWikiServices::getInstance()->getRevisionStore();
+               $record = $store->newRevisionFromRow(
+                       $this->revisionToRow( $rev ),
+                       [],
+                       $page->getTitle()
+               );
+               $this->assertRevisionRecordMatchesRevision( $rev, $record );
+               $this->assertSame( $text, $rev->getContent()->serialize() );
        }
 
        /**
@@ -632,9 +661,10 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
         */
        public function testNewRevisionFromRow_userEdit() {
                $page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
+               $text = __METHOD__ . 'b-ä';
                /** @var Revision $rev */
                $rev = $page->doEditContent(
-                       new WikitextContent( __METHOD__. 'b' ),
+                       new WikitextContent( $text ),
                        __METHOD__ . 'b',
                        0,
                        false,
@@ -648,6 +678,7 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
                        $page->getTitle()
                );
                $this->assertRevisionRecordMatchesRevision( $rev, $record );
+               $this->assertSame( $text, $rev->getContent()->serialize() );
        }
 
        /**
@@ -656,9 +687,41 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
        public function testNewRevisionFromArchiveRow() {
                $store = MediaWikiServices::getInstance()->getRevisionStore();
                $title = Title::newFromText( __METHOD__ );
+               $text = __METHOD__ . '-bä';
+               $page = WikiPage::factory( $title );
+               /** @var Revision $orig */
+               $orig = $page->doEditContent( new WikitextContent( $text ), __METHOD__ )
+                       ->value['revision'];
+               $page->doDeleteArticle( __METHOD__ );
+
+               $db = wfGetDB( DB_MASTER );
+               $arQuery = $store->getArchiveQueryInfo();
+               $res = $db->select(
+                       $arQuery['tables'], $arQuery['fields'], [ 'ar_rev_id' => $orig->getId() ],
+                       __METHOD__, [], $arQuery['joins']
+               );
+               $this->assertTrue( is_object( $res ), 'query failed' );
+
+               $row = $res->fetchObject();
+               $res->free();
+               $record = $store->newRevisionFromArchiveRow( $row );
+
+               $this->assertRevisionRecordMatchesRevision( $orig, $record );
+               $this->assertSame( $text, $record->getContent( 'main' )->serialize() );
+       }
+
+       /**
+        * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromArchiveRow
+        */
+       public function testNewRevisionFromArchiveRow_legacyEncoding() {
+               $this->setMwGlobals( 'wgLegacyEncoding', 'windows-1252' );
+               $this->overrideMwServices();
+               $store = MediaWikiServices::getInstance()->getRevisionStore();
+               $title = Title::newFromText( __METHOD__ );
+               $text = __METHOD__ . '-bä';
                $page = WikiPage::factory( $title );
                /** @var Revision $orig */
-               $orig = $page->doEditContent( new WikitextContent( __METHOD__ ), __METHOD__ )
+               $orig = $page->doEditContent( new WikitextContent( $text ), __METHOD__ )
                        ->value['revision'];
                $page->doDeleteArticle( __METHOD__ );
 
@@ -675,6 +738,7 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
                $record = $store->newRevisionFromArchiveRow( $row );
 
                $this->assertRevisionRecordMatchesRevision( $orig, $record );
+               $this->assertSame( $text, $record->getContent( 'main' )->serialize() );
        }
 
        /**
@@ -1026,6 +1090,39 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
                                'content' => new WikitextContent( 'Some Content' ),
                        ]
                ];
+               yield 'Basic array, serialized text' => [
+                       [
+                               'id' => 2,
+                               'page' => 1,
+                               'timestamp' => '20171017114835',
+                               'user_text' => '111.0.1.2',
+                               'user' => 0,
+                               'minor_edit' => false,
+                               'deleted' => 0,
+                               'len' => 46,
+                               'parent_id' => 1,
+                               'sha1' => 'rdqbbzs3pkhihgbs8qf2q9jsvheag5z',
+                               'comment' => 'Goat Comment!',
+                               'text' => ( new WikitextContent( 'Söme Content' ) )->serialize(),
+                       ]
+               ];
+               yield 'Basic array, serialized text, utf-8 flags' => [
+                       [
+                               'id' => 2,
+                               'page' => 1,
+                               'timestamp' => '20171017114835',
+                               'user_text' => '111.0.1.2',
+                               'user' => 0,
+                               'minor_edit' => false,
+                               'deleted' => 0,
+                               'len' => 46,
+                               'parent_id' => 1,
+                               'sha1' => 'rdqbbzs3pkhihgbs8qf2q9jsvheag5z',
+                               'comment' => 'Goat Comment!',
+                               'text' => ( new WikitextContent( 'Söme Content' ) )->serialize(),
+                               'flags' => 'utf-8',
+                       ]
+               ];
                yield 'Basic array, with title' => [
                        [
                                'title' => Title::newFromText( 'SomeText' ),
@@ -1092,6 +1189,8 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
                        $this->assertTrue(
                                $result->getSlot( 'main' )->getContent()->equals( $array['content'] )
                        );
+               } elseif ( isset( $array['text'] ) ) {
+                       $this->assertSame( $array['text'], $result->getSlot( 'main' )->getContent()->serialize() );
                } else {
                        $this->assertSame(
                                $array['content_format'],
@@ -1101,4 +1200,29 @@ class RevisionStoreDbTest extends MediaWikiTestCase {
                }
        }
 
+       /**
+        * @dataProvider provideNewMutableRevisionFromArray
+        * @covers \MediaWiki\Storage\RevisionStore::newMutableRevisionFromArray
+        */
+       public function testNewMutableRevisionFromArray_legacyEncoding( array $array ) {
+               $cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
+               $blobStore = new SqlBlobStore( wfGetLB(), $cache );
+               $blobStore->setLegacyEncoding( 'windows-1252', Language::factory( 'en' ) );
+
+               $factory = $this->getMockBuilder( BlobStoreFactory::class )
+                       ->setMethods( [ 'newBlobStore', 'newSqlBlobStore' ] )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+               $factory->expects( $this->any() )
+                       ->method( 'newBlobStore' )
+                       ->willReturn( $blobStore );
+               $factory->expects( $this->any() )
+                       ->method( 'newSqlBlobStore' )
+                       ->willReturn( $blobStore );
+
+               $this->setService( 'BlobStoreFactory', $factory );
+
+               $this->testNewMutableRevisionFromArray( $array );
+       }
+
 }
index 2cdd316..c9e9978 100644 (file)
@@ -2,10 +2,13 @@
 
 namespace MediaWiki\Tests\Storage;
 
+use HashBagOStuff;
+use Language;
 use MediaWiki\Storage\RevisionAccessException;
 use MediaWiki\Storage\RevisionStore;
 use MediaWiki\Storage\SqlBlobStore;
 use MediaWikiTestCase;
+use Title;
 use WANObjectCache;
 use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\LoadBalancer;
@@ -421,6 +424,107 @@ class RevisionStoreTest extends MediaWikiTestCase {
                $store->getTitle( 1, 2, RevisionStore::READ_NORMAL );
        }
 
-       // FIXME: test getRevisionSizes
+       public function provideNewRevisionFromRow_legacyEncoding_applied() {
+               yield 'windows-1252, old_flags is empty' => [
+                       'windows-1252',
+                       'en',
+                       [
+                               'old_flags' => '',
+                               'old_text' => "S\xF6me Content",
+                       ],
+                       'Söme Content'
+               ];
+
+               yield 'windows-1252, old_flags is null' => [
+                       'windows-1252',
+                       'en',
+                       [
+                               'old_flags' => null,
+                               'old_text' => "S\xF6me Content",
+                       ],
+                       'Söme Content'
+               ];
+       }
+
+       /**
+        * @dataProvider provideNewRevisionFromRow_legacyEncoding_applied
+        *
+        * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow
+        * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow_1_29
+        */
+       public function testNewRevisionFromRow_legacyEncoding_applied( $encoding, $locale, $row, $text ) {
+               $cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
+
+               $blobStore = new SqlBlobStore( wfGetLB(), $cache );
+               $blobStore->setLegacyEncoding( $encoding, Language::factory( $locale ) );
+
+               $store = new RevisionStore( wfGetLB(), $blobStore, $cache );
+
+               $record = $store->newRevisionFromRow(
+                       $this->makeRow( $row ),
+                       0,
+                       Title::newFromText( __METHOD__ . '-UTPage' )
+               );
+
+               $this->assertSame( $text, $record->getContent( 'main' )->serialize() );
+       }
+
+       /**
+        * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow
+        * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow_1_29
+        */
+       public function testNewRevisionFromRow_legacyEncoding_ignored() {
+               $row = [
+                       'old_flags' => 'utf-8',
+                       'old_text' => 'Söme Content',
+               ];
+
+               $cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
+
+               $blobStore = new SqlBlobStore( wfGetLB(), $cache );
+               $blobStore->setLegacyEncoding( 'windows-1252', Language::factory( 'en' ) );
+
+               $store = new RevisionStore( wfGetLB(), $blobStore, $cache );
+
+               $record = $store->newRevisionFromRow(
+                       $this->makeRow( $row ),
+                       0,
+                       Title::newFromText( __METHOD__ . '-UTPage' )
+               );
+               $this->assertSame( 'Söme Content', $record->getContent( 'main' )->serialize() );
+       }
+
+       private function makeRow( array $array ) {
+               $row = $array + [
+                               'rev_id' => 7,
+                               'rev_page' => 5,
+                               'rev_text_id' => 11,
+                               'rev_timestamp' => '20110101000000',
+                               'rev_user_text' => 'Tester',
+                               'rev_user' => 17,
+                               'rev_minor_edit' => 0,
+                               'rev_deleted' => 0,
+                               'rev_len' => 100,
+                               'rev_parent_id' => 0,
+                               'rev_sha1' => 'deadbeef',
+                               'rev_comment_text' => 'Testing',
+                               'rev_comment_data' => '{}',
+                               'rev_comment_cid' => 111,
+                               'rev_content_format' => CONTENT_FORMAT_TEXT,
+                               'rev_content_model' => CONTENT_MODEL_TEXT,
+                               'page_namespace' => 0,
+                               'page_title' => 'TEST',
+                               'page_id' => 5,
+                               'page_latest' => 7,
+                               'page_is_redirect' => 0,
+                               'page_len' => 100,
+                               'user_name' => 'Tester',
+                               'old_is' => 13,
+                               'old_text' => 'Hello World',
+                               'old_flags' => 'utf-8',
+                       ];
+
+               return (object)$row;
+       }
 
 }
index a4b980f..0fdb08c 100644 (file)
@@ -282,7 +282,7 @@ class LegacyHookPreAuthenticationProviderTest extends \MediaWikiTestCase {
         * @dataProvider provideTestForAccountCreation
         * @param string $msg
         * @param Status|null $status
-        * @param StatusValue $result Result
+        * @param StatusValue $result
         */
        public function testTestForAccountCreation( $msg, $status, $result ) {
                $this->hook( 'AbortNewAccount', $this->once() )
index 25911a7..b92e651 100644 (file)
@@ -21,7 +21,7 @@ class CollationTest extends MediaWikiLangTestCase {
         * code makes this assumption.
         *
         * @param string $lang Language code for collator
-        * @param string $base Base string
+        * @param string $base
         * @param string $extended String containing base as a prefix.
         *
         * @dataProvider prefixDataProvider
index fd02a2e..bac2088 100644 (file)
@@ -14,7 +14,7 @@ class TestBagOStuff extends \CachedBagOStuff {
        /**
         * @param string $id Session ID
         * @param array $data Session data
-        * @param int $expiry Expiry
+        * @param int $expiry
         * @param User $user User for metadata
         */
        public function setSessionData( $id, array $data, $expiry = 0, User $user = null ) {
@@ -24,7 +24,7 @@ class TestBagOStuff extends \CachedBagOStuff {
        /**
         * @param string $id Session ID
         * @param array $metadata Session metadata
-        * @param int $expiry Expiry
+        * @param int $expiry
         */
        public function setSessionMeta( $id, array $metadata, $expiry = 0 ) {
                $this->setSession( $id, [ 'metadata' => $metadata ], $expiry );
@@ -33,7 +33,7 @@ class TestBagOStuff extends \CachedBagOStuff {
        /**
         * @param string $id Session ID
         * @param array $blob Session metadata and data
-        * @param int $expiry Expiry
+        * @param int $expiry
         * @param User $user User for metadata
         */
        public function setSession( $id, array $blob, $expiry = 0, User $user = null ) {
@@ -54,7 +54,7 @@ class TestBagOStuff extends \CachedBagOStuff {
        /**
         * @param string $id Session ID
         * @param array|mixed $blob Session metadata and data
-        * @param int $expiry Expiry
+        * @param int $expiry
         */
        public function setRawSession( $id, $blob, $expiry = 0 ) {
                if ( $expiry <= 0 ) {
index af29d6b..5db1ad0 100644 (file)
@@ -79,7 +79,7 @@ class TestUtils {
         * If you need a Session for testing but don't want to create a backend to
         * construct one, use this.
         * @param object $backend Object to serve as the SessionBackend
-        * @param int $index Index
+        * @param int $index
         * @param LoggerInterface $logger
         * @return Session
         */
index 4392964..e8259d3 100644 (file)
@@ -112,7 +112,7 @@ class DummyContentForTesting extends AbstractContent {
         *
         * @param Title $title Context title for parsing
         * @param int|null $revId Revision ID (for {{REVISIONID}})
-        * @param ParserOptions $options Parser options
+        * @param ParserOptions $options
         * @param bool $generateHtml Whether or not to generate HTML
         * @param ParserOutput &$output The output object to fill (reference).
         */
index afc1a4a..91bb186 100644 (file)
@@ -110,7 +110,7 @@ class DummyNonTextContent extends AbstractContent {
         *
         * @param Title $title Context title for parsing
         * @param int|null $revId Revision ID (for {{REVISIONID}})
-        * @param ParserOptions $options Parser options
+        * @param ParserOptions $options
         * @param bool $generateHtml Whether or not to generate HTML
         * @param ParserOutput &$output The output object to fill (reference).
         */