build: Updating composer dependencies

* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I5e0b9e78f0436355cc21dc356fb78e96e59cb536
This commit is contained in:
libraryupgrader 2021-05-04 07:24:31 +00:00
parent 1f084d6507
commit c3c98c1146
5 changed files with 7 additions and 7 deletions

View file

@ -1,10 +1,10 @@
{
"require-dev": {
"mediawiki/mediawiki-codesniffer": "35.0.0",
"mediawiki/mediawiki-codesniffer": "36.0.0",
"mediawiki/mediawiki-phan-config": "0.10.6",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "0.5.0",
"php-parallel-lint/php-parallel-lint": "1.2.0"
"php-parallel-lint/php-parallel-lint": "1.3.0"
},
"scripts": {
"fix": [

View file

@ -88,7 +88,7 @@ class Gadget {
*/
public static function newFromDefinitionContent( $id, GadgetDefinitionContent $content ) {
$data = $content->getAssocArray();
$prefixGadgetNs = function ( $page ) {
$prefixGadgetNs = static function ( $page ) {
return 'Gadget:' . $page;
};
$info = [

View file

@ -46,7 +46,7 @@ class GadgetDefinitionNamespaceRepo extends GadgetRepo {
return $this->wanCache->getWithSetCallback(
$key,
self::CACHE_TTL,
function ( $oldValue, &$ttl, array &$setOpts ) use ( $fname ) {
static function ( $oldValue, &$ttl, array &$setOpts ) use ( $fname ) {
$dbr = wfGetDB( DB_REPLICA );
$setOpts += Database::getCacheSetOptions( $dbr );

View file

@ -106,7 +106,7 @@ class MediaWikiGadgetsDefinitionRepo extends GadgetRepo {
$value = $wanCache->getWithSetCallback(
$key,
Gadget::CACHE_TTL,
function ( $old, &$ttl, &$setOpts ) use ( $us ) {
static function ( $old, &$ttl, &$setOpts ) use ( $us ) {
$setOpts += Database::getCacheSetOptions( wfGetDB( DB_REPLICA ) );
$now = microtime( true );

View file

@ -69,11 +69,11 @@ class GadgetTest extends MediaWikiUnitTestCase {
*/
public function testIsAllowed() {
$user = $this->getMockBuilder( User::class )
->setMethods( [ 'isAllowedAll' ] )
->onlyMethods( [ 'isAllowedAll' ] )
->getMock();
$user->method( 'isAllowedAll' )
->willReturnCallback(
function ( ...$rights ) {
static function ( ...$rights ) {
return array_diff( $rights, [ 'test' ] ) === [];
}
);