Opened 6 weeks ago
Last modified 6 weeks ago
#9319 new enhancement
Clarify phpdoc return types for template helper functions
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Core | Keywords: | has-patch |
| Cc: |
Description
Some template helper functions currently document their return value as mixed,
even though they only return well-defined values.
This ticket proposes clarifying the PHPDoc return types to better reflect the
existing behavior, without changing any runtime logic.
Change History (2)
This ticket was mentioned in PR #433 on buddypress/buddypress by @manhphucofficial.
6 weeks ago
#2
- Keywords has-patch added
This PR updates a couple of PHPDoc @return annotations that currently use
mixed, even though the functions return well-defined values.
The changes clarify the return types based on the existing behavior:
bp_format_time()returns a formatted string on success orfalseon failure.bp_get_activity_parent_content()returns a string orfalsewhen no parent content is available.
This is a documentation-only change and does not affect runtime behavior.
This PR addresses Trac ticket #9319:
https://buddypress.trac.wordpress.org/ticket/9319
A documentation-only pull request has been opened to address this:
https://github.com/buddypress/buddypress/pull/433