#53900 closed defect (bug) (wontfix)
Missing return types in cache
Reported by: | malthert | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.9 |
Component: | Cache API | Keywords: | |
Focuses: | docs | Cc: |
Description
These functions in cache.php are missing the return type (@return void specifically in this case)
wp_cache_init
wp_cache_switch_to_blog
wp_cache_add_global_groups
wp_cache_add_non_persistent_groups
Please add them.
Change History (3)
#2
@
3 years ago
- Keywords close removed
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Closing this out as this does indeed appear to be following the documentation standards.
#3
@
3 years ago
Just noting that the documentation standards can probably be reconsidered if there is a strong reason and enough interest for allowing @return void
in core function DocBlocks (outside of the default bundled themes).
However, that would be a larger effort, as this applies to all of core and not just to cache functions.
Note: See
TracTickets for help on using
tickets.
Hi there, thanks for the ticket!
Per the WordPress documentation standards,
@return void
should not be used outside of the default bundled themes, so most of the core functions don't have that tag if the function does not return anything.There is an exception for functions like
wp_title()
, which can either return a string or display it, in which case they have@return string|void
.