Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375236 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
......................................................................

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.ExtraParamComment
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.OneClassPerFile.MultipleFound

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment

Change-Id: I54dd45f5a4121c29e9458d91fb7c59b0ccfcbe3e
---
M composer.json
M includes/MobileContext.php
M includes/MobileFormatter.php
M includes/MobileFrontend.hooks.php
M includes/MobileFrontend.skin.hooks.php
M includes/api/ApiMobileView.php
M includes/diff/InlineDiffFormatter.php
M includes/diff/InlineDifferenceEngine.php
M includes/models/MobilePage.php
M includes/specials/MobileSpecialPage.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialMobileHistory.php
M includes/specials/SpecialMobileOptions.php
M includes/specials/SpecialMobileWatchlist.php
M phpcs.xml
15 files changed, 44 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/36/375236/1

diff --git a/composer.json b/composer.json
index f80e32e..daa26e1 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
-               "mediawiki/mediawiki-codesniffer": "0.11.1",
+               "mediawiki/mediawiki-codesniffer": "0.12.0",
                "jakub-onderka/php-console-highlighter": "0.3.2"
        },
        "scripts": {
diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index a04e2ca..a5d9d41 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -404,7 +404,7 @@
 
        /**
         * Wether user is Beta group member
-        * @return boolean
+        * @return bool
         */
        public function isBetaGroupMember() {
                return $this->getMobileMode() === self::MODE_BETA;
@@ -595,7 +595,7 @@
 
        /**
         * Set Cookie to stop automatically redirect to mobile page
-        * @param integer $expiry Expire time of cookie
+        * @param int $expiry Expire time of cookie
         */
        public function setStopMobileRedirectCookie( $expiry = null ) {
                if ( is_null( $expiry ) ) {
@@ -1155,7 +1155,7 @@
         * Should image thumbnails in pages remove the high-density additions
         * during this request?
         *
-        * @return boolean
+        * @return bool
         */
        public function shouldStripResponsiveImages() {
                if ( $this->stripResponsiveImagesOverride === null ) {
@@ -1169,7 +1169,7 @@
        /**
         * Config override for responsive image strip mode.
         *
-        * @param boolean $val
+        * @param bool $val
         */
        public function setStripResponsiveImages( $val ) {
                $this->stripResponsiveImagesOverride = $val;
@@ -1180,7 +1180,7 @@
         * and watchlists; or as taglines on article pages.
         *
         * @param string $feature
-        * @return boolean
+        * @return bool
         * @throws DomainException If `feature` isn't one that shows Wikidata 
descriptions. See the
         *  `wgMFDisplayWikibaseDescriptions` configuration variable for detail
         */
diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index c314169..0041bcf 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -96,9 +96,9 @@
         *
         * @param MobileContext $context
         * @param IContentProvider $provider
-        * @param boolean $enableSections (optional)
+        * @param bool $enableSections (optional)
         *  whether to wrap the content of sections
-        * @param boolean $includeTOC (optional) whether to include the
+        * @param bool $includeTOC (optional) whether to include the
         *  table of contents in output HTML
         *
         * @return MobileFormatter
@@ -129,7 +129,7 @@
        /**
         * Mark whether a placeholder table of contents should be included at 
the end of the lead
         * section
-        * @param boolean $flag
+        * @param bool $flag
         */
        public function enableTOCPlaceholder( $flag = true ) {
                $this->isTOCEnabled = $flag;
@@ -146,7 +146,7 @@
 
        /**
         * Change mainPage (is this the main page) to $value (standard: true)
-        * @param boolean $value
+        * @param bool $value
         */
        public function setIsMainPage( $value = true ) {
                $this->mainPage = $value;
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index e8b8116..4b8e6d9 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -402,7 +402,7 @@
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
         *
         * @param array $vars
-        * @return boolean
+        * @return bool
         */
        public static function onResourceLoaderGetConfigVars( &$vars ) {
                $context = MobileContext::singleton();
diff --git a/includes/MobileFrontend.skin.hooks.php 
b/includes/MobileFrontend.skin.hooks.php
index e0fe06f..fbe446e 100644
--- a/includes/MobileFrontend.skin.hooks.php
+++ b/includes/MobileFrontend.skin.hooks.php
@@ -92,7 +92,7 @@
         *
         * @param string $license
         * @param Message $msgObj delimiter (optional)
-        * @return integer Returns 2, if there are multiple licenses, 1 
otherwise.
+        * @return int Returns 2, if there are multiple licenses, 1 otherwise.
         */
        public static function getPluralLicenseInfo( $license, $msgObj = null ) 
{
                // for plural support we need the info, if there is one or more 
licenses used in the license text
diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index d29db83..8234f93 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -324,7 +324,7 @@
         * Check if page is the main page after follow redirect when 
followRedirects is true.
         *
         * @param Title $title Title object to check
-        * @return boolean
+        * @return bool
         */
        protected function isMainPage( $title ) {
                if ( $title->isRedirect() && $this->followRedirects ) {
@@ -439,7 +439,7 @@
         * Performs a page parse
         * @param WikiPage $wp
         * @param ParserOptions $parserOptions
-        * @param null|int [$oldid] Revision ID to get the text from, passing 
null or 0 will
+        * @param null|int [ $oldid] Revision ID to get the text from, passing 
null or 0 will
         *   get the current revision (default value)
         * @return ParserOutput|null
         */
@@ -480,7 +480,7 @@
         * @param string $html representing the entire page
         * @param Title $title
         * @param ParserOutput $parserOutput
-        * @param integer $revId this is a temporary parameter to avoid debug 
log warnings.
+        * @param int $revId this is a temporary parameter to avoid debug log 
warnings.
         *  Long term the call to wfDebugLog should be moved outside this 
method (optional)
         * @return array structure representing the list of sections and their 
properties:
         *  - refsections: [] where all keys are section ids of sections with 
refs
diff --git a/includes/diff/InlineDiffFormatter.php 
b/includes/diff/InlineDiffFormatter.php
index d0345b7..87f2962 100644
--- a/includes/diff/InlineDiffFormatter.php
+++ b/includes/diff/InlineDiffFormatter.php
@@ -13,10 +13,10 @@
        /**
         * Get the header of diff block. Remember: Given line numbers will not 
be visible,
         * it's a one column diff style.
-        * @param integer $xbeg line number of left side to compare with
-        * @param integer $xlen Number of trailing lines after the changed line 
on left side
-        * @param integer $ybeg right side line number to compare with
-        * @param integer $ylen Number of trailing lines after the changed line 
on right side
+        * @param int $xbeg line number of left side to compare with
+        * @param int $xlen Number of trailing lines after the changed line on 
left side
+        * @param int $ybeg right side line number to compare with
+        * @param int $ylen Number of trailing lines after the changed line on 
right side
         * @return string
         */
        function blockHeader( $xbeg, $xlen, $ybeg, $ylen ) {
diff --git a/includes/diff/InlineDifferenceEngine.php 
b/includes/diff/InlineDifferenceEngine.php
index 324cc90..2354819 100644
--- a/includes/diff/InlineDifferenceEngine.php
+++ b/includes/diff/InlineDifferenceEngine.php
@@ -12,7 +12,7 @@
         * Checks whether the given Revision was deleted
         * @todo FIXME: Upstream to DifferenceEngine - refactor showDiffPage
         *
-        * @return boolean
+        * @return bool
         */
        public function isDeletedDiff() {
                return $this->mNewRev && $this->mNewRev->isDeleted( 
Revision::DELETED_TEXT );
@@ -23,7 +23,7 @@
         * restricted.
         * FIXME: Upstream to DifferenceEngine - refactor showDiffPage
         *
-        * @return boolean
+        * @return bool
         */
        public function isSuppressedDiff() {
                return $this->isDeletedDiff() &&
@@ -35,7 +35,7 @@
         * and current revisions.
         * @todo FIXME: Upstream to DifferenceEngine - refactor showDiffPage
         *
-        * @return boolean
+        * @return bool
         */
        public function isUserAllowedToSee() {
                $user = $this->getUser();
@@ -117,7 +117,7 @@
         * the flag unhide is set to allow viewing deleted revisions.
         * @todo FIXME: Upstream to DifferenceEngine - refactor showDiffPage
         *
-        * @return boolean
+        * @return bool
         */
        public function isHiddenFromUser() {
                if ( $this->isDeletedDiff() && ( !$this->unhide || 
!$this->isUserAllowedToSee() ) ) {
diff --git a/includes/models/MobilePage.php b/includes/models/MobilePage.php
index 3303dec..1dc5f43 100644
--- a/includes/models/MobilePage.php
+++ b/includes/models/MobilePage.php
@@ -140,7 +140,7 @@
        /**
         * Get a small sized thumbnail in div container.
         *
-        * @param boolean $useBackgroundImage Whether the thumbnail should have 
a background image
+        * @param bool $useBackgroundImage Whether the thumbnail should have a 
background image
         * @return string
         */
        public function getSmallThumbnailHtml( $useBackgroundImage = false ) {
diff --git a/includes/specials/MobileSpecialPage.php 
b/includes/specials/MobileSpecialPage.php
index 31b6a7c..2be1028 100644
--- a/includes/specials/MobileSpecialPage.php
+++ b/includes/specials/MobileSpecialPage.php
@@ -113,7 +113,7 @@
 
        /**
         * Returns if this page is listed on Special:SpecialPages
-        * @return boolean
+        * @return bool
         */
        public function isListed() {
                return $this->listed;
diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index 9108099..3a98b00 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -34,7 +34,7 @@
 
        /**
         * Get the revision object from ID
-        * @param integer $id ID of the wanted revision
+        * @param int $id ID of the wanted revision
         * @return Revision
         */
        public static function getRevision( $id ) {
@@ -92,7 +92,7 @@
 
        /**
         * Render the diff page
-        * @return boolean false when revision not exist
+        * @return bool false when revision not exist
         * @param string $par Revision IDs separated by three points (e.g. 
123...124)
         */
        function executeWhenAvailable( $par ) {
@@ -328,7 +328,7 @@
 
        /**
         * Get the url for the mobile diff special page to use in Desktop footer
-        * @return boolean|string Return URL or false when revision id's not set
+        * @return bool|string Return URL or false when revision id's not set
         */
        public static function getMobileUrlFromDesktop() {
                $req = MobileContext::singleton()->getRequest();
diff --git a/includes/specials/SpecialMobileHistory.php 
b/includes/specials/SpecialMobileHistory.php
index 743b219..08193ca 100644
--- a/includes/specials/SpecialMobileHistory.php
+++ b/includes/specials/SpecialMobileHistory.php
@@ -88,7 +88,7 @@
         * Checks, if the given title supports the use of SpecialMobileHistory.
         *
         * @param Title $title The title to check
-        * @return boolean True, if SpecialMobileHistory can be used, false 
otherwise
+        * @return bool True, if SpecialMobileHistory can be used, false 
otherwise
         */
        public static function shouldUseSpecialHistory( Title $title ) {
                $contentHandler = ContentHandler::getForTitle( $title );
@@ -227,7 +227,7 @@
 
        /**
         * Get a button to show more entries of history
-        * @param integer $ts The offset to start the history list from
+        * @param int $ts The offset to start the history list from
         * @return string
         */
        protected function getMoreButton( $ts ) {
diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 4285ccd..7bbddcf 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -270,7 +270,7 @@
         * Get the URL of this special page
         * @param string|null $option Subpage string, or false to not use a 
subpage
         * @param Title $returnTo Destination to returnto after successfully 
action on the page returned
-        * @param boolean $fullUrl Whether to get the local url, or the full url
+        * @param bool $fullUrl Whether to get the local url, or the full url
         *
         * @return string
         */
diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index 3cbcf2d0..e6eaf74 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -302,7 +302,7 @@
         * Render the Watchlist items.
         * When ?from not set, adds a link "more" to see the other watchlist 
items.
         * @param ResultWrapper $res ResultWrapper from db
-        * @param boolean $feed Render as feed (true) or list (false) view?
+        * @param bool $feed Render as feed (true) or list (false) view?
         * @todo FIXME: use templates/PageList.html when server side templates
         * are available to keep consistent with nearby view
         */
@@ -320,7 +320,7 @@
 
        /**
         * If the user doesn't watch any page, show information how to watch 
some.
-        * @param boolean $feed Render as feed (true) or list (false) view?
+        * @param bool $feed Render as feed (true) or list (false) view?
         */
        function showEmptyList( $feed ) {
                $this->getOutput()->addHtml( self::getEmptyListHtml( $feed, 
$this->getLanguage() ) );
@@ -329,7 +329,7 @@
        /**
         * Get the HTML needed to show if a user doesn't watch any page, show 
information
         * how to watch pages where no pages have been watched.
-        * @param boolean $feed Render as feed (true) or list (false) view?
+        * @param bool $feed Render as feed (true) or list (false) view?
         * @param Language $lang The language of the current mode
         * @return string
         */
diff --git a/phpcs.xml b/phpcs.xml
index f668c64..b5e085e 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,10 +1,19 @@
 <?xml version="1.0"?>
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+               <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
+               <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
                <exclude 
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName"/>
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
                <exclude 
name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage"/>
-               <exclude name="MediaWiki.Commenting.FunctionComment"/>
        </rule>
        <rule ref="Generic.Files.LineLength">
                <exclude-pattern>MobileFrontend\.alias\.php</exclude-pattern>

-- 
To view, visit https://gerrit.wikimedia.org/r/375236
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54dd45f5a4121c29e9458d91fb7c59b0ccfcbe3e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to