mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TextExtracts
synced 2024-11-23 15:56:52 +00:00
build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: I7a3887f4fac7c4e78e0828fca52d0c355357e5b1
This commit is contained in:
parent
ee498dc2a2
commit
74bdf0a7dd
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -315,7 +315,7 @@ class ApiQueryExtracts extends ApiQueryBase {
|
|||
'url' => $this->getRequest()->getFullRequestURL(),
|
||||
'exception' => $apiException,
|
||||
'request' => $request
|
||||
] );
|
||||
] );
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue