From af6ecdecf703d73805a1c4c91f0f3ad74af961bc Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 10 Mar 2024 17:18:48 +0100 Subject: [PATCH] build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0 Change-Id: I5b46168e1e845747ae0a92b28a7f9e56e06309aa --- MathCaptcha/includes/MathCaptcha.php | 6 +++--- composer.json | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/MathCaptcha/includes/MathCaptcha.php b/MathCaptcha/includes/MathCaptcha.php index b840061bf..e960f75fc 100644 --- a/MathCaptcha/includes/MathCaptcha.php +++ b/MathCaptcha/includes/MathCaptcha.php @@ -24,7 +24,7 @@ class MathCaptcha extends SimpleCaptcha { * @param array &$resultArr */ protected function addCaptchaAPI( &$resultArr ) { - list( $sum, $answer ) = $this->pickSum(); + [ $sum, $answer ] = $this->pickSum(); $html = $this->fetchMath( $sum ); $index = $this->storeCaptcha( [ 'answer' => $answer ] ); $resultArr['captcha'] = $this->describeCaptchaType(); @@ -47,7 +47,7 @@ class MathCaptcha extends SimpleCaptcha { * @return array */ public function getFormInformation( $tabIndex = 1 ) { - list( $sum, $answer ) = $this->pickSum(); + [ $sum, $answer ] = $this->pickSum(); $index = $this->storeCaptcha( [ 'answer' => $answer ] ); $form = ''; @@ -89,7 +89,7 @@ class MathCaptcha extends SimpleCaptcha { * @return array */ public function getCaptcha() { - list( $sum, $answer ) = $this->pickSum(); + [ $sum, $answer ] = $this->pickSum(); return [ 'question' => $sum, 'answer' => $answer ]; } diff --git a/composer.json b/composer.json index 85f7cdef2..ec3ee8442 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "mediawiki/mediawiki-codesniffer": "41.0.0", + "mediawiki/mediawiki-codesniffer": "43.0.0", "mediawiki/mediawiki-phan-config": "0.14.0", "mediawiki/minus-x": "1.1.1", "php-parallel-lint/php-console-highlighter": "1.0.0", @@ -18,5 +18,10 @@ ], "phan": "phan -d . --long-progress-bar", "phpcs": "phpcs -sp --cache" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } }
' . $this->fetchMath( $sum ) . '