Opened 5 months ago
Last modified 5 months ago
#63745 new enhancement
Suggestion Regarding PHPDoc Usage for $GLOBALS in WordPress Core
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch dev-feedback 2nd-opinion |
| Focuses: | docs | Cc: |
Description
Hello Team,
I hope you're doing well.
While reviewing the WordPress Core files, I noticed the usage of PHPDoc blocks for certain global variables like "_wp_tests_development_mode". However, I found that other global variables such as debug are not consistently documented using PHPDoc.
I believe adding PHPDoc comments for these globals can improve code readability, assist with static analysis tools, and enhance overall documentation clarity. It might be worth considering standardizing this across the Core codebase.
Thank you
Attachments (1)
Change History (2)
#1
@
5 months ago
- Keywords 2nd-opinion added; needs-testing removed
#60021 proposed documenting $_wp_tests_development_mode, but the ticket was closed without updating that.
- If it should be done, the
@globalwould belong before@return, as in 60021.16.patch. - [56042] added the global variable.
[19935] deprecated the debug_fwrite() function, and the $debug variable could have been either 1 or true (int|bool).
I have checked above mentioned issue and resolved it. Here, I have added my patch.