Make WordPress Core


Ignore:
Timestamp:
11/29/2022 03:49:49 PM (4 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-comments-controller.php

    r54527 r54891  
    153153        public function set_up() {
    154154                parent::set_up();
    155                 $this->endpoint = new WP_REST_Comments_Controller;
     155                $this->endpoint = new WP_REST_Comments_Controller();
    156156                if ( is_multisite() ) {
    157157                        update_site_option( 'site_admins', array( 'superadmin' ) );
    … …  
    954954                wp_set_current_user( self::$admin_id );
    955955
    956                 $endpoint = new WP_REST_Comments_Controller;
     956                $endpoint = new WP_REST_Comments_Controller();
    957957                $request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%d', self::$approved_id ) );
    958958                $request->set_param( 'context', 'edit' );
Note: See TracChangeset for help on using the changeset viewer.