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/post.php

    r54872 r54891  
    159159        _unregister_post_type( $post_type );
    160160        $count = wp_count_posts( $post_type, 'readable' );
    161         $this->assertEquals( new stdClass, $count );
     161        $this->assertEquals( new stdClass(), $count );
    162162    }
    163163
     
    602602            'null'      => array( null ),
    603603            'true'      => array( true ),
    604             'an object' => array( new stdClass ),
     604            'an object' => array( new stdClass() ),
    605605        );
    606606    }
Note: See TracChangeset for help on using the changeset viewer.