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

    r52338 r54891  
    66class Tests_Dependencies extends WP_UnitTestCase {
    77    public function test_add() {
    8         $dep = new WP_Dependencies;
     8        $dep = new WP_Dependencies();
    99
    1010        $this->assertTrue( $dep->add( 'one', '' ) );
     
    1919
    2020    public function test_remove() {
    21         $dep = new WP_Dependencies;
     21        $dep = new WP_Dependencies();
    2222
    2323        $this->assertTrue( $dep->add( 'one', '' ) );
     
    3232
    3333    public function test_enqueue() {
    34         $dep = new WP_Dependencies;
     34        $dep = new WP_Dependencies();
    3535
    3636        $this->assertTrue( $dep->add( 'one', '' ) );
     
    4848
    4949    public function test_dequeue() {
    50         $dep = new WP_Dependencies;
     50        $dep = new WP_Dependencies();
    5151
    5252        $this->assertTrue( $dep->add( 'one', '' ) );
     
    6868
    6969    public function test_enqueue_args() {
    70         $dep = new WP_Dependencies;
     70        $dep = new WP_Dependencies();
    7171
    7272        $this->assertTrue( $dep->add( 'one', '' ) );
     
    8686
    8787    public function test_dequeue_args() {
    88         $dep = new WP_Dependencies;
     88        $dep = new WP_Dependencies();
    8989
    9090        $this->assertTrue( $dep->add( 'one', '' ) );
     
    113113     */
    114114    public function test_query_and_registered_enqueued() {
    115         $dep = new WP_Dependencies;
     115        $dep = new WP_Dependencies();
    116116
    117117        $this->assertTrue( $dep->add( 'one', '' ) );
     
    139139
    140140    function test_enqueue_before_register() {
    141         $dep = new WP_Dependencies;
     141        $dep = new WP_Dependencies();
    142142
    143143        $this->assertArrayNotHasKey( 'one', $dep->registered );
Note: See TracChangeset for help on using the changeset viewer.