Opened 11 years ago
Closed 10 years ago
#26185 closed defect (bug) (fixed)
PHPDoc updates for /wp-includes/functions.php
Reported by: | morganestes | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Bootstrap/Load | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
Style fixes to add periods, arrange keywords in the correct order, and correct @param
and @return
values (adding descriptions when needed).
Attachments (8)
Change History (27)
#5
in reply to:
↑ 4
@
11 years ago
- Keywords 2nd-opinion added; needs-refresh removed
- Version changed from trunk to 3.7
Replying to jeremyfelt:
- docs for
_http_build_query()
seem to have some spacing issues around the params- similar spacing issues in docs for
wp_filter_object_list()
Thanks for checking it out. I adjusted the spacing on those two doc blocks and added it as a .1 diff.
#6
follow-up:
↓ 7
@
11 years ago
- Keywords needs-patch added; has-patch 2nd-opinion removed
Ideally, I'd like to avoid these huge patches in the future, instead focusing on specific change. It's tough to follow what's being changed and why, etc.
That said, here are some notes on 26185.1.diff:
Reference: Inline Documentation Standards
- There should always be a new blank line between the short and long descriptions in a doc block
- If you're going to add parameter descriptions, great. I'd prefer it if you consistently space-aligned the parts for parameters. Case in point, compare your docs changes for
date_i18n()
vsdeprecated_file()
. The style used withdate_i18n()
is definitely preferred :) - Please avoid adding new
@global
tags @link
,@see
, etc. tags should always fall below the@since
- If parameter description is wrapped, align with the first character of the first line with spaces
- For hash notations (arrays), use a 4-space indent for each level of the array, not tabs
#7
in reply to:
↑ 6
@
11 years ago
Replying to DrewAPicture:
Ideally, I'd like to avoid these huge patches in the future, instead focusing on specific change. It's tough to follow what's being changed and why, etc.
Is it better to have a separate patch for each function/hook that I'm documenting?
I'll look at the overall structure again. I relied too much on my IDE autogenerating and formatting and it bit me. I'll go back and try again.
#8
follow-up:
↓ 9
@
10 years ago
I'm going back through this after 3.9 and will try again. This time, I'm adding a diff per function with major changes, and a combined one for just whitespace changes.
#9
in reply to:
↑ 8
;
follow-up:
↓ 10
@
10 years ago
- Milestone changed from Awaiting Review to Future Release
Replying to morganestes:
I'm going back through this after 3.9 and will try again. This time, I'm adding a diff per function with major changes, and a combined one for just whitespace changes.
Great. Honestly, I'd prefer you group up PHPDoc changes for multiple functions in patches. You don't need to do the whole file in one patch, but I'd rather not have 40 tiny patches either.
Also, you can skip the whitespace changes. The only time whitespace changes are really accepted is when they're on lines already affect by code-level changes. This is to prevent unnecessary churn in the codebase.
#10
in reply to:
↑ 9
@
10 years ago
Replying to DrewAPicture:
Great. Honestly, I'd prefer you group up PHPDoc changes for multiple functions in patches. You don't need to do the whole file in one patch, but I'd rather not have 40 tiny patches either.
Sorry, didn't see this until I started adding the individual patches. I'll merge then into one more patch, and that should be it for this ticket.
#12
@
10 years ago
- Owner set to DrewAPicture
- Status changed from new to reviewing
This might be 4.0 material
Looks good, @morganestes.
A couple notes from a read through:
_http_build_query()
seem to have some spacing issues around the paramswp_filter_object_list()