build: Updating mediawiki/mediawiki-codesniffer to 22.0.0

And updating CoC link to use Special:MyLanguage (T202047).

Change-Id: I091003f69b82c7cacc4cda320a38b1b07f3cdb6b
This commit is contained in:
libraryupgrader 2018-09-03 18:08:53 +00:00 committed by jenkins-bot
parent d1844ed5f6
commit 8b489ca160
7 changed files with 18 additions and 18 deletions

View file

@ -1 +1 @@
The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct).

View file

@ -1,7 +1,7 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "1.0.0",
"mediawiki/mediawiki-codesniffer": "21.0.0",
"mediawiki/mediawiki-codesniffer": "22.0.0",
"mediawiki/lua-sandbox": "3.0.1",
"mediawiki/minus-x": "0.3.1",
"jakub-onderka/php-console-highlighter": "0.3.2",

View file

@ -171,7 +171,7 @@ class ScribuntoHooks {
// #iferror-compatible error element
return "<strong class=\"error\"><span class=\"scribunto-error\" id=\"$id\">" .
$parserError. "</span></strong>";
$parserError . "</span></strong>";
}
}

View file

@ -272,7 +272,7 @@ class Scribunto_LuaLanguageLibrary extends Scribunto_LuaLibraryBase {
} else {
# Correct for DateTime interpreting 'XXXX' as XX:XX o'clock
if ( preg_match( '/^[0-9]{4}$/', $date ) ) {
$date = '00:00 '.$date;
$date = '00:00 ' . $date;
}
$cacheKey = $date;

View file

@ -222,7 +222,7 @@ class Scribunto_LuaUstringLibrary extends Scribunto_LuaLibraryBase {
return [ mb_strlen( $s, 'UTF-8' ) ];
}
public function ustringSub( $s, $i=1, $j=-1 ) {
public function ustringSub( $s, $i = 1, $j = -1 ) {
$this->checkString( 'sub', $s );
$this->checkTypeOptional( 'sub', 2, $i, 'number', 1 );
$this->checkTypeOptional( 'sub', 3, $j, 'number', -1 );

View file

@ -245,7 +245,7 @@ class Scribunto_LuaStandaloneInterpreter extends Scribunto_LuaInterpreter {
$cmd = '"' . $cmd . '"';
}
$this->logger->debug( __METHOD__.": creating interpreter: $cmd\n" );
$this->logger->debug( __METHOD__ . ": creating interpreter: $cmd\n" );
// Check whether proc_open is available before trying to call it (e.g.
// PHP's disable_functions may have removed it)
@ -316,7 +316,7 @@ class Scribunto_LuaStandaloneInterpreter extends Scribunto_LuaInterpreter {
public function terminate() {
if ( $this->proc ) {
$this->logger->debug( __METHOD__.": terminating\n" );
$this->logger->debug( __METHOD__ . ": terminating\n" );
proc_terminate( $this->proc );
proc_close( $this->proc );
$this->proc = false;
@ -357,10 +357,10 @@ class Scribunto_LuaStandaloneInterpreter extends Scribunto_LuaInterpreter {
public function callFunction( $func /* ... */ ) {
if ( !( $func instanceof Scribunto_LuaStandaloneInterpreterFunction ) ) {
throw new MWException( __METHOD__.': invalid function type' );
throw new MWException( __METHOD__ . ': invalid function type' );
}
if ( $func->interpreterId !== $this->id ) {
throw new MWException( __METHOD__.': function belongs to a different interpreter' );
throw new MWException( __METHOD__ . ': function belongs to a different interpreter' );
}
$args = func_get_args();
unset( $args[0] );
@ -503,7 +503,7 @@ class Scribunto_LuaStandaloneInterpreter extends Scribunto_LuaInterpreter {
$this->handleError( $msgFromLua );
return; // not reached
default:
$this->logger->error( __METHOD__ .": invalid response op \"{$msgFromLua['op']}\"\n" );
$this->logger->error( __METHOD__ . ": invalid response op \"{$msgFromLua['op']}\"\n" );
throw $this->engine->newException( 'scribunto-luastandalone-decode-error' );
}
}
@ -571,7 +571,7 @@ class Scribunto_LuaStandaloneInterpreter extends Scribunto_LuaInterpreter {
*/
protected function encodeLuaVar( $var, $level = 0 ) {
if ( $level > 100 ) {
throw new MWException( __METHOD__.': recursion depth limit exceeded' );
throw new MWException( __METHOD__ . ': recursion depth limit exceeded' );
}
$type = gettype( $var );
switch ( $type ) {
@ -590,7 +590,7 @@ class Scribunto_LuaStandaloneInterpreter extends Scribunto_LuaInterpreter {
if ( $var === -INF ) {
return '(-1/0)';
}
throw new MWException( __METHOD__.': cannot convert non-finite number' );
throw new MWException( __METHOD__ . ': cannot convert non-finite number' );
}
return sprintf( '%.17g', $var );
case 'string':
@ -622,21 +622,21 @@ class Scribunto_LuaStandaloneInterpreter extends Scribunto_LuaInterpreter {
return $s;
case 'object':
if ( !( $var instanceof Scribunto_LuaStandaloneInterpreterFunction ) ) {
throw new MWException( __METHOD__.': unable to convert object of type ' .
throw new MWException( __METHOD__ . ': unable to convert object of type ' .
get_class( $var ) );
} elseif ( $var->interpreterId !== $this->id ) {
throw new MWException(
__METHOD__.': unable to convert function belonging to a different interpreter'
__METHOD__ . ': unable to convert function belonging to a different interpreter'
);
} else {
return 'chunks[' . intval( $var->id ) . ']';
return 'chunks[' . intval( $var->id ) . ']';
}
case 'resource':
throw new MWException( __METHOD__.': unable to convert resource' );
throw new MWException( __METHOD__ . ': unable to convert resource' );
case 'NULL':
return 'nil';
default:
throw new MWException( __METHOD__.': unable to convert variable of unknown type' );
throw new MWException( __METHOD__ . ': unable to convert variable of unknown type' );
}
}

View file

@ -245,7 +245,7 @@ abstract class Scribunto_LuaEngineTestBase extends MediaWikiLangTestCase {
* @param mixed $expected
*/
public function testLua( $key, $testName, $expected ) {
$this->luaTestName = static::$moduleName."[$key]: $testName";
$this->luaTestName = static::$moduleName . "[$key]: $testName";
if ( isset( $this->skipTests[$testName] ) ) {
$this->markTestSkipped( $this->skipTests[$testName] );
} else {