Make WordPress Core


Ignore:
Timestamp:
09/15/2019 11:03:45 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Code Modernisation: Introduce the spread operator in tests/phpunit/*.

Rather than relying func_get_args() to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r45607 r46127  
    25422542     *
    25432543     * @see Tests_WP_Customize_Manager::test_set_post_value()
    2544      */
    2545     function capture_customize_post_value_set_actions() {
     2544     *
     2545     * @param mixed ...$args Optional arguments passed to the action.
     2546     */
     2547    function capture_customize_post_value_set_actions( ...$args ) {
    25462548        $action = current_action();
    2547         $args   = func_get_args();
    25482549        $this->captured_customize_post_value_set_actions[] = compact( 'action', 'args' );
    25492550    }
Note: See TracChangeset for help on using the changeset viewer.