jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/364176 )
Change subject: Fix a few minor control flow issues as reported by PHPStorm
......................................................................
Fix a few minor control flow issues as reported by PHPStorm
Change-Id: Iad4499e679d7c333b4be49c6e1ad772c6a14a931
---
M MathMathML.php
M MathRestbaseInterface.php
M MathTexvc.php
3 files changed, 8 insertions(+), 5 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MathMathML.php b/MathMathML.php
index 23aa645..d297bfd 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -197,7 +197,7 @@
$errormsg = $status->getHtml();
$error =
$this->getError(
'math_invalidresponse', $this->getModeStr(), $host, $errormsg,
- $this->getModeStr( 'mathml' ) );
+ $this->getModeStr() );
LoggerFactory::getInstance( 'Math' )->warning(
'NoResponse:' . var_export( [
'post' => $post,
'host' => $host,
diff --git a/MathRestbaseInterface.php b/MathRestbaseInterface.php
index 2c29ec0..e636b70 100644
--- a/MathRestbaseInterface.php
+++ b/MathRestbaseInterface.php
@@ -37,7 +37,7 @@
* @param $rbis
* @param $serviceClient
*/
- private static function batchGetMathML( $rbis, $serviceClient ) {
+ private static function batchGetMathML( array $rbis,
VirtualRESTServiceClient $serviceClient ) {
$requests = [];
$skips = [];
$i = 0;
@@ -137,7 +137,7 @@
/**
* @param array $rbis array of MathRestbaseInterface instances
*/
- public static function batchEvaluate( $rbis ) {
+ public static function batchEvaluate( array $rbis ) {
if ( count( $rbis ) == 0 ) {
return;
}
@@ -270,12 +270,14 @@
if ( $status->isOK() ) {
return true;
}
+
$this->log()->warning( 'Config check failed, due to an
invalid response code.',
[ 'responseCode' => $status ] );
} catch ( Exception $e ) {
$this->log()->warning( 'Config check failed, due to an
exception.', [ $e ] );
- return false;
}
+
+ return false;
}
/**
diff --git a/MathTexvc.php b/MathTexvc.php
index 6d28385..9230d3c 100644
--- a/MathTexvc.php
+++ b/MathTexvc.php
@@ -269,7 +269,8 @@
if ( !$errmsg ) {
$newHash = substr( $contents, 1, 32 );
if ( $this->hash !== $newHash ) {
- $this->isInDatabase( false ); // DB needs
update in writeCache() (bug 60997)
+ // DB needs update in writeCache() (bug 60997)
+ $this->isInDatabase();
}
$this->setHash( $newHash );
}
--
To view, visit https://gerrit.wikimedia.org/r/364176
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iad4499e679d7c333b4be49c6e1ad772c6a14a931
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits