summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2016-02-17 01:42:21 (GMT)
committerNathaniel Catchpole2016-02-17 01:42:21 (GMT)
commit16f0342020f6c131f311ffb07fe2a2d53dcffb71 (patch)
tree5cb5d18c2db2fe262dcc282e3e326c37844c6b02
parent653e0a9b18cac8365d0bb0f3d5b01e02b1764c53 (diff)
Issue #1811328 by sushyl, Mile23: Add missing type hinting to Filter module docblocks
-rw-r--r--core/modules/filter/filter.api.php4
-rw-r--r--core/modules/filter/filter.module8
-rw-r--r--core/modules/filter/src/Tests/FilterUnitTest.php18
3 files changed, 15 insertions, 15 deletions
diff --git a/core/modules/filter/filter.api.php b/core/modules/filter/filter.api.php
index a2ba9b0..5bf973f 100644
--- a/core/modules/filter/filter.api.php
+++ b/core/modules/filter/filter.api.php
@@ -13,7 +13,7 @@
/**
* Perform alterations on filter definitions.
*
- * @param $info
+ * @param array $info
* Array of information on filters exposed by filter plugins.
*/
function hook_filter_info_alter(&$info) {
@@ -48,7 +48,7 @@ function hook_filter_secure_image_alter(&$image) {
/**
* Perform actions when a text format has been disabled.
*
- * @param $format
+ * @param \Drupal\filter\FilterFormatInterface $format
* The format object of the format being disabled.
*/
function hook_filter_format_disable($format) {
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 46046d1..71068b6 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -159,7 +159,7 @@ function filter_get_roles_by_format(FilterFormatInterface $format) {
/**
* Retrieves a list of text formats that are allowed for a given role.
*
- * @param $rid
+ * @param string $rid
* The user role ID to retrieve text formats for.
*
* @return \Drupal\filter\FilterFormatInterface[]
@@ -236,7 +236,7 @@ function filter_default_format(AccountInterface $account = NULL) {
* Any modules implementing a format deletion functionality must not delete this
* format.
*
- * @return
+ * @return string|null
* The ID of the fallback text format.
*
* @see hook_filter_format_disable()
@@ -635,10 +635,10 @@ function _filter_url_parse_partial_links($match) {
*
* Callback for preg_replace_callback() within _filter_url().
*
- * @param $match
+ * @param array $match
* An array containing matches to replace from preg_replace_callback(),
* whereas $match[1] is expected to contain the content to be filtered.
- * @param $escape
+ * @param bool|null $escape
* (optional) A Boolean indicating whether to escape (TRUE) or unescape
* comments (FALSE). Defaults to NULL, indicating neither. If TRUE, statically
* cached $comments are reset.
diff --git a/core/modules/filter/src/Tests/FilterUnitTest.php b/core/modules/filter/src/Tests/FilterUnitTest.php
index 0d7b228..2d5d005 100644
--- a/core/modules/filter/src/Tests/FilterUnitTest.php
+++ b/core/modules/filter/src/Tests/FilterUnitTest.php
@@ -862,7 +862,7 @@ www.example.com with a newline in comments -->
*
* @param FilterInterface $filter
* A input filter object.
- * @param $tests
+ * @param array $tests
* An associative array, whereas each key is an arbitrary input string and
* each value is again an associative array whose keys are filter output
* strings and whose values are Booleans indicating whether the output is
@@ -1141,13 +1141,13 @@ body {color:red}
* Note that this does not remove nulls, new lines and other characters that
* could be used to obscure a tag or an attribute name.
*
- * @param $haystack
+ * @param string $haystack
* Text to look in.
- * @param $needle
+ * @param string $needle
* Lowercase, plain text to look for.
- * @param $message
+ * @param string $message
* (optional) Message to display if failed. Defaults to an empty string.
- * @param $group
+ * @param string $group
* (optional) The group this message belongs to. Defaults to 'Other'.
*
* @return bool
@@ -1166,13 +1166,13 @@ body {color:red}
* Note that this does not remove nulls, new lines, and other character that
* could be used to obscure a tag or an attribute name.
*
- * @param $haystack
+ * @param string $haystack
* Text to look in.
- * @param $needle
+ * @param string $needle
* Lowercase, plain text to look for.
- * @param $message
+ * @param string $message
* (optional) Message to display if failed. Defaults to an empty string.
- * @param $group
+ * @param string $group
* (optional) The group this message belongs to. Defaults to 'Other'.
*
* @return bool