Skip to content

Docs: Document three missing parameters in core classes - #12823

Open
jigneshbhavani wants to merge 1 commit into
WordPress:trunkfrom
jigneshbhavani:fix/64896-docblock-params-c
Open

Docs: Document three missing parameters in core classes#12823
jigneshbhavani wants to merge 1 commit into
WordPress:trunkfrom
jigneshbhavani:fix/64896-docblock-params-c

Conversation

@jigneshbhavani

Copy link
Copy Markdown

Three core-owned methods are missing a @param tag.

WP_HTTP_IXR_Client::query()

The docblock already records that the ...$args parameter was formalized in 5.5.0 by adding it to the signature, but the parameter itself was never documented. WP_Dependency::__construct() carries the same @since wording and does document it as @param mixed ...$args Dependency information., so this brings the two back in line.

The description matches what the method does with the value: array_shift( $args ) takes the method name, and the remainder are the arguments passed to it.

WP_REST_Font_Collections_Controller::get_items_permissions_check()

Has @since and @return but no @param for $request.

WP_REST_Font_Families_Controller::get_endpoint_args_for_item_schema()

Has @since and @return but no @param for $method.

Testing

  • --group xmlrpc passes, 318 tests.
  • The font controller REST tests pass, 143 tests.
  • phpcs clean on all three files.
  • php -l clean on all three files.

Documentation only, no behaviour change.

Trac ticket: https://core.trac.wordpress.org/ticket/64896

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Drafting the tags and this description. I confirmed each gap against the current file, checked the variadic wording against how core documents the same parameter on WP_Dependency::__construct(), verified the ...$args description against the method body, confirmed no existing ticket or pull request already covers these three, ran the xmlrpc and font REST tests plus phpcs, and I take responsibility for the result.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props bejignesh, soean.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@Soean Soean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Comment thread src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php Outdated
Comment thread src/wp-includes/class-wp-http-ixr-client.php
WP_HTTP_IXR_Client::query() records in its @SInCE tags that the `...$args`
parameter was formalized in 5.5.0, but never documented the parameter itself.
WP_Dependency::__construct() carries the same @SInCE wording and does document
it, so this brings the two back in line.

WP_REST_Font_Collections_Controller::get_items_permissions_check() and
WP_REST_Font_Families_Controller::get_endpoint_args_for_item_schema() both had
a @SInCE and a @return tag but no @param at all.

Two nearby issues in the same docblocks, raised in review, are fixed as well.
The @return on get_items_permissions_check() described write access for an
item, but the method is a read check on a collection that returns
rest_cannot_read, so it now uses the same wording as the font families and
font faces controllers. WP_HTTP_IXR_Client::query() gains the summary line it
was missing.

See #64896.
@jigneshbhavani
jigneshbhavani force-pushed the fix/64896-docblock-params-c branch from 1d2a10c to 5f5d672 Compare August 4, 2026 20:15
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.

2 participants