[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368024 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I99cebc85671b3e8670729cb725a6026f233b639b
---
M Math.hooks.php
M MathInputCheck.php
M MathInputCheckRestbase.php
M MathInputCheckTexvc.php
M MathLaTeXML.php
M MathMathML.php
M MathRenderer.php
M MathRestbaseInterface.php
M MathSource.php
M MathTexvc.php
M composer.json
M phpcs.xml
12 files changed, 21 insertions(+), 22 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/Math.hooks.php b/Math.hooks.php
index 13b8845..ad33220 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -267,7 +267,7 @@
];
// If the default option is not in the valid options the
// user interface throws an exception (BUG 64844)
-   $mode = MathHooks::mathModeToString( 
$wgDefaultUserOptions['math'] );
+   $mode = self::mathModeToString( $wgDefaultUserOptions['math'] );
if ( ! in_array( $mode, MathRenderer::getValidModes() ) ) {
LoggerFactory::getInstance( 'Math' )->error( 
'Misconfiguration: '.
"\$wgDefaultUserOptions['math'] is not in " . 
MathRenderer::getValidModes() . ".\n".
@@ -297,7 +297,7 @@
 * MaintenanceRefreshLinksInit handler; optimize settings for 
refreshLinks batch job.
 *
 * @param Maintenance $maint
-* @return boolean hook return code
+* @return bool hook return code
 */
static function onMaintenanceRefreshLinksInit( $maint ) {
global $wgUser;
@@ -422,7 +422,7 @@
 */
static function chemTagHook( $content, $attributes, $parser ) {
$attributes['chem'] = true;
-   return MathHooks::mathTagHook( '\ce{' . $content . '}', 
$attributes, $parser );
+   return self::mathTagHook( '\ce{' . $content . '}', $attributes, 
$parser );
}
 
 }
diff --git a/MathInputCheck.php b/MathInputCheck.php
index fb09836..f766728 100644
--- a/MathInputCheck.php
+++ b/MathInputCheck.php
@@ -27,7 +27,7 @@
 
/**
 * Returns true if the TeX input String is valid
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->isValid;
diff --git a/MathInputCheckRestbase.php b/MathInputCheckRestbase.php
index b72f88a..ab0dbf2 100644
--- a/MathInputCheckRestbase.php
+++ b/MathInputCheckRestbase.php
@@ -59,7 +59,7 @@
return $errorRenderer->getError( 'math_unknown_error' );
}
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->restbaseInterface->getSuccess();
diff --git a/MathInputCheckTexvc.php b/MathInputCheckTexvc.php
index 7d22f9d..df7fcd2 100644
--- a/MathInputCheckTexvc.php
+++ b/MathInputCheckTexvc.php
@@ -46,7 +46,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
$us = $this;
@@ -59,7 +59,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function doValidCheck() {
global $wgMathTexvcCheckExecutable;
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index aa0c055..e0c1323 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -92,7 +92,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( trim( $this->getTex() ) === '' ) {
@@ -180,7 +180,7 @@
/**
 * Calculates the SVG image based on the MathML input
 * No cache is used.
-* @return boolean
+* @return bool
 */
public function calculateSvg() {
$renderer = new MathMathML( $this->getTex() );
diff --git a/MathMathML.php b/MathMathML.php
index aa88b47..f5f7956 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -164,7 +164,7 @@
 * @param mixed $res the result
 * @param mixed $error the formatted error message or null
 * @param String $httpRequestClass class name of MWHttpRequest (needed 
for testing only)
-* @return boolean success
+* @return bool success
 */
public function makeRequest(
$host, $post, &$res, &$error = '', $httpRequestClass = 
'MWHttpRequest'
@@ -252,7 +252,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( $this->getTex() === '' ) {
@@ -307,7 

[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368024 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I99cebc85671b3e8670729cb725a6026f233b639b
---
M Math.hooks.php
M MathInputCheck.php
M MathInputCheckRestbase.php
M MathInputCheckTexvc.php
M MathLaTeXML.php
M MathMathML.php
M MathRenderer.php
M MathRestbaseInterface.php
M MathSource.php
M MathTexvc.php
M composer.json
M phpcs.xml
12 files changed, 21 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/24/368024/1

diff --git a/Math.hooks.php b/Math.hooks.php
index 13b8845..ad33220 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -267,7 +267,7 @@
];
// If the default option is not in the valid options the
// user interface throws an exception (BUG 64844)
-   $mode = MathHooks::mathModeToString( 
$wgDefaultUserOptions['math'] );
+   $mode = self::mathModeToString( $wgDefaultUserOptions['math'] );
if ( ! in_array( $mode, MathRenderer::getValidModes() ) ) {
LoggerFactory::getInstance( 'Math' )->error( 
'Misconfiguration: '.
"\$wgDefaultUserOptions['math'] is not in " . 
MathRenderer::getValidModes() . ".\n".
@@ -297,7 +297,7 @@
 * MaintenanceRefreshLinksInit handler; optimize settings for 
refreshLinks batch job.
 *
 * @param Maintenance $maint
-* @return boolean hook return code
+* @return bool hook return code
 */
static function onMaintenanceRefreshLinksInit( $maint ) {
global $wgUser;
@@ -422,7 +422,7 @@
 */
static function chemTagHook( $content, $attributes, $parser ) {
$attributes['chem'] = true;
-   return MathHooks::mathTagHook( '\ce{' . $content . '}', 
$attributes, $parser );
+   return self::mathTagHook( '\ce{' . $content . '}', $attributes, 
$parser );
}
 
 }
diff --git a/MathInputCheck.php b/MathInputCheck.php
index fb09836..f766728 100644
--- a/MathInputCheck.php
+++ b/MathInputCheck.php
@@ -27,7 +27,7 @@
 
/**
 * Returns true if the TeX input String is valid
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->isValid;
diff --git a/MathInputCheckRestbase.php b/MathInputCheckRestbase.php
index b72f88a..ab0dbf2 100644
--- a/MathInputCheckRestbase.php
+++ b/MathInputCheckRestbase.php
@@ -59,7 +59,7 @@
return $errorRenderer->getError( 'math_unknown_error' );
}
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->restbaseInterface->getSuccess();
diff --git a/MathInputCheckTexvc.php b/MathInputCheckTexvc.php
index 7d22f9d..df7fcd2 100644
--- a/MathInputCheckTexvc.php
+++ b/MathInputCheckTexvc.php
@@ -46,7 +46,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
$us = $this;
@@ -59,7 +59,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function doValidCheck() {
global $wgMathTexvcCheckExecutable;
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index aa0c055..e0c1323 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -92,7 +92,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( trim( $this->getTex() ) === '' ) {
@@ -180,7 +180,7 @@
/**
 * Calculates the SVG image based on the MathML input
 * No cache is used.
-* @return boolean
+* @return bool
 */
public function calculateSvg() {
$renderer = new MathMathML( $this->getTex() );
diff --git a/MathMathML.php b/MathMathML.php
index aa88b47..f5f7956 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -164,7 +164,7 @@
 * @param mixed $res the result
 * @param mixed $error the formatted error message or null
 * @param String $httpRequestClass class name of MWHttpRequest (needed 
for testing only)
-* @return boolean success
+* @return bool success
 */
public function makeRequest(
$host, $post, &$res, &$error = '', $httpRequestClass = 
'MWHttpRequest'
@@ -252,7 +252,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( $this->getTex() === '' ) {
@@