mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Coding Standards: Always use parentheses when instantiating an object.
Note: This will be enforced by WPCS 3.0.0. Props jrf. See #56791. git-svn-id: https://develop.svn.wordpress.org/trunk@54891 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -230,7 +230,7 @@ class Tests_Cache extends WP_UnitTestCase {
|
||||
// Make sure objects are cloned going to and from the cache.
|
||||
public function test_object_refs() {
|
||||
$key = __FUNCTION__ . '_1';
|
||||
$object_a = new stdClass;
|
||||
$object_a = new stdClass();
|
||||
$object_a->foo = 'alpha';
|
||||
$this->cache->set( $key, $object_a );
|
||||
$object_a->foo = 'bravo';
|
||||
@@ -240,7 +240,7 @@ class Tests_Cache extends WP_UnitTestCase {
|
||||
$this->assertSame( 'bravo', $object_a->foo );
|
||||
|
||||
$key = __FUNCTION__ . '_2';
|
||||
$object_a = new stdClass;
|
||||
$object_a = new stdClass();
|
||||
$object_a->foo = 'alpha';
|
||||
$this->cache->add( $key, $object_a );
|
||||
$object_a->foo = 'bravo';
|
||||
|
||||
Reference in New Issue
Block a user