aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
diff options
context:
space:
mode:
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>2020-02-28 16:13:53 +0100
committerKrinkle <krinklemail@gmail.com>2020-03-04 21:18:30 +0000
commit6b2c9deef51a63221e99171d3229a6104d22f665 (patch)
tree5e285923569f935b1f77fee324f43ae67b23d0a2 /tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
parent6512ef160c0323b2bb4e89c4eedc8146d4743ae7 (diff)
downloadmediawikicore-6b2c9deef51a63221e99171d3229a6104d22f665.tar.gz
mediawikicore-6b2c9deef51a63221e99171d3229a6104d22f665.zip
Replace all `new stdClass()` with identical `(object)[]`
This should be the exact same. Its more a style change than anything. So why do it then? * I believe this is much less confusing than code mentioning a weird "standard class". Barely anybody knows what this is, and what the difference between "object" and "stdClass" is. * The code is shorter. * It's even faster. In my micro benchmark it's twice as fast. Change-Id: I7ee0e8ae6d9264a89b6cd1dd861f0466ae620ccc
Diffstat (limited to 'tests/phpunit/includes/resourceloader/ResourceLoaderTest.php')
-rw-r--r--tests/phpunit/includes/resourceloader/ResourceLoaderTest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
index 2695907f88d6..0aace789d10f 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
@@ -114,7 +114,7 @@ class ResourceLoaderTest extends ResourceLoaderTestCase {
$resourceLoader = new EmptyResourceLoader();
$this->expectException( InvalidArgumentException::class );
$this->expectExceptionMessage( 'Invalid module info' );
- $resourceLoader->register( [ 'test' => new stdClass() ] );
+ $resourceLoader->register( [ 'test' => (object)[] ] );
}
/**