Make WordPress Core


Ignore:
Timestamp:
11/29/2022 03:49:49 PM (22 months 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/cache.php

    r53835 r54891  
    231231    public function test_object_refs() {
    232232        $key           = __FUNCTION__ . '_1';
    233         $object_a      = new stdClass;
     233        $object_a      = new stdClass();
    234234        $object_a->foo = 'alpha';
    235235        $this->cache->set( $key, $object_a );
     
    241241
    242242        $key           = __FUNCTION__ . '_2';
    243         $object_a      = new stdClass;
     243        $object_a      = new stdClass();
    244244        $object_a->foo = 'alpha';
    245245        $this->cache->add( $key, $object_a );
Note: See TracChangeset for help on using the changeset viewer.