mediawiki/extensions/BlueSpiceFlaggedRevsConnector: main (log #1184888)

sourcepatches

This run took 13 seconds.

From 0e861cc006122bb9f05bd89ba3b29ca3e274a5bf Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Mon, 18 Mar 2024 13:26:45 +0000
Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate

Change-Id: Id5ab14f8580c3910e9f03dda7e49b9612e59a988
---
 .phpcs.xml                                             |  1 +
 composer.json                                          |  5 +++--
 includes/FRCHistoryView.class.php                      |  2 +-
 includes/FRCInfobox.class.php                          |  2 +-
 includes/FRCSuperList.class.php                        |  6 ++++--
 maintenance/BSBatchReview.php                          |  2 +-
 maintenance/BSFixReadConfirmations.php                 | 10 ++++------
 src/Data/FlaggedPages/PrimaryDataProvider.php          |  2 +-
 src/DocumentStatePropertyValueProvider.php             |  5 ++---
 .../AutoReviewAfterVisualEditorEdit.php                |  4 ++--
 src/Panel/Flyout.php                                   |  7 +++----
 src/Utils.php                                          |  4 ++--
 src/Workflows/Activity/ApprovePageActivity.php         | 10 +++++-----
 13 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/.phpcs.xml b/.phpcs.xml
index cd1922f..2959c12 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <ruleset>
 	<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.ObjectTypeHintParam" />
 		<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected" />
 		<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic" />
diff --git a/composer.json b/composer.json
index 28064f5..e328e5a 100644
--- a/composer.json
+++ b/composer.json
@@ -12,7 +12,7 @@
 		}
 	},
 	"require-dev": {
-		"mediawiki/mediawiki-codesniffer": "41.0.0",
+		"mediawiki/mediawiki-codesniffer": "43.0.0",
 		"mediawiki/minus-x": "1.1.1",
 		"php-parallel-lint/php-console-highlighter": "1.0.0",
 		"php-parallel-lint/php-parallel-lint": "1.3.2"
@@ -34,7 +34,8 @@
 	},
 	"config": {
 		"allow-plugins": {
-			"composer/installers": true
+			"composer/installers": true,
+			"dealerdirect/phpcodesniffer-composer-installer": true
 		}
 	}
 }
diff --git a/includes/FRCHistoryView.class.php b/includes/FRCHistoryView.class.php
index aca3837..71497a8 100644
--- a/includes/FRCHistoryView.class.php
+++ b/includes/FRCHistoryView.class.php
@@ -56,7 +56,7 @@ class FRCHistoryView {
 	protected static function getComment( $timestamp, $pageId ) {
 		$dbr = wfGetDB( DB_REPLICA );
 		$logRow = $dbr->selectRow(
-			[ 'logging' , 'comment' ],
+			[ 'logging', 'comment' ],
 			'comment_text',
 			[
 				'log_page' => $pageId,
diff --git a/includes/FRCInfobox.class.php b/includes/FRCInfobox.class.php
index 841226e..4643650 100644
--- a/includes/FRCInfobox.class.php
+++ b/includes/FRCInfobox.class.php
@@ -68,7 +68,7 @@ class FRCInfobox {
 		$sUlPrefix = '';
 		$sUlSuffix = '';
 
-		$this->iFRInfoboxElementCounter ++;
+		$this->iFRInfoboxElementCounter++;
 		$sULLastPrefix = $args['count'] == $this->iFRInfoboxElementCounter ? '</ul>' : '';
 
 		if ( substr( $res->fr_timestamp, 0, 8 ) != $this->iFREntryDate ) {
diff --git a/includes/FRCSuperList.class.php b/includes/FRCSuperList.class.php
index 23d4330..629c5ff 100644
--- a/includes/FRCSuperList.class.php
+++ b/includes/FRCSuperList.class.php
@@ -94,7 +94,8 @@ class FRCSuperList {
 		if ( array_key_exists( 'flaggedrevs_state', $aFilters ) ) {
 			if ( !$aFilters['flaggedrevs_state'][0]['value'] ) {
 				$aFilters['flaggedrevs_state'][0]['value'] = 0;
-			} else { $aFilters['flaggedrevs_state'][0]['value'] = 1;
+			} else {
+				$aFilters['flaggedrevs_state'][0]['value'] = 1;
 			}
 			$aConditions[] = "IF(ISNULL(fp.fp_stable), 0, 1) = "
 				. intval( $aFilters['flaggedrevs_state'][0]['value'] );
@@ -109,7 +110,8 @@ class FRCSuperList {
 		if ( array_key_exists( 'flaggedrevs_is_new_available', $aFilters ) ) {
 			if ( !$aFilters['flaggedrevs_is_new_available'][0]['value'] ) {
 				$aFilters['flaggedrevs_is_new_available'][0]['value'] = 0;
-			} else { $aFilters['flaggedrevs_is_new_available'][0]['value'] = 1;
+			} else {
+				$aFilters['flaggedrevs_is_new_available'][0]['value'] = 1;
 			}
 
 			$aConditions[] = "(fp.fp_stable<=>{$sTablePrefix}page.page_latest) != "
diff --git a/maintenance/BSBatchReview.php b/maintenance/BSBatchReview.php
index faf6250..76fac23 100644
--- a/maintenance/BSBatchReview.php
+++ b/maintenance/BSBatchReview.php
@@ -206,7 +206,7 @@ class BSBatchReview extends Maintenance {
 
 		$article = new \FlaggableWikiPage( $title );
 		// Now get the template and image parameters needed
-		list( $templateIds, $fileTimeKeys ) =
+		[ $templateIds, $fileTimeKeys ] =
 			\FRInclusionCache::getRevIncludes( $article, $deprecatedRevision, $user );
 		// Get version parameters for review submission (flat strings)
 		$templateParams = \RevisionReviewForm::getIncludeParams( $templateIds );
diff --git a/maintenance/BSFixReadConfirmations.php b/maintenance/BSFixReadConfirmations.php
index e8abc67..25fec81 100644
--- a/maintenance/BSFixReadConfirmations.php
+++ b/maintenance/BSFixReadConfirmations.php
@@ -105,11 +105,10 @@ class BSFixReadConfirmations extends Maintenance {
 
 					return $nextRevisionId;
 				}
-			}
- else {
+			} else {
 				// End of revision history reached
 				return null;
- }
+			}
 
 			$revision = $nextRevision;
 		}
@@ -133,11 +132,10 @@ class BSFixReadConfirmations extends Maintenance {
 
 					return $prevRevisionId;
 				}
-			}
- else {
+			} else {
 				// End of revision history reached
 				return null;
- }
+			}
 
 			$revision = $prevRevision;
 		}
diff --git a/src/Data/FlaggedPages/PrimaryDataProvider.php b/src/Data/FlaggedPages/PrimaryDataProvider.php
index c009162..0fa21e5 100644
--- a/src/Data/FlaggedPages/PrimaryDataProvider.php
+++ b/src/Data/FlaggedPages/PrimaryDataProvider.php
@@ -219,7 +219,7 @@ class PrimaryDataProvider extends PageDataProvider {
 			$state = FlaggedRevsConnector::STATE_NOT_ENABLED;
 			$revisionsSinceStable = 0;
 		} else {
-			list( $state, $revisionsSinceStable ) = $this->getFlaggedRevsOutput( $title );
+			[ $state, $revisionsSinceStable ] = $this->getFlaggedRevsOutput( $title );
 		}
 
 		// Give grep a chance:
diff --git a/src/DocumentStatePropertyValueProvider.php b/src/DocumentStatePropertyValueProvider.php
index 83fda22..51ec5f4 100644
--- a/src/DocumentStatePropertyValueProvider.php
+++ b/src/DocumentStatePropertyValueProvider.php
@@ -129,15 +129,14 @@ class DocumentStatePropertyValueProvider extends PropertyValueProvider {
 		$value = $this->makeValue( 'unapproved' );
 		if ( $this->latestRevisionIsApproved() ) {
 			$value = $this->makeValue( 'approved' );
-		}
- elseif ( $this->someRevisionIsApproved() ) {
+		} elseif ( $this->someRevisionIsApproved() ) {
 			$value = $this->makeValue( 'in-revision' );
 
 			// This is ugly, but we need to do this somewhere... And better here than in Review extension
 			if ( $this->reviewWorkflowInProgess() ) {
 				$value = $this->makeValue( 'approval-requested' );
 			}
- }
+		}
 
 		$semanticData->addPropertyObjectValue(
 			$property, new SMWDIBlob( $value )
diff --git a/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php b/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php
index 9350a01..a822bae 100644
--- a/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php
+++ b/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php
@@ -70,10 +70,10 @@ class AutoReviewAfterVisualEditorEdit extends PageSaveComplete {
 		$article = new FlaggableWikiPage( $title );
 
 		// Now get the template and image parameters needed
-		list( $templateIds, $fileTimeKeys ) =
+		[ $templateIds, $fileTimeKeys ] =
 			FRInclusionCache::getRevIncludes( $article, $revision, $user );
 		// Get version parameters for review submission (flat strings)
-		list( $templateParams, $imageParams, $fileParam ) =
+		[ $templateParams, $imageParams, $fileParam ] =
 			RevisionReviewForm::getIncludeParams( $templateIds );
 		// Set the version parameters...
 		$form->setTemplateParams( $templateParams );
diff --git a/src/Panel/Flyout.php b/src/Panel/Flyout.php
index f085708..d52f22c 100644
--- a/src/Panel/Flyout.php
+++ b/src/Panel/Flyout.php
@@ -163,14 +163,13 @@ class Flyout extends BasePanel implements IFlyout {
 			$hint = Message::newFromKey(
 				'bs-flaggedrevsconnector-flyout-body-hint-draft-implicit'
 			)->text();
-		}
- else {
+		} else {
 			$hint = Message::newFromKey(
 				'bs-flaggedrevsconnector-flyout-body-hint-draft',
 				count( $this->draftRevisionsAfterCurrentStable ),
 				implode( ', ', $links )
-			)->text();
- }
+				   )->text();
+		}
 
 		return \Html::rawElement(
 			'div',
diff --git a/src/Utils.php b/src/Utils.php
index 9446984..f1f64eb 100644
--- a/src/Utils.php
+++ b/src/Utils.php
@@ -152,10 +152,10 @@ class Utils {
 
 		$article = new FlaggableWikiPage( $title );
 		// Now get the template and image parameters needed
-		list( $templateIds, $fileTimeKeys ) =
+		[ $templateIds, $fileTimeKeys ] =
 			FRInclusionCache::getRevIncludes( $article, $revision, $user );
 		// Get version parameters for review submission (flat strings)
-		list( $templateParams, $imageParams, $fileParam ) =
+		[ $templateParams, $imageParams, $fileParam ] =
 			RevisionReviewForm::getIncludeParams( $templateIds );
 		// Set the version parameters...
 		$form->setTemplateParams( $templateParams );
diff --git a/src/Workflows/Activity/ApprovePageActivity.php b/src/Workflows/Activity/ApprovePageActivity.php
index 936dfc8..46ef325 100644
--- a/src/Workflows/Activity/ApprovePageActivity.php
+++ b/src/Workflows/Activity/ApprovePageActivity.php
@@ -95,7 +95,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-context-data-missing'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 
@@ -108,7 +108,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-context-invalid-title'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 		$this->title = $title;
@@ -121,7 +121,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-title-rev-mismatch'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 		$this->revision = $revision;
@@ -134,7 +134,7 @@ class ApprovePageActivity extends GenericActivity {
 				throw new WorkflowExecutionException(
 					Message::newFromKey(
 						'bs-flaggedrevsconnector-wfactivity-error-provided-user', $data['user']
-					)->text(),  $this->getTask()
+					)->text(), $this->getTask()
 				);
 			}
 		} elseif ( $context->isRunningAsBot() ) {
@@ -146,7 +146,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-no-user'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 	}
-- 
2.39.2

$ date
--- stdout ---
Mon Mar 18 13:26:36 UTC 2024

--- end ---
$ git clone file:///srv/git/mediawiki-extensions-BlueSpiceFlaggedRevsConnector.git repo --depth=1 -b master
--- stderr ---
Cloning into 'repo'...
--- stdout ---

--- end ---
$ git config user.name libraryupgrader
--- stdout ---

--- end ---
$ git config user.email tools.libraryupgrader@tools.wmflabs.org
--- stdout ---

--- end ---
$ git submodule update --init
--- stdout ---

--- end ---
$ grr init
--- stdout ---
Installed commit-msg hook.

--- end ---
$ git show-ref refs/heads/master
--- stdout ---
cbccb64a469fcb40be541037c3ed4903344ca4d7 refs/heads/master

--- end ---
$ /usr/bin/npm audit --json
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {},
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 0,
      "high": 0,
      "critical": 0,
      "total": 0
    },
    "dependencies": {
      "prod": 1,
      "dev": 460,
      "optional": 0,
      "peer": 10,
      "peerOptional": 0,
      "total": 460
    }
  }
}

--- end ---
$ /usr/bin/composer install
--- stderr ---
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 20 installs, 0 updates, 0 removals
  - Locking composer/installers (v2.2.0)
  - Locking composer/semver (3.3.2)
  - Locking composer/spdx-licenses (1.5.8)
  - Locking mediawiki/mediawiki-codesniffer (v41.0.0)
  - Locking mediawiki/minus-x (1.1.1)
  - Locking php-parallel-lint/php-console-color (v1.0.1)
  - Locking php-parallel-lint/php-console-highlighter (v1.0.0)
  - Locking php-parallel-lint/php-parallel-lint (v1.3.2)
  - Locking psr/container (2.0.2)
  - Locking squizlabs/php_codesniffer (3.7.2)
  - Locking symfony/console (v5.4.36)
  - Locking symfony/deprecation-contracts (v3.4.0)
  - Locking symfony/polyfill-ctype (v1.29.0)
  - Locking symfony/polyfill-intl-grapheme (v1.29.0)
  - Locking symfony/polyfill-intl-normalizer (v1.29.0)
  - Locking symfony/polyfill-mbstring (v1.29.0)
  - Locking symfony/polyfill-php73 (v1.29.0)
  - Locking symfony/polyfill-php80 (v1.29.0)
  - Locking symfony/service-contracts (v3.4.1)
  - Locking symfony/string (v6.4.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals
    0 [>---------------------------]    0 [->--------------------------]
  - Installing composer/installers (v2.2.0): Extracting archive
  - Installing symfony/polyfill-php80 (v1.29.0): Extracting archive
  - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.29.0): Extracting archive
  - Installing composer/spdx-licenses (1.5.8): Extracting archive
  - Installing composer/semver (3.3.2): Extracting archive
  - Installing mediawiki/mediawiki-codesniffer (v41.0.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.29.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.29.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.29.0): Extracting archive
  - Installing symfony/string (v6.4.4): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing symfony/service-contracts (v3.4.1): Extracting archive
  - Installing symfony/polyfill-php73 (v1.29.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.4.0): Extracting archive
  - Installing symfony/console (v5.4.36): Extracting archive
  - Installing mediawiki/minus-x (1.1.1): Extracting archive
  - Installing php-parallel-lint/php-console-color (v1.0.1): Extracting archive
  - Installing php-parallel-lint/php-console-highlighter (v1.0.0): Extracting archive
  - Installing php-parallel-lint/php-parallel-lint (v1.3.2): Extracting archive
  0/19 [>---------------------------]   0%
 19/19 [============================] 100%
4 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
14 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
--- stdout ---

--- end ---
Upgrading c:mediawiki/mediawiki-codesniffer from 41.0.0 -> 43.0.0
$ /usr/bin/composer update
--- stderr ---
Loading composer repositories with package information
Updating dependencies
Lock file operations: 3 installs, 3 updates, 0 removals
  - Upgrading composer/semver (3.3.2 => 3.4.0)
  - Locking dealerdirect/phpcodesniffer-composer-installer (v1.0.0)
  - Upgrading mediawiki/mediawiki-codesniffer (v41.0.0 => v43.0.0)
  - Locking phpcsstandards/phpcsextra (1.1.2)
  - Locking phpcsstandards/phpcsutils (1.0.9)
  - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 3 installs, 3 updates, 0 removals
    0 [>---------------------------]    0 [->--------------------------]
  - Upgrading squizlabs/php_codesniffer (3.7.2 => 3.8.1): Extracting archive
  - Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive
  - Installing phpcsstandards/phpcsutils (1.0.9): Extracting archive
  - Installing phpcsstandards/phpcsextra (1.1.2): Extracting archive
  - Upgrading composer/semver (3.3.2 => 3.4.0): Extracting archive
  - Upgrading mediawiki/mediawiki-codesniffer (v41.0.0 => v43.0.0): Extracting archive
 0/4 [>---------------------------]   0%
 4/4 [============================] 100%
Generating autoload files
15 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
--- stdout ---
PHP CodeSniffer Config installed_paths set to ../../mediawiki/mediawiki-codesniffer,../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils

--- end ---
{'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic', 'MediaWiki.Commenting.FunctionComment.ObjectTypeHintParam', 'MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected', 'MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName'}
Tests fail!
$ vendor/bin/phpcbf
--- stdout ---

PHPCBF RESULT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            FIXED  REMAINING
--------------------------------------------------------------------------------
/src/repo/includes/FRCInfobox.class.php                         1      3
/src/repo/maintenance/BSBatchReview.php                         1      1
/src/repo/includes/FRCHistoryView.class.php                     1      1
/src/repo/includes/FRCSuperList.class.php                       2      0
/src/repo/src/DocumentStatePropertyValueProvider.php            3      0
/src/repo/maintenance/BSFixReadConfirmations.php                6      0
/src/repo/src/Data/FlaggedPages/PrimaryDataProvider.php         1      0
...c/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php  2      0
/src/repo/src/Workflows/Activity/ApprovePageActivity.php        5      0
/src/repo/src/Utils.php                                         2      0
/src/repo/src/Panel/Flyout.php                                  4      0
--------------------------------------------------------------------------------
A TOTAL OF 28 ERRORS WERE FIXED IN 11 FILES
--------------------------------------------------------------------------------

Time: 701ms; Memory: 6MB



--- end ---
$ git checkout .phpcs.xml
--- stderr ---
Updated 1 path from the index
--- stdout ---

--- end ---
$ /usr/bin/composer install
--- stderr ---
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
15 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
--- stdout ---

--- end ---
$ /usr/bin/composer test
--- stderr ---
> parallel-lint . --exclude vendor --exclude node_modules
> minus-x check .
> phpcs -sp --cache
--- stdout ---
PHP 8.2.7 | 10 parallel jobs
............................................................ 60/88 (68 %)
............................                                 88/88 (100 %)


Checked 88 files in 0.4 seconds
No syntax error found
MinusX
======
Processing /src/repo...
.............................................................
.............................................................
.............................................................
...............
All good!
............................................ 44 / 44 (100%)


Time: 285ms; Memory: 10MB


--- end ---
$ /usr/bin/npm audit --json
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {},
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 0,
      "high": 0,
      "critical": 0,
      "total": 0
    },
    "dependencies": {
      "prod": 1,
      "dev": 460,
      "optional": 0,
      "peer": 10,
      "peerOptional": 0,
      "total": 460
    }
  }
}

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate

$ git add .
--- stdout ---

--- end ---
$ git commit -F /tmp/tmp2gk2i6gi
--- stdout ---
[master 0e861cc] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0
 13 files changed, 30 insertions(+), 30 deletions(-)

--- end ---
$ git format-patch HEAD~1 --stdout
--- stdout ---
From 0e861cc006122bb9f05bd89ba3b29ca3e274a5bf Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Mon, 18 Mar 2024 13:26:45 +0000
Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 43.0.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate

Change-Id: Id5ab14f8580c3910e9f03dda7e49b9612e59a988
---
 .phpcs.xml                                             |  1 +
 composer.json                                          |  5 +++--
 includes/FRCHistoryView.class.php                      |  2 +-
 includes/FRCInfobox.class.php                          |  2 +-
 includes/FRCSuperList.class.php                        |  6 ++++--
 maintenance/BSBatchReview.php                          |  2 +-
 maintenance/BSFixReadConfirmations.php                 | 10 ++++------
 src/Data/FlaggedPages/PrimaryDataProvider.php          |  2 +-
 src/DocumentStatePropertyValueProvider.php             |  5 ++---
 .../AutoReviewAfterVisualEditorEdit.php                |  4 ++--
 src/Panel/Flyout.php                                   |  7 +++----
 src/Utils.php                                          |  4 ++--
 src/Workflows/Activity/ApprovePageActivity.php         | 10 +++++-----
 13 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/.phpcs.xml b/.phpcs.xml
index cd1922f..2959c12 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <ruleset>
 	<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+		<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
 		<exclude name="MediaWiki.Commenting.FunctionComment.ObjectTypeHintParam" />
 		<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected" />
 		<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic" />
diff --git a/composer.json b/composer.json
index 28064f5..e328e5a 100644
--- a/composer.json
+++ b/composer.json
@@ -12,7 +12,7 @@
 		}
 	},
 	"require-dev": {
-		"mediawiki/mediawiki-codesniffer": "41.0.0",
+		"mediawiki/mediawiki-codesniffer": "43.0.0",
 		"mediawiki/minus-x": "1.1.1",
 		"php-parallel-lint/php-console-highlighter": "1.0.0",
 		"php-parallel-lint/php-parallel-lint": "1.3.2"
@@ -34,7 +34,8 @@
 	},
 	"config": {
 		"allow-plugins": {
-			"composer/installers": true
+			"composer/installers": true,
+			"dealerdirect/phpcodesniffer-composer-installer": true
 		}
 	}
 }
diff --git a/includes/FRCHistoryView.class.php b/includes/FRCHistoryView.class.php
index aca3837..71497a8 100644
--- a/includes/FRCHistoryView.class.php
+++ b/includes/FRCHistoryView.class.php
@@ -56,7 +56,7 @@ class FRCHistoryView {
 	protected static function getComment( $timestamp, $pageId ) {
 		$dbr = wfGetDB( DB_REPLICA );
 		$logRow = $dbr->selectRow(
-			[ 'logging' , 'comment' ],
+			[ 'logging', 'comment' ],
 			'comment_text',
 			[
 				'log_page' => $pageId,
diff --git a/includes/FRCInfobox.class.php b/includes/FRCInfobox.class.php
index 841226e..4643650 100644
--- a/includes/FRCInfobox.class.php
+++ b/includes/FRCInfobox.class.php
@@ -68,7 +68,7 @@ class FRCInfobox {
 		$sUlPrefix = '';
 		$sUlSuffix = '';
 
-		$this->iFRInfoboxElementCounter ++;
+		$this->iFRInfoboxElementCounter++;
 		$sULLastPrefix = $args['count'] == $this->iFRInfoboxElementCounter ? '</ul>' : '';
 
 		if ( substr( $res->fr_timestamp, 0, 8 ) != $this->iFREntryDate ) {
diff --git a/includes/FRCSuperList.class.php b/includes/FRCSuperList.class.php
index 23d4330..629c5ff 100644
--- a/includes/FRCSuperList.class.php
+++ b/includes/FRCSuperList.class.php
@@ -94,7 +94,8 @@ class FRCSuperList {
 		if ( array_key_exists( 'flaggedrevs_state', $aFilters ) ) {
 			if ( !$aFilters['flaggedrevs_state'][0]['value'] ) {
 				$aFilters['flaggedrevs_state'][0]['value'] = 0;
-			} else { $aFilters['flaggedrevs_state'][0]['value'] = 1;
+			} else {
+				$aFilters['flaggedrevs_state'][0]['value'] = 1;
 			}
 			$aConditions[] = "IF(ISNULL(fp.fp_stable), 0, 1) = "
 				. intval( $aFilters['flaggedrevs_state'][0]['value'] );
@@ -109,7 +110,8 @@ class FRCSuperList {
 		if ( array_key_exists( 'flaggedrevs_is_new_available', $aFilters ) ) {
 			if ( !$aFilters['flaggedrevs_is_new_available'][0]['value'] ) {
 				$aFilters['flaggedrevs_is_new_available'][0]['value'] = 0;
-			} else { $aFilters['flaggedrevs_is_new_available'][0]['value'] = 1;
+			} else {
+				$aFilters['flaggedrevs_is_new_available'][0]['value'] = 1;
 			}
 
 			$aConditions[] = "(fp.fp_stable<=>{$sTablePrefix}page.page_latest) != "
diff --git a/maintenance/BSBatchReview.php b/maintenance/BSBatchReview.php
index faf6250..76fac23 100644
--- a/maintenance/BSBatchReview.php
+++ b/maintenance/BSBatchReview.php
@@ -206,7 +206,7 @@ class BSBatchReview extends Maintenance {
 
 		$article = new \FlaggableWikiPage( $title );
 		// Now get the template and image parameters needed
-		list( $templateIds, $fileTimeKeys ) =
+		[ $templateIds, $fileTimeKeys ] =
 			\FRInclusionCache::getRevIncludes( $article, $deprecatedRevision, $user );
 		// Get version parameters for review submission (flat strings)
 		$templateParams = \RevisionReviewForm::getIncludeParams( $templateIds );
diff --git a/maintenance/BSFixReadConfirmations.php b/maintenance/BSFixReadConfirmations.php
index e8abc67..25fec81 100644
--- a/maintenance/BSFixReadConfirmations.php
+++ b/maintenance/BSFixReadConfirmations.php
@@ -105,11 +105,10 @@ class BSFixReadConfirmations extends Maintenance {
 
 					return $nextRevisionId;
 				}
-			}
- else {
+			} else {
 				// End of revision history reached
 				return null;
- }
+			}
 
 			$revision = $nextRevision;
 		}
@@ -133,11 +132,10 @@ class BSFixReadConfirmations extends Maintenance {
 
 					return $prevRevisionId;
 				}
-			}
- else {
+			} else {
 				// End of revision history reached
 				return null;
- }
+			}
 
 			$revision = $prevRevision;
 		}
diff --git a/src/Data/FlaggedPages/PrimaryDataProvider.php b/src/Data/FlaggedPages/PrimaryDataProvider.php
index c009162..0fa21e5 100644
--- a/src/Data/FlaggedPages/PrimaryDataProvider.php
+++ b/src/Data/FlaggedPages/PrimaryDataProvider.php
@@ -219,7 +219,7 @@ class PrimaryDataProvider extends PageDataProvider {
 			$state = FlaggedRevsConnector::STATE_NOT_ENABLED;
 			$revisionsSinceStable = 0;
 		} else {
-			list( $state, $revisionsSinceStable ) = $this->getFlaggedRevsOutput( $title );
+			[ $state, $revisionsSinceStable ] = $this->getFlaggedRevsOutput( $title );
 		}
 
 		// Give grep a chance:
diff --git a/src/DocumentStatePropertyValueProvider.php b/src/DocumentStatePropertyValueProvider.php
index 83fda22..51ec5f4 100644
--- a/src/DocumentStatePropertyValueProvider.php
+++ b/src/DocumentStatePropertyValueProvider.php
@@ -129,15 +129,14 @@ class DocumentStatePropertyValueProvider extends PropertyValueProvider {
 		$value = $this->makeValue( 'unapproved' );
 		if ( $this->latestRevisionIsApproved() ) {
 			$value = $this->makeValue( 'approved' );
-		}
- elseif ( $this->someRevisionIsApproved() ) {
+		} elseif ( $this->someRevisionIsApproved() ) {
 			$value = $this->makeValue( 'in-revision' );
 
 			// This is ugly, but we need to do this somewhere... And better here than in Review extension
 			if ( $this->reviewWorkflowInProgess() ) {
 				$value = $this->makeValue( 'approval-requested' );
 			}
- }
+		}
 
 		$semanticData->addPropertyObjectValue(
 			$property, new SMWDIBlob( $value )
diff --git a/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php b/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php
index 9350a01..a822bae 100644
--- a/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php
+++ b/src/Hook/PageSaveComplete/AutoReviewAfterVisualEditorEdit.php
@@ -70,10 +70,10 @@ class AutoReviewAfterVisualEditorEdit extends PageSaveComplete {
 		$article = new FlaggableWikiPage( $title );
 
 		// Now get the template and image parameters needed
-		list( $templateIds, $fileTimeKeys ) =
+		[ $templateIds, $fileTimeKeys ] =
 			FRInclusionCache::getRevIncludes( $article, $revision, $user );
 		// Get version parameters for review submission (flat strings)
-		list( $templateParams, $imageParams, $fileParam ) =
+		[ $templateParams, $imageParams, $fileParam ] =
 			RevisionReviewForm::getIncludeParams( $templateIds );
 		// Set the version parameters...
 		$form->setTemplateParams( $templateParams );
diff --git a/src/Panel/Flyout.php b/src/Panel/Flyout.php
index f085708..d52f22c 100644
--- a/src/Panel/Flyout.php
+++ b/src/Panel/Flyout.php
@@ -163,14 +163,13 @@ class Flyout extends BasePanel implements IFlyout {
 			$hint = Message::newFromKey(
 				'bs-flaggedrevsconnector-flyout-body-hint-draft-implicit'
 			)->text();
-		}
- else {
+		} else {
 			$hint = Message::newFromKey(
 				'bs-flaggedrevsconnector-flyout-body-hint-draft',
 				count( $this->draftRevisionsAfterCurrentStable ),
 				implode( ', ', $links )
-			)->text();
- }
+				   )->text();
+		}
 
 		return \Html::rawElement(
 			'div',
diff --git a/src/Utils.php b/src/Utils.php
index 9446984..f1f64eb 100644
--- a/src/Utils.php
+++ b/src/Utils.php
@@ -152,10 +152,10 @@ class Utils {
 
 		$article = new FlaggableWikiPage( $title );
 		// Now get the template and image parameters needed
-		list( $templateIds, $fileTimeKeys ) =
+		[ $templateIds, $fileTimeKeys ] =
 			FRInclusionCache::getRevIncludes( $article, $revision, $user );
 		// Get version parameters for review submission (flat strings)
-		list( $templateParams, $imageParams, $fileParam ) =
+		[ $templateParams, $imageParams, $fileParam ] =
 			RevisionReviewForm::getIncludeParams( $templateIds );
 		// Set the version parameters...
 		$form->setTemplateParams( $templateParams );
diff --git a/src/Workflows/Activity/ApprovePageActivity.php b/src/Workflows/Activity/ApprovePageActivity.php
index 936dfc8..46ef325 100644
--- a/src/Workflows/Activity/ApprovePageActivity.php
+++ b/src/Workflows/Activity/ApprovePageActivity.php
@@ -95,7 +95,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-context-data-missing'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 
@@ -108,7 +108,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-context-invalid-title'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 		$this->title = $title;
@@ -121,7 +121,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-title-rev-mismatch'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 		$this->revision = $revision;
@@ -134,7 +134,7 @@ class ApprovePageActivity extends GenericActivity {
 				throw new WorkflowExecutionException(
 					Message::newFromKey(
 						'bs-flaggedrevsconnector-wfactivity-error-provided-user', $data['user']
-					)->text(),  $this->getTask()
+					)->text(), $this->getTask()
 				);
 			}
 		} elseif ( $context->isRunningAsBot() ) {
@@ -146,7 +146,7 @@ class ApprovePageActivity extends GenericActivity {
 			throw new WorkflowExecutionException(
 				Message::newFromKey(
 					'bs-flaggedrevsconnector-wfactivity-error-no-user'
-				)->text(),  $this->getTask()
+				)->text(), $this->getTask()
 			);
 		}
 	}
-- 
2.39.2


--- end ---
Source code is licensed under the AGPL.