Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#53900 closed defect (bug) (wontfix)

Missing return types in cache

Reported by: malthert's profile malthert Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.9
Component: Cache API Keywords:
Focuses: docs Cc:


These functions in cache.php are missing the return type (@return void specifically in this case)


Please add them.

Change History (3)

#1 @SergeyBiryukov
3 years ago

  • Focuses docs added
  • Keywords close added

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, it which case they have @return string|void.

Version 0, edited 3 years ago by SergeyBiryukov (next)

#2 @desrosj
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 @SergeyBiryukov
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.