mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 09:20:42 +00:00
Fix parameter docs
* Removed () from param doc * Fix return type * Changed default type Change-Id: I82d81c99683cb79d60980eaa702c99110af6db94
This commit is contained in:
parent
882c4c4450
commit
bbc88d5f5d
|
@ -104,7 +104,7 @@ class MathHooks {
|
|||
* Generate a user dependent hash cache key.
|
||||
* The hash key depends on the rendering mode.
|
||||
* @param string &$confstr The to-be-hashed key string that is being constructed
|
||||
* @param User $user reference to the current user
|
||||
* @param User|bool $user reference to the current user
|
||||
* @param array &$forOptions userOptions used on that page
|
||||
* @return true
|
||||
*/
|
||||
|
@ -185,7 +185,7 @@ class MathHooks {
|
|||
* @param string $content (the LaTeX input)
|
||||
* @param array $attributes
|
||||
* @param Parser $parser
|
||||
* @return array
|
||||
* @return array|string
|
||||
*/
|
||||
static function mathTagHook( $content, $attributes, $parser ) {
|
||||
static $n = 1;
|
||||
|
@ -214,9 +214,9 @@ class MathHooks {
|
|||
/**
|
||||
* Callback function for the <math> parser hook.
|
||||
*
|
||||
* @param Parser $parser
|
||||
* @param MathRenderer $renderer
|
||||
* @return array
|
||||
* @param Parser $parser
|
||||
* @return string
|
||||
* @throws FatalError
|
||||
* @throws MWException
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ class MathLaTeXML extends MathMathML {
|
|||
* Converts an array with LaTeXML settings to a URL encoded String.
|
||||
* If the argument is a string the input will be returned.
|
||||
* Thus the function has projector properties and can be applied a second time safely.
|
||||
* @param (string|array) $array
|
||||
* @param string|array $array
|
||||
* @return string
|
||||
*/
|
||||
public function serializeSettings( $array ) {
|
||||
|
@ -162,7 +162,7 @@ class MathLaTeXML extends MathMathML {
|
|||
* @param string $mml : the MathML string
|
||||
* @param string $tagId : optional tagID for references like (pagename#equation2)
|
||||
* @param bool $attribs
|
||||
* @return html element with rendered math
|
||||
* @return string html element with rendered math
|
||||
*/
|
||||
public static function embedMathML( $mml, $tagId = '', $attribs = false ) {
|
||||
$mml = str_replace( "\n", " ", $mml );
|
||||
|
|
|
@ -15,7 +15,7 @@ class MathMathML extends MathRenderer {
|
|||
|
||||
protected $defaultAllowedRootElements = [ 'math' ];
|
||||
protected $restbaseInputTypes = [ 'tex', 'inline-tex', 'chem' ];
|
||||
protected $allowedRootElements = '';
|
||||
protected $allowedRootElements = [];
|
||||
protected $hosts;
|
||||
|
||||
/** @var bool if false MathML output is not validated */
|
||||
|
|
|
@ -110,7 +110,7 @@ class MathMathMLCli extends MathMathML {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $req request
|
||||
* @param mixed $req request
|
||||
* @param int &$exitCode exit code
|
||||
* @return mixed
|
||||
* @throws MWException
|
||||
|
|
|
@ -34,7 +34,7 @@ abstract class MathRenderer {
|
|||
/** @var string the original user input string (which was used to calculate the inputhash) */
|
||||
protected $userInputTex = '';
|
||||
// FURTHER PROPERTIES OF THE MATHEMATICAL CONTENT
|
||||
/** @var ('inlineDisplaystyle'|'display'|'inline'|'linebreak') the rendering style */
|
||||
/** @var string ('inlineDisplaystyle'|'display'|'inline'|'linebreak') the rendering style */
|
||||
protected $mathStyle = 'inlineDisplaystyle';
|
||||
/** @var array with userdefined parameters passed to the extension (not used) */
|
||||
protected $params = [];
|
||||
|
@ -204,7 +204,7 @@ abstract class MathRenderer {
|
|||
* Returns an internationalized HTML error string
|
||||
*
|
||||
* @param string $msg message key for specific error
|
||||
* @internal param \Varargs $parameters (optional) zero
|
||||
* @note param \Varargs $parameters (optional) zero
|
||||
* or more message parameters for specific error
|
||||
*
|
||||
* @return string HTML error string
|
||||
|
@ -233,7 +233,6 @@ abstract class MathRenderer {
|
|||
/**
|
||||
* Set the input hash (if user input tex is not available)
|
||||
* @param string $md5
|
||||
* @return string hash
|
||||
*/
|
||||
public function setMd5( $md5 ) {
|
||||
$this->md5 = $md5;
|
||||
|
|
|
@ -117,7 +117,7 @@ class MathRestbaseInterface {
|
|||
* @see Http::post()
|
||||
*
|
||||
* @param array $request the request object
|
||||
* @return bool success
|
||||
* @return array
|
||||
*/
|
||||
private function executeRestbaseCheckRequest( $request ) {
|
||||
$res = null;
|
||||
|
|
Loading…
Reference in a new issue