Make WordPress Core


Ignore:
Timestamp:
09/12/2023 03:21:02 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Include one space after function keyword for closures.

Note: This is enforced by WPCS 3.0.0.

Reference: WPCS: PR #2328 Core: properly check formatting of function declaration statements.

Props jrf.
See #59161, #58831.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-server.php

    r56421 r56559  
    938938     */
    939939    public function test_link_embedding_returning_wp_error() {
    940         $return_wp_error = static function() {
     940        $return_wp_error = static function () {
    941941            return new WP_Error( 'some-error', 'This is not valid!' );
    942942        };
     
    16721672            array(
    16731673                'methods'             => array( 'GET' ),
    1674                 'callback'            => static function() {
     1674                'callback'            => static function () {
    16751675                    return new WP_REST_Response( 'data', 204 );
    16761676                },
     
    16831683            array(
    16841684                'methods'             => array( 'GET' ),
    1685                 'callback'            => static function() {
     1685                'callback'            => static function () {
    16861686                    return new WP_REST_Response( 'data', 204 );
    16871687                },
     
    20812081        add_filter(
    20822082            'rest_get_max_batch_size',
    2083             static function() {
     2083            static function () {
    20842084                return 5;
    20852085            }
     
    21892189                array(
    21902190                    'methods'             => \WP_REST_Server::READABLE,
    2191                     'callback'            => static function() {
     2191                    'callback'            => static function () {
    21922192                        return new \WP_REST_Response( INF );
    21932193                    },
Note: See TracChangeset for help on using the changeset viewer.