Make WordPress Core


Ignore:
Timestamp:
11/29/2022 03:49:49 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Always use parentheses when instantiating an object.

Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r54663 r54891  
    256256
    257257    // Post types.
    258     $controller = new WP_REST_Post_Types_Controller;
     258    $controller = new WP_REST_Post_Types_Controller();
    259259    $controller->register_routes();
    260260
    261261    // Post statuses.
    262     $controller = new WP_REST_Post_Statuses_Controller;
     262    $controller = new WP_REST_Post_Statuses_Controller();
    263263    $controller->register_routes();
    264264
    265265    // Taxonomies.
    266     $controller = new WP_REST_Taxonomies_Controller;
     266    $controller = new WP_REST_Taxonomies_Controller();
    267267    $controller->register_routes();
    268268
     
    279279
    280280    // Users.
    281     $controller = new WP_REST_Users_Controller;
     281    $controller = new WP_REST_Users_Controller();
    282282    $controller->register_routes();
    283283
     
    287287
    288288    // Comments.
    289     $controller = new WP_REST_Comments_Controller;
     289    $controller = new WP_REST_Comments_Controller();
    290290    $controller->register_routes();
    291291
     
    319319
    320320    // Global Styles.
    321     $controller = new WP_REST_Global_Styles_Controller;
     321    $controller = new WP_REST_Global_Styles_Controller();
    322322    $controller->register_routes();
    323323
    324324    // Settings.
    325     $controller = new WP_REST_Settings_Controller;
     325    $controller = new WP_REST_Settings_Controller();
    326326    $controller->register_routes();
    327327
    328328    // Themes.
    329     $controller = new WP_REST_Themes_Controller;
     329    $controller = new WP_REST_Themes_Controller();
    330330    $controller->register_routes();
    331331
     
    563563         */
    564564        $wp_rest_server_class = apply_filters( 'wp_rest_server_class', 'WP_REST_Server' );
    565         $wp_rest_server       = new $wp_rest_server_class;
     565        $wp_rest_server       = new $wp_rest_server_class();
    566566
    567567        /**
Note: See TracChangeset for help on using the changeset viewer.