mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 23:25:02 +00:00
build: Updating mediawiki/mediawiki-phan-config to 0.9.0
Change-Id: Id4f976b7ec94e1d2be0421725733804f24dec2c5
This commit is contained in:
parent
2b2ddac15a
commit
863794c1dd
|
@ -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": [
|
||||
|
|
|
@ -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[] = [
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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() ] )
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ class MathWikibaseConnector {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $innerInfo ) {
|
||||
if ( $innerInfo && $symbol ) {
|
||||
$innerInfo->setSymbol( $symbol );
|
||||
$output->addHasPartElement( $innerInfo );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue