Fix doc-blocks for some HTMLForm elements
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Mon, 20 Jul 2015 16:27:36 +0000 (18:27 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 20 Jul 2015 17:01:04 +0000 (17:01 +0000)
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
includes/htmlform/HTMLCheckField.php
includes/htmlform/HTMLFormField.php

index 8d7aec3..b0b08a6 100644 (file)
@@ -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(
index 55312ff..9666c4e 100644 (file)
@@ -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'] ) ) {
index 21526c7..b26b45d 100644 (file)
@@ -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;