mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-30 18:35:12 +00:00
build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
Change-Id: I99cebc85671b3e8670729cb725a6026f233b639b
This commit is contained in:
parent
a3db75ac7c
commit
2f8cdd225c
|
@ -267,7 +267,7 @@ class MathHooks {
|
|||
];
|
||||
// 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 @@ class MathHooks {
|
|||
* 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 @@ class MathHooks {
|
|||
*/
|
||||
static function chemTagHook( $content, $attributes, $parser ) {
|
||||
$attributes['chem'] = true;
|
||||
return MathHooks::mathTagHook( '\ce{' . $content . '}', $attributes, $parser );
|
||||
return self::mathTagHook( '\ce{' . $content . '}', $attributes, $parser );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ abstract class MathInputCheck {
|
|||
|
||||
/**
|
||||
* Returns true if the TeX input String is valid
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid() {
|
||||
return $this->isValid;
|
||||
|
|
|
@ -59,7 +59,7 @@ class MathInputCheckRestbase extends MathInputCheck {
|
|||
return $errorRenderer->getError( 'math_unknown_error' );
|
||||
}
|
||||
/**
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid() {
|
||||
return $this->restbaseInterface->getSuccess();
|
||||
|
|
|
@ -46,7 +46,7 @@ class MathInputCheckTexvc extends MathInputCheck {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid() {
|
||||
$us = $this;
|
||||
|
@ -59,7 +59,7 @@ class MathInputCheckTexvc extends MathInputCheck {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function doValidCheck() {
|
||||
global $wgMathTexvcCheckExecutable;
|
||||
|
|
|
@ -92,7 +92,7 @@ class MathLaTeXML extends MathMathML {
|
|||
|
||||
/**
|
||||
* 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 @@ class MathLaTeXML extends MathMathML {
|
|||
/**
|
||||
* 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() );
|
||||
|
|
|
@ -164,7 +164,7 @@ class MathMathML extends MathRenderer {
|
|||
* @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 @@ class MathMathML extends MathRenderer {
|
|||
|
||||
/**
|
||||
* Does the actual web request to convert TeX to MathML.
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
protected function doRender() {
|
||||
if ( $this->getTex() === '' ) {
|
||||
|
@ -307,7 +307,7 @@ class MathMathML extends MathRenderer {
|
|||
* Checks if the input is valid MathML,
|
||||
* and if the root element has the name math
|
||||
* @param string $XML
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function isValidMathML( $XML ) {
|
||||
$out = false;
|
||||
|
|
|
@ -261,7 +261,7 @@ abstract class MathRenderer {
|
|||
/**
|
||||
* Reads rendering data from database
|
||||
*
|
||||
* @return boolean true if read successfully, false otherwise
|
||||
* @return bool true if read successfully, false otherwise
|
||||
*/
|
||||
public function readFromDatabase() {
|
||||
$dbr = wfGetDB( DB_SLAVE );
|
||||
|
@ -508,7 +508,7 @@ abstract class MathRenderer {
|
|||
/**
|
||||
* Checks if the instance was modified i.e., because math was rendered
|
||||
*
|
||||
* @return boolean true if something was changed false otherwise
|
||||
* @return bool true if something was changed false otherwise
|
||||
*/
|
||||
public function isChanged() {
|
||||
return $this->changed;
|
||||
|
@ -516,7 +516,7 @@ abstract class MathRenderer {
|
|||
|
||||
/**
|
||||
* Checks if there is an explicit user request to rerender the math-tag.
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
function isPurge() {
|
||||
if ( $this->purge ) {
|
||||
|
@ -574,7 +574,7 @@ abstract class MathRenderer {
|
|||
|
||||
/**
|
||||
* Get if the input tex was marked as secure
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function isTexSecure() {
|
||||
return $this->texSecure;
|
||||
|
|
|
@ -301,7 +301,7 @@ class MathRestbaseInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function getSuccess() {
|
||||
if ( $this->success === null ) {
|
||||
|
|
|
@ -60,7 +60,7 @@ class MathSource extends MathRenderer {
|
|||
|
||||
/**
|
||||
* No rendering required in plain text mode
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
function render() {
|
||||
// assume unchanged to avoid unnecessary database access
|
||||
|
|
|
@ -372,7 +372,7 @@ class MathTexvc extends MathRenderer {
|
|||
/**
|
||||
* Reads the rendering information from the database. If configured, checks whether files exist
|
||||
*
|
||||
* @return boolean true if retrieved, false otherwise
|
||||
* @return bool true if retrieved, false otherwise
|
||||
*/
|
||||
public function readCache() {
|
||||
global $wgMathCheckFiles;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"require-dev": {
|
||||
"jakub-onderka/php-parallel-lint": "0.9.2",
|
||||
"mediawiki/mediawiki-codesniffer": "0.10.0",
|
||||
"mediawiki/mediawiki-codesniffer": "0.10.1",
|
||||
"jakub-onderka/php-console-highlighter": "0.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in a new issue