Fix a few minor control flow issues as reported by PHPStorm
Change-Id: Iad4499e679d7c333b4be49c6e1ad772c6a14a931
This commit is contained in:
parent
ed7fdd990c
commit
3e45f5fd77
|
@ -197,7 +197,7 @@ class MathMathML extends MathRenderer {
|
|||
$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,
|
||||
|
|
|
@ -37,7 +37,7 @@ class MathRestbaseInterface {
|
|||
* @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 @@ class MathRestbaseInterface {
|
|||
/**
|
||||
* @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 @@ class MathRestbaseInterface {
|
|||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -269,7 +269,8 @@ class MathTexvc extends MathRenderer {
|
|||
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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue