Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/174112
Change subject: Drop optional empty array() constructor parameters
......................................................................
Drop optional empty array() constructor parameters
Change-Id: Ibf6405642110272aece50814c8a4259ffc7c346c
---
M lib/tests/phpunit/TermTest.php
M repo/tests/phpunit/includes/Validators/CompositeFingerprintValidatorTest.php
M
repo/tests/phpunit/includes/Validators/LabelDescriptionUniquenessValidatorTest.php
M repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
M repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
M repo/tests/phpunit/includes/api/EntityTestHelper.php
M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
7 files changed, 27 insertions(+), 27 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/12/174112/1
diff --git a/lib/tests/phpunit/TermTest.php b/lib/tests/phpunit/TermTest.php
index a28dd9b..863deb1 100644
--- a/lib/tests/phpunit/TermTest.php
+++ b/lib/tests/phpunit/TermTest.php
@@ -82,8 +82,8 @@
$tests = array();
$tests[] = array( // #0
- new Term( array() ),
- new Term( array() ),
+ new Term(),
+ new Term(),
true
);
@@ -166,19 +166,19 @@
public static function provideEquals() {
$tests = array(
array( // #0
- new Term( array() ),
+ new Term(),
null,
false
),
array( // #1
- new Term( array() ),
+ new Term(),
false,
false
),
array( // #2
- new Term( array() ),
+ new Term(),
"",
false
),
diff --git
a/repo/tests/phpunit/includes/Validators/CompositeFingerprintValidatorTest.php
b/repo/tests/phpunit/includes/Validators/CompositeFingerprintValidatorTest.php
index fe84366..2479e8d 100644
---
a/repo/tests/phpunit/includes/Validators/CompositeFingerprintValidatorTest.php
+++
b/repo/tests/phpunit/includes/Validators/CompositeFingerprintValidatorTest.php
@@ -48,9 +48,9 @@
*/
public function testValidateFingerprint( $validators, $expected ) {
$fingerprint = new Fingerprint(
- new TermList( array() ),
- new TermList( array() ),
- new AliasGroupList( array() )
+ new TermList(),
+ new TermList(),
+ new AliasGroupList()
);
$validator = new CompositeFingerprintValidator( $validators );
diff --git
a/repo/tests/phpunit/includes/Validators/LabelDescriptionUniquenessValidatorTest.php
b/repo/tests/phpunit/includes/Validators/LabelDescriptionUniquenessValidatorTest.php
index 04bce91..45e5223 100644
---
a/repo/tests/phpunit/includes/Validators/LabelDescriptionUniquenessValidatorTest.php
+++
b/repo/tests/phpunit/includes/Validators/LabelDescriptionUniquenessValidatorTest.php
@@ -43,8 +43,8 @@
'no description' => array(
new Fingerprint(
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
- new TermList( array() ),
- new AliasGroupList( array() )
+ new TermList(),
+ new AliasGroupList()
),
$q99
),
@@ -52,7 +52,7 @@
new Fingerprint(
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
new TermList( array( new Term( 'de',
'Foo' ) ) ),
- new AliasGroupList( array() )
+ new AliasGroupList()
),
$q99
),
@@ -62,7 +62,7 @@
new Fingerprint(
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
- new AliasGroupList( array() )
+ new AliasGroupList()
),
new PropertyId( 'P666' ) // ignore conflicts
with P666
),
@@ -71,7 +71,7 @@
new Fingerprint(
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
- new AliasGroupList( array() )
+ new AliasGroupList()
),
$q99,
array( 'en' ) // only consider conflicts in
english
@@ -151,7 +151,7 @@
$badFingerprint = new Fingerprint(
new TermList( array( new Term( 'de', 'DUPE' ) ) ),
new TermList( array( new Term( 'de', 'DUPE' ) ) ),
- new AliasGroupList( array() )
+ new AliasGroupList()
);
return array(
diff --git
a/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
b/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
index 160583a..3ce2a94 100644
--- a/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
+++ b/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
@@ -42,8 +42,8 @@
'no conflict' => array(
new Fingerprint(
new TermList( array( new Term( 'de',
'Foo' ) ) ),
- new TermList( array() ),
- new AliasGroupList( array() )
+ new TermList(),
+ new AliasGroupList()
),
$p99
),
@@ -51,8 +51,8 @@
// the mock considers "DUPE" a dupe with P666
new Fingerprint(
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
- new TermList( array() ),
- new AliasGroupList( array() )
+ new TermList(),
+ new AliasGroupList()
),
new PropertyId( 'P666' ) // ignore conflicts
with P666
),
@@ -60,8 +60,8 @@
// the mock considers "DUPE" a dupe with P666
new Fingerprint(
new TermList( array( new Term( 'de',
'DUPE' ) ) ),
- new TermList( array() ),
- new AliasGroupList( array() )
+ new TermList(),
+ new AliasGroupList()
),
$p99,
array( 'en' ) // only consider conflicts in
english
@@ -106,8 +106,8 @@
public function invalidFingerprintProvider() {
$badFingerprint = new Fingerprint(
new TermList( array( new Term( 'de', 'DUPE' ) ) ),
- new TermList( array( ) ),
- new AliasGroupList( array() )
+ new TermList(),
+ new AliasGroupList()
);
return array(
diff --git
a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
index ce0ecd8..832f532 100644
--- a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
+++ b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
@@ -55,7 +55,7 @@
new TermList( array(
new Term( 'en', 'bla' ),
) ),
- new AliasGroupList( array() )
+ new AliasGroupList()
);
$labelDupeFingerprint = new Fingerprint(
@@ -65,7 +65,7 @@
new TermList( array(
new Term( 'en', 'DUPE' ),
) ),
- new AliasGroupList( array() )
+ new AliasGroupList()
);
$q99 = new ItemId( 'Q99' );
diff --git a/repo/tests/phpunit/includes/api/EntityTestHelper.php
b/repo/tests/phpunit/includes/api/EntityTestHelper.php
index 058ea54..c967b14 100644
--- a/repo/tests/phpunit/includes/api/EntityTestHelper.php
+++ b/repo/tests/phpunit/includes/api/EntityTestHelper.php
@@ -682,7 +682,7 @@
new Term( 'en', 'City in
Saxony.' ),
)
),
- new AliasGroupList( array() )
+ new AliasGroupList()
)
);
@@ -703,7 +703,7 @@
new Term( 'zh-hk', "廣東的省會。" ),
)
),
- new AliasGroupList( array() )
+ new AliasGroupList()
)
);
diff --git a/repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
b/repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
index 35e0bce..d755542 100644
--- a/repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
+++ b/repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
@@ -127,7 +127,7 @@
$fingerprint = new Fingerprint(
new TermList( $labels ),
new TermList( $descriptions ),
- new AliasGroupList( array() )
+ new AliasGroupList()
);
$label = new Term( array( 'termType' => Term::TYPE_LABEL ) );
--
To view, visit https://gerrit.wikimedia.org/r/174112
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf6405642110272aece50814c8a4259ffc7c346c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits