From 88d616ba7b5226f33806000341ad04857382f621 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 20 Jul 2015 18:27:36 +0200 Subject: [PATCH] Fix doc-blocks for some HTMLForm elements The @return doxygen parameter can take a class with a namespace, but the \ needs to be escaped with an additional \. "\value" is usually interpreted as a special command. Actually with "@return OOUI\Widget", e.g., you'll get this output in your docs: return OOUI and an error message in the doxygen generation with something like "unknown command \Widget". With "@return OOUI\\Widget" you'll get the expected output: return OOUI\Widget without any error message. Change-Id: I14c4d7521f81ddd8c7b56facc1f0ae34f86b2299 --- includes/htmlform/HTMLButtonField.php | 2 +- includes/htmlform/HTMLCheckField.php | 2 +- includes/htmlform/HTMLFormField.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/htmlform/HTMLButtonField.php b/includes/htmlform/HTMLButtonField.php index 8d7aec387f..b0b08a645f 100644 --- a/includes/htmlform/HTMLButtonField.php +++ b/includes/htmlform/HTMLButtonField.php @@ -44,7 +44,7 @@ class HTMLButtonField extends HTMLFormField { /** * Get the OOUI widget for this field. * @param string $value - * @return OOUI\ButtonInputWidget + * @return OOUI\\ButtonInputWidget */ public function getInputOOUI( $value ) { return new OOUI\ButtonInputWidget( array( diff --git a/includes/htmlform/HTMLCheckField.php b/includes/htmlform/HTMLCheckField.php index 55312ffb21..9666c4ea87 100644 --- a/includes/htmlform/HTMLCheckField.php +++ b/includes/htmlform/HTMLCheckField.php @@ -45,7 +45,7 @@ class HTMLCheckField extends HTMLFormField { * Get the OOUI version of this field. * @since 1.26 * @param string $value - * @return OOUI\CheckboxInputWidget The checkbox widget. + * @return OOUI\\CheckboxInputWidget The checkbox widget. */ public function getInputOOUI( $value ) { if ( !empty( $this->mParams['invert'] ) ) { diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 21526c77a8..b26b45d8fa 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -49,7 +49,7 @@ abstract class HTMLFormField { * Defaults to false, which getOOUI will interpret as "use the HTML version" * * @param string $value - * @return OOUI\Widget|false + * @return OOUI\\Widget|false */ function getInputOOUI( $value ) { return false; -- 2.20.1