Commit 49760b64 by Alexander Makarov

Fixes #5595: Better phpdoc value types for Formatter methods

parent ed3084c8
...@@ -274,7 +274,7 @@ class Formatter extends Component ...@@ -274,7 +274,7 @@ class Formatter extends Component
/** /**
* Formats the value as an HTML-encoded plain text. * Formats the value as an HTML-encoded plain text.
* @param mixed $value the value to be formatted. * @param string $value the value to be formatted.
* @return string the formatted result. * @return string the formatted result.
*/ */
public function asText($value) public function asText($value)
...@@ -287,7 +287,7 @@ class Formatter extends Component ...@@ -287,7 +287,7 @@ class Formatter extends Component
/** /**
* Formats the value as an HTML-encoded plain text with newlines converted into breaks. * Formats the value as an HTML-encoded plain text with newlines converted into breaks.
* @param mixed $value the value to be formatted. * @param string $value the value to be formatted.
* @return string the formatted result. * @return string the formatted result.
*/ */
public function asNtext($value) public function asNtext($value)
...@@ -302,7 +302,7 @@ class Formatter extends Component ...@@ -302,7 +302,7 @@ class Formatter extends Component
* Formats the value as HTML-encoded text paragraphs. * Formats the value as HTML-encoded text paragraphs.
* Each text paragraph is enclosed within a `<p>` tag. * Each text paragraph is enclosed within a `<p>` tag.
* One or multiple consecutive empty lines divide two paragraphs. * One or multiple consecutive empty lines divide two paragraphs.
* @param mixed $value the value to be formatted. * @param string $value the value to be formatted.
* @return string the formatted result. * @return string the formatted result.
*/ */
public function asParagraphs($value) public function asParagraphs($value)
...@@ -317,7 +317,7 @@ class Formatter extends Component ...@@ -317,7 +317,7 @@ class Formatter extends Component
* Formats the value as HTML text. * Formats the value as HTML text.
* The value will be purified using [[HtmlPurifier]] to avoid XSS attacks. * The value will be purified using [[HtmlPurifier]] to avoid XSS attacks.
* Use [[asRaw()]] if you do not want any purification of the value. * Use [[asRaw()]] if you do not want any purification of the value.
* @param mixed $value the value to be formatted. * @param string $value the value to be formatted.
* @param array|null $config the configuration for the HTMLPurifier class. * @param array|null $config the configuration for the HTMLPurifier class.
* @return string the formatted result. * @return string the formatted result.
*/ */
...@@ -331,7 +331,7 @@ class Formatter extends Component ...@@ -331,7 +331,7 @@ class Formatter extends Component
/** /**
* Formats the value as a mailto link. * Formats the value as a mailto link.
* @param mixed $value the value to be formatted. * @param string $value the value to be formatted.
* @param array $options the tag options in terms of name-value pairs. See [[Html::mailto()]]. * @param array $options the tag options in terms of name-value pairs. See [[Html::mailto()]].
* @return string the formatted result. * @return string the formatted result.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment