From df1689c7177d5b7ef946ae2ff525594bd377da3f Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 10 Aug 2017 23:57:43 -0400 Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 0.11.0 Change-Id: I8ce8155621fbfc5cb3dcf5dafbfa89796d0c1f11 --- Math.hooks.php | 4 ++-- MathInputCheckRestbase.php | 2 +- MathInputCheckTexvc.php | 2 +- MathRestbaseInterface.php | 2 +- composer.json | 2 +- tests/MathHooksTest.php | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Math.hooks.php b/Math.hooks.php index 632c29c..41ffcef 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -81,7 +81,7 @@ class MathHooks { 'MW_MATH_PNG' => 0, 'MW_MATH_SOURCE' => 3, 'MW_MATH_MATHML' => 5, - 'MW_MATH_LATEXML'=> 7 ]; + 'MW_MATH_LATEXML' => 7 ]; return self::mathConstantToString( $mode, $defs, $prefix = 'MW_MATH_', $default ); } @@ -91,7 +91,7 @@ class MathHooks { 'png' => 0, 'source' => 3, 'mathml' => 5, - 'latexml'=> 7 ]; + 'latexml' => 7 ]; if ( array_key_exists( $mode, $defs ) ) { return $defs[$mode]; diff --git a/MathInputCheckRestbase.php b/MathInputCheckRestbase.php index 122a6f4..121145c 100644 --- a/MathInputCheckRestbase.php +++ b/MathInputCheckRestbase.php @@ -37,7 +37,7 @@ class MathInputCheckRestbase extends MathInputCheck { */ public function errorObjectToHtml( stdClass $e, $errorRenderer = null ) { if ( $errorRenderer === null ) { - $errorRenderer = new MathSource( $this->inputTeX ); + $errorRenderer = new MathSource( $this->inputTeX ); } if ( isset( $e->error->message ) ) { if ( $e->error->message === 'Illegal TeX function' ) { diff --git a/MathInputCheckTexvc.php b/MathInputCheckTexvc.php index df7fcd2..333089b 100644 --- a/MathInputCheckTexvc.php +++ b/MathInputCheckTexvc.php @@ -25,7 +25,7 @@ class MathInputCheckTexvc extends MathInputCheck { $errDetails = htmlspecialchars( substr( $texvcResult, 1 ) ); if ( $errorRenderer === false ) { - $errorRenderer = new MathSource( $this->inputTeX ); + $errorRenderer = new MathSource( $this->inputTeX ); } switch ( $texvcStatus ) { diff --git a/MathRestbaseInterface.php b/MathRestbaseInterface.php index bee4c99..25aae70 100644 --- a/MathRestbaseInterface.php +++ b/MathRestbaseInterface.php @@ -122,7 +122,7 @@ class MathRestbaseInterface { private function executeRestbaseCheckRequest( $request ) { $res = null; $serviceClient = $this->getServiceClient(); - $response = $serviceClient->run( $request ); + $response = $serviceClient->run( $request ); if ( $response['code'] !== 200 ) { $this->log()->info( 'Tex check failed:', [ 'post' => $request['body'], diff --git a/composer.json b/composer.json index bcde286..1bc4497 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", - "mediawiki/mediawiki-codesniffer": "0.10.1", + "mediawiki/mediawiki-codesniffer": "0.11.0", "jakub-onderka/php-console-highlighter": "0.3.2" }, "scripts": { diff --git a/tests/MathHooksTest.php b/tests/MathHooksTest.php index 516652c..b5f3d59 100644 --- a/tests/MathHooksTest.php +++ b/tests/MathHooksTest.php @@ -88,8 +88,8 @@ class MathHooksTest extends MediaWikiTestCase { 'png' => 0, 'source' => 3, 'mathml' => 5, - 'latexml'=> 7, - 'invalid'=> $default + 'latexml' => 7, + 'invalid' => $default ]; foreach ( $testCases as $input => $expected ) {