build: Updating mediawiki/mediawiki-phan-config to 0.9.0

Change-Id: Id4f976b7ec94e1d2be0421725733804f24dec2c5
This commit is contained in:
libraryupgrader 2019-12-21 15:51:10 +00:00 committed by Umherirrender
parent 2b2ddac15a
commit 863794c1dd
6 changed files with 7 additions and 5 deletions

View file

@ -4,7 +4,7 @@
"mediawiki/mediawiki-codesniffer": "28.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.3.2",
"mediawiki/mediawiki-phan-config": "0.8.0"
"mediawiki/mediawiki-phan-config": "0.9.0"
},
"scripts": {
"test": [

View file

@ -77,6 +77,7 @@ class MathGenerateTests extends Maintenance {
}
$i = 0;
foreach ( array_slice( $allEquations, $offset, $length, true ) as $input ) {
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
$output = MathRenderer::renderMath( $input[1], $input[2], 'png' );
$output = preg_replace( '#src="(.*?)/(([a-f]|\d)*)"#', 'src="\2"', $output );
$parserTests[] = [

View file

@ -32,7 +32,7 @@ class MathInputCheckRestbase extends MathInputCheck {
* @see https://phabricator.wikimedia.org/T119300
* @param stdClass $e
* @param MathRenderer|null $errorRenderer
* @return string
* @return string|null
*/
public function errorObjectToHtml( stdClass $e, $errorRenderer = null ) {
if ( $errorRenderer === null ) {
@ -77,7 +77,7 @@ class MathInputCheckRestbase extends MathInputCheck {
/**
* Returns the string of the last error.
* @return string
* @return string|null
*/
public function getError() {
$err = $this->restbaseInterface->getError();

View file

@ -306,6 +306,7 @@ class MathMathML extends MathRenderer {
$this->lastError = '';
$requestResult = $this->makeRequest( $host, $post, $res, $this->lastError );
if ( $requestResult ) {
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal
$jsonResult = json_decode( $res );
if ( $jsonResult && json_last_error() === JSON_ERROR_NONE ) {
if ( $jsonResult->success ) {

View file

@ -36,7 +36,7 @@ class MathValidator implements ValueValidator {
// TeX string is not valid
return Result::newError(
[
Error::newError( null, null, 'malformed-value', [ $checker->getError() ] )
Error::newError( '', null, 'malformed-value', [ $checker->getError() ] )
]
);
}

View file

@ -192,7 +192,7 @@ class MathWikibaseConnector {
}
}
if ( $innerInfo ) {
if ( $innerInfo && $symbol ) {
$innerInfo->setSymbol( $symbol );
$output->addHasPartElement( $innerInfo );
}