Skip to content

Docs: Remove the blank line between @param and @return in core docblocks - #79

Closed
mukeshpanchal27 wants to merge 12 commits into
trunkfrom
docs/param-return-blank-line
Closed

Docs: Remove the blank line between @param and @return in core docblocks#79
mukeshpanchal27 wants to merge 12 commits into
trunkfrom
docs/param-return-blank-line

Conversation

@mukeshpanchal27

Copy link
Copy Markdown
Owner

Summary

The PHP inline documentation standards place @return immediately after the last @param tag, with no blank line between them:

/**
 * Summary.
 *
 * @since 6.0.0
 *
 * @param string $var Description.
 * @return string Description.
 */

This corrects 44 docblocks across 33 files in src/wp-includes that used a line break between the two tags.

Note on JavaScript

This applies to PHP only. The JavaScript documentation standards do require a blank line before @return, so JSDoc blocks were deliberately left untouched. An initial scan surfaced a large number of .js matches; all were correct as written and excluded.

Scope

Intentionally left out of this change:

Group Occurrences Reason
src/wp-includes/blocks/ 104 Synced from Gutenberg; fixes belong upstream in @wordpress/block-library or they revert on the next package sync
tests/phpunit/ 65 Separate change; safe to do but kept out to keep this diff focused
Bundled third-party 416 ID3, PHPMailer, SimplePie, Requests, sodium_compat, Text/Diff, php-ai-client — these track upstream

Verification

  • Diff audit: every changed line is a removed * blank comment line — no other content touched. 33 files changed, 0 insertions, 44 deletions.
  • Re-scan of core src/: 0 remaining occurrences.
  • php -l clean on all 33 changed files.

Documentation-only; no functional change.

🤖 Generated with Claude Code

…cblocks.

The PHP inline documentation standards place `@return` immediately after the
last `@param` tag, with no blank line separating them. This corrects 44
docblocks across 33 files in `src/wp-includes` that used a line break between
the two tags.

Note that this only applies to PHP. The JavaScript documentation standards do
require a blank line before `@return`, so JSDoc blocks are left unchanged.

Files under `src/wp-includes/blocks/`, the test suite, and bundled third-party
libraries are out of scope for this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
joedolson and others added 11 commits August 16, 2026 16:10
Reverts the focus and hover style changes in the admin toolbar. Reverts [63190], [63009], and [63188], restoring the appearance in WordPress 7.0.

Props fushar, wildworks, ravichudasama01, afercia, joen, keoshi, cbusquets1989, annezazu.
Fixes #65849. See #65445.

git-svn-id: https://develop.svn.wordpress.org/trunk@63306 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the behavior of `url_to_postid()`, which treated a `www.` string anywhere in the URL as optional, breaking some URLs. Anchor the string so that is only considered optional when at the beginning of a URL string.

Follow up to [63207].

Props youknowriad, johnbillion, wildworks, irozum, joedolson.
Fixes #65016.

git-svn-id: https://develop.svn.wordpress.org/trunk@63307 602fd350-edb4-49c9-b593-d223f7449a82
Add gzip directives to the nginx config template used by the local Docker environment so that HTML, JavaScript, CSS, JSON, XML, and SVG responses can be served compressed, matching normal production behavior. Without compression, frontend performance analysis against the local environment is not representative of a real user's experience.

Compression is controlled by a new `LOCAL_NGINX_COMPRESSION` option, and it defaults to `off` so that it is opt-in.

Since this changes `docker-compose.yml` in addition to the nginx template, existing checkouts need to recreate the web server container to pick up the change.

Developed in WordPress#12529.
Follow-up to r45745, r45783.

Props westonruter, jblz.
Fixes #65634.


git-svn-id: https://develop.svn.wordpress.org/trunk@63308 602fd350-edb4-49c9-b593-d223f7449a82
When an `npx` command is run, the specified package will be downloaded and installed when it does not exist locally. This will also install all of the package’s direct and transitive dependencies, and any installation scripts present for every installed package are run. This is potentially dangerous because a compromised package would be able to run code on a local machine or within a GitHub Actions workflow runner.

This replaces every `npx` call with `npm exec --no`, which runs an installed binary only and will fail when the package is missing. Additionally, `update-browserslist-db` is now defined as a direct `devDependency`.

Props adrianmoldovanwp, desrosj, lancewillett, johnbillion.
Fixes #65864.

git-svn-id: https://develop.svn.wordpress.org/trunk@63309 602fd350-edb4-49c9-b593-d223f7449a82
…w runs.

GitHub Actions expressions and contexts do not currently expose the details about a workflow run necessary to determine whether a workflow has timed out. Instead, all timed out runs are considered `cancelled`. However, the REST API does return a `timed_out` conclusion in this scenario.

This creates a new job for the `timed_out` conlclusion and adjusts the logic for cancelled Slack notifications to provide more useful notifications.

Props lancewillett.
See #65845.

git-svn-id: https://develop.svn.wordpress.org/trunk@63310 602fd350-edb4-49c9-b593-d223f7449a82
Replaces eight generic `assertTrue( is_callable() )` assertions with PHPUnit's dedicated `assertIsCallable()` assertion.

Developed in WordPress#13017.

Follow-up to r50996, r61760.

Props raulsalvat, Soean.
See #65819.

git-svn-id: https://develop.svn.wordpress.org/trunk@63311 602fd350-edb4-49c9-b593-d223f7449a82
`validate_file()` runs `wp_normalize_path()` before testing for a drive letter at offset 1. That call folds backslashes to forward slashes, but its slash-collapsing regex deliberately spares a leading `//` to allow for network shares. UNC paths such as `//server/share`, and the device namespaces `//./` and `//?/`, therefore arrived with no colon in the second byte and returned `0` rather than `2`.

The docblock described a return value of `2` as meaning the path contains a Windows drive path, which reads as a guarantee that Windows absolute paths are screened. Most forms were not. Anchoring a second test to the start of the string closes that gap. Stream wrappers stay at `0` by two separate mechanisms: a registered wrapper keeps its `://` through the scheme split, placing those slashes past the second byte, while an unregistered scheme has its `//` collapsed.

Code `2` now fires on strictly more inputs and never fewer, so no existing rejection becomes an acceptance.

Absolute POSIX paths such as `/etc/passwd` continue to return `0`; screening those would be a larger change affecting plugins that pass absolute template paths. Paths beginning with two successive slashes are now rejected regardless of platform, which includes the implementation-defined POSIX doubled-slash form, consistent with the assumption `wp_normalize_path()` already makes about a leading `//`.

Props zieladam, SergeyBiryukov.
Fixes #51368.


git-svn-id: https://develop.svn.wordpress.org/trunk@63312 602fd350-edb4-49c9-b593-d223f7449a82
This temporarily marks the `SLACK_GHA_TIMEOUT_WEBHOOK` secret as optional until [63310] can be backported to older branches to avoid workflow failures.

Follow-up to [63310].

See #65845.

git-svn-id: https://develop.svn.wordpress.org/trunk@63313 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a couple of functions with return-type problems. One is resolved by adding the missing `void` type, while the other is resolved by updating the function to conform to the existing `string` return type contract, a likely oversight in the original commit.

This change was part of Contributor Day at WordCamp US 2026.

Developed in: WordPress#13081
Discussed in: https://core.trac.wordpress.org/ticket/65817

Props dmsnell, nomadmystic.
See #65817.


git-svn-id: https://develop.svn.wordpress.org/trunk@63314 602fd350-edb4-49c9-b593-d223f7449a82
…quests.

This workflow has not proven to be as useful as originally hoped, so it's being removed to reduce maintenance burden. All workflows that run the build script already fail if they result in untracked changes.

Developed in WordPress#13087

Props desrosj

See #65845


git-svn-id: https://develop.svn.wordpress.org/trunk@63315 602fd350-edb4-49c9-b593-d223f7449a82
@mukeshpanchal27

Copy link
Copy Markdown
Owner Author

Committed in core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants