build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0

Change-Id: I7a3887f4fac7c4e78e0828fca52d0c355357e5b1
This commit is contained in:
Umherirrender 2024-03-12 20:22:40 +01:00
parent ee498dc2a2
commit 74bdf0a7dd
3 changed files with 8 additions and 3 deletions

View file

@ -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
}
}
}

View file

@ -315,7 +315,7 @@ class ApiQueryExtracts extends ApiQueryBase {
'url' => $this->getRequest()->getFullRequestURL(),
'exception' => $apiException,
'request' => $request
] );
] );
return null;
}

View file

@ -61,7 +61,7 @@ class TextTruncator {
}
$index = min( $requestedSentenceCount, $res ) - 1;
list( $tail, $length ) = $matches[0][$index];
[ $tail, $length ] = $matches[0][$index];
// PCRE returns raw offsets, so using substr() instead of mb_substr()
$text = substr( $text, 0, $length ) . $tail;