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/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php

    r54090 r54891  
    175175    public function test_prepare_item() {
    176176        $tax      = get_taxonomy( 'category' );
    177         $endpoint = new WP_REST_Taxonomies_Controller;
    178         $request  = new WP_REST_Request;
     177        $endpoint = new WP_REST_Taxonomies_Controller();
     178        $request  = new WP_REST_Request();
    179179        $request->set_param( 'context', 'edit' );
    180180        $response = $endpoint->prepare_item_for_response( $tax, $request );
     
    184184    public function test_prepare_item_limit_fields() {
    185185        $tax      = get_taxonomy( 'category' );
    186         $request  = new WP_REST_Request;
    187         $endpoint = new WP_REST_Taxonomies_Controller;
     186        $request  = new WP_REST_Request();
     187        $endpoint = new WP_REST_Taxonomies_Controller();
    188188        $request->set_param( 'context', 'edit' );
    189189        $request->set_param( '_fields', 'id,name' );
Note: See TracChangeset for help on using the changeset viewer.