Make WordPress Core

Changeset 61505


Ignore:
Timestamp:
01/21/2026 12:14:12 PM (4 months ago)
Author:
johnbillion
Message:

Docs: Remove redundant syntax from callable type declarations.

The parameter name is optional in PHPStan but not supported by Psalm. While neither tools are officially supported, this removes the parse error that Psalm users otherwise see.

See https://github.com/php-stubs/wordpress-stubs/issues/410 for some external discussion.

Props farhad0, marian1

See #64224

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/abilities-api/class-wp-ability.php

    r61483 r61505  
    104104     *
    105105     * @since 6.9.0
    106      * @var callable( mixed $input= ): (mixed|WP_Error)
     106     * @var callable(mixed): (mixed|WP_Error)
    107107     */
    108108    protected $execute_callback;
     
    112112     *
    113113     * @since 6.9.0
    114      * @var callable( mixed $input= ): (bool|WP_Error)
     114     * @var callable(mixed): (bool|WP_Error)
    115115     */
    116116    protected $permission_callback;
Note: See TracChangeset for help on using the changeset viewer.