[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Improve some parameter docs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/374079 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: I488d13c37a39d4ed597e17b8fd3c2de131ca97f4 --- M Question.php M Quiz.class.php M Quiz.hooks.php M phpcs.xml 4 files changed, 29 insertions(+), 33 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/Question.php b/Question.php index 29fcd2f..93c1e25 100644 --- a/Question.php +++ b/Question.php @@ -4,10 +4,10 @@ /** * Constructor * -* @param $beingCorrected Boolean. -* @param $caseSensitive Boolean. -* @param $questionId Integer: the Identifier of the question used to generate input names. -* @param $parser Parser the wikitext parser. +* @param bool $beingCorrected +* @param bool $caseSensitive +* @param int $questionId the Identifier of the question used to generate input names. +* @param Parser &$parser the wikitext parser. */ public function __construct( $beingCorrected, $caseSensitive, $questionId, &$parser ) { global $wgRequest; @@ -29,7 +29,7 @@ * Mutator of the question state * * @protected -* @param $pState String: +* @param string $pState */ function setState( $pState ) { if ( $pState == 'error' || ( $pState == 'wrong' && $this->mState != 'error' ) || @@ -54,6 +54,7 @@ * Accessor of the question state. * * @protected +* @return string */ function getState() { if ( $this->mState == 'na_right' ) { @@ -68,7 +69,7 @@ /** * Convert the question's header into HTML. * -* @param $input String: the quiz header in quiz syntax. +* @param string $input the quiz header in quiz syntax. * @return string */ function parseHeader( $input ) { @@ -95,7 +96,7 @@ /** * Determine the question's parameters. * -* @param $matches array: elements matching $parametersPattern +* @param array $matches elements matching $parametersPattern * $matches[0] are the potential question parameters. */ function parseParameters( $matches ) { @@ -126,7 +127,7 @@ /** * Transmit a single choice object to the basic type parser. * -* @param $input string A question object in quiz syntax. +* @param string $input A question object in quiz syntax. * * @return string A question object in HTML. */ @@ -137,7 +138,7 @@ /** * Transmit a multiple choice object to the basic type parser. * -* @param $input string A question object in quiz syntax. +* @param string $input A question object in quiz syntax. * * @return string A question object in HTML. */ @@ -148,8 +149,8 @@ /** * Convert a basic type object from quiz syntax to HTML. * -* @param $input string A question object in quiz syntax -* @param $inputType string +* @param string $input A question object in quiz syntax +* @param string $inputType * * @return string A question object in HTML. */ @@ -293,7 +294,7 @@ * Determine the object's parameters and convert a list of categories from * quiz syntax to HTML. * -* @param $input String: pipe-separated list of the various categories. +* @param string $input pipe-separated list of the various categories. * @return string */ function parseCategories( $input ) { @@ -327,7 +328,7 @@ /** * Convert a "text field" object to HTML. * -* @param $input string A question object in quiz syntax. +* @param string $input A question object in quiz syntax. * * @return string A question object in HTML. */ @@ -363,7 +364,7 @@ } /** -* @param $input array +* @param array $input * @return string */ function parseTextField( $input ) { diff --git a/Quiz.class.php b/Quiz.class.php index d139c24..10e2785 100644 --- a/Quiz.class.php +++ b/Quiz.class.php @@ -10,8 +10,8 @@ /** * Constructor * -* @param $argv array -* @param $parser Parser +* @param array $argv +* @param Parser &$parser */ public function __construct( $argv, &$parser ) { global $wgRequest; @@ -96,7 +96,7 @@ /** * Get HTML from template using TemplateParser * -* @param $templateParser TemplateParser +* @param TemplateParser
[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Improve some parameter docs
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374079 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: I488d13c37a39d4ed597e17b8fd3c2de131ca97f4 --- M Question.php M Quiz.class.php M Quiz.hooks.php M phpcs.xml 4 files changed, 29 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz refs/changes/79/374079/1 diff --git a/Question.php b/Question.php index 29fcd2f..93c1e25 100644 --- a/Question.php +++ b/Question.php @@ -4,10 +4,10 @@ /** * Constructor * -* @param $beingCorrected Boolean. -* @param $caseSensitive Boolean. -* @param $questionId Integer: the Identifier of the question used to generate input names. -* @param $parser Parser the wikitext parser. +* @param bool $beingCorrected +* @param bool $caseSensitive +* @param int $questionId the Identifier of the question used to generate input names. +* @param Parser &$parser the wikitext parser. */ public function __construct( $beingCorrected, $caseSensitive, $questionId, &$parser ) { global $wgRequest; @@ -29,7 +29,7 @@ * Mutator of the question state * * @protected -* @param $pState String: +* @param string $pState */ function setState( $pState ) { if ( $pState == 'error' || ( $pState == 'wrong' && $this->mState != 'error' ) || @@ -54,6 +54,7 @@ * Accessor of the question state. * * @protected +* @return string */ function getState() { if ( $this->mState == 'na_right' ) { @@ -68,7 +69,7 @@ /** * Convert the question's header into HTML. * -* @param $input String: the quiz header in quiz syntax. +* @param string $input the quiz header in quiz syntax. * @return string */ function parseHeader( $input ) { @@ -95,7 +96,7 @@ /** * Determine the question's parameters. * -* @param $matches array: elements matching $parametersPattern +* @param array $matches elements matching $parametersPattern * $matches[0] are the potential question parameters. */ function parseParameters( $matches ) { @@ -126,7 +127,7 @@ /** * Transmit a single choice object to the basic type parser. * -* @param $input string A question object in quiz syntax. +* @param string $input A question object in quiz syntax. * * @return string A question object in HTML. */ @@ -137,7 +138,7 @@ /** * Transmit a multiple choice object to the basic type parser. * -* @param $input string A question object in quiz syntax. +* @param string $input A question object in quiz syntax. * * @return string A question object in HTML. */ @@ -148,8 +149,8 @@ /** * Convert a basic type object from quiz syntax to HTML. * -* @param $input string A question object in quiz syntax -* @param $inputType string +* @param string $input A question object in quiz syntax +* @param string $inputType * * @return string A question object in HTML. */ @@ -293,7 +294,7 @@ * Determine the object's parameters and convert a list of categories from * quiz syntax to HTML. * -* @param $input String: pipe-separated list of the various categories. +* @param string $input pipe-separated list of the various categories. * @return string */ function parseCategories( $input ) { @@ -327,7 +328,7 @@ /** * Convert a "text field" object to HTML. * -* @param $input string A question object in quiz syntax. +* @param string $input A question object in quiz syntax. * * @return string A question object in HTML. */ @@ -363,7 +364,7 @@ } /** -* @param $input array +* @param array $input * @return string */ function parseTextField( $input ) { diff --git a/Quiz.class.php b/Quiz.class.php index d139c24..10e2785 100644 --- a/Quiz.class.php +++ b/Quiz.class.php @@ -10,8 +10,8 @@ /** * Constructor * -* @param $argv array -* @param $parser Parser +* @param array $argv +* @param Parser &$parser */ public function __construct( $argv, &$parser ) { global $wgRequest; @@ -96,7 +96,7 @@ /** * Get HTML from template using TemplateParser * -* @param $templateParser TemplateParser +* @param