From 510670051c7d1df2e9da5b81c6009044622896ef Mon Sep 17 00:00:00 2001 From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:42:27 +0100 Subject: [PATCH] Test for issue 18. --- composer.json | 3 ++- tests/issue-18/hooks.md | 27 +++++++++++++++++++++++++++ tests/issue-18/test-issue-18.php | 21 +++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 tests/issue-18/hooks.md create mode 100644 tests/issue-18/test-issue-18.php diff --git a/composer.json b/composer.json index c0eb2e4..98a1f1b 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,8 @@ "bin/wp-documentor parse tests/issue-13 --exclude=file-exclude.php --exclude=folder-exclude/ --format=markdown --output=tests/issue-13/hooks.md", "bin/wp-documentor parse tests/issue-14 --format=markdown --output=tests/issue-14/hooks.md", "bin/wp-documentor parse tests/issue-16 --format=markdown --output=tests/issue-16/hooks.md", - "bin/wp-documentor parse tests/issue-17 --format=markdown --output=tests/issue-17/hooks.md" + "bin/wp-documentor parse tests/issue-17 --format=markdown --output=tests/issue-17/hooks.md", + "bin/wp-documentor parse tests/issue-18 --format=markdown --output=tests/issue-18/hooks.md" ] }, "require-dev": { diff --git a/tests/issue-18/hooks.md b/tests/issue-18/hooks.md new file mode 100644 index 0000000..270c081 --- /dev/null +++ b/tests/issue-18/hooks.md @@ -0,0 +1,27 @@ +# Hooks + +- [Actions](#actions) +- [Filters](#filters) + +## Actions + +*This project does not contain any WordPress actions.* + +## Filters + +### `some_condition_filter` + +*Test issue 18.* + +**Arguments** + +Argument | Type | Description +-------- | ---- | ----------- +`$some_condition` | `bool` | Condition. +`$some_other_parameter` | `mixed` | Other parameter. + +Source: [tests/issue-18/test-issue-18.php](test-issue-18.php), [line 11](test-issue-18.php#L11-L19) + + +

Pronamic WordPress Documentor
Generated by Pronamic WordPress Documentor 1.2.0

+ diff --git a/tests/issue-18/test-issue-18.php b/tests/issue-18/test-issue-18.php new file mode 100644 index 0000000..fbb8de5 --- /dev/null +++ b/tests/issue-18/test-issue-18.php @@ -0,0 +1,21 @@ + + * @copyright 2005-2022 Pronamic + * @license GPL-3.0-or-later + * @package Pronamic\WordPress\Documentor + */ + +/** + * Test issue 18. + * + * @link https://github.com/pronamic/wp-documentor/issues/17 + * @param bool $some_condition Condition. + * @param mixed $some_other_parameter Other parameter. + * @return bool + */ +if ( apply_filters( 'some_condition_filter', $some_condition, $some_other_parameter ) ) { + do_something(); +}