Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/245953
Change subject: Remove not needed parameters from ChangeRow constructor ...................................................................... Remove not needed parameters from ChangeRow constructor Change-Id: I2f353a90493f05c9980732513eafbc9ef4029653 --- M client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php M lib/includes/changes/ChangeRow.php M lib/includes/changes/EntityChangeFactory.php M lib/includes/store/sql/ChangeLookup.php M lib/tests/phpunit/changes/ChangeRowTest.php 5 files changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/53/245953/1 diff --git a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php index 2a96dab..426f657 100644 --- a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php +++ b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php @@ -130,7 +130,7 @@ $class = 'Wikibase\ItemChange'; } - $change = new $class( null, $values, false ); + $change = new $class( $values ); $change->setDiff( $diff ); return $change; diff --git a/lib/includes/changes/ChangeRow.php b/lib/includes/changes/ChangeRow.php index 4216dbe..583c42a 100644 --- a/lib/includes/changes/ChangeRow.php +++ b/lib/includes/changes/ChangeRow.php @@ -81,10 +81,9 @@ } /** - * @param null $table Ignored * @param array|null $fields */ - public function __construct( $table = null, $fields = null ) { + public function __construct( array $fields = null ) { $this->setFields( is_array( $fields ) ? $fields : array() ); $this->postConstruct(); diff --git a/lib/includes/changes/EntityChangeFactory.php b/lib/includes/changes/EntityChangeFactory.php index 7cf0525..8f33f3e 100644 --- a/lib/includes/changes/EntityChangeFactory.php +++ b/lib/includes/changes/EntityChangeFactory.php @@ -72,9 +72,7 @@ /** @var EntityChange $instance */ $instance = new $class( - null, - $fields, - false + $fields ); if ( !$instance->hasField( 'object_id' ) ) { diff --git a/lib/includes/store/sql/ChangeLookup.php b/lib/includes/store/sql/ChangeLookup.php index d233262..609de28 100644 --- a/lib/includes/store/sql/ChangeLookup.php +++ b/lib/includes/store/sql/ChangeLookup.php @@ -155,7 +155,7 @@ 'revision_id' => $row->change_revision_id, ); - $changes[] = new $class( null, $data, false ); + $changes[] = new $class( $data ); } return $changes; diff --git a/lib/tests/phpunit/changes/ChangeRowTest.php b/lib/tests/phpunit/changes/ChangeRowTest.php index 59ab373..45b17ff 100644 --- a/lib/tests/phpunit/changes/ChangeRowTest.php +++ b/lib/tests/phpunit/changes/ChangeRowTest.php @@ -25,7 +25,6 @@ return array( array( new ChangeRow( - null, array( 'user_id' => 1, 'time' => '20130101000000' @@ -65,8 +64,7 @@ } public function testGetObjectId() { - $data = array( 'object_id' => 'p100' ); - $change = new ChangeRow( null, $data ); + $change = new ChangeRow( array( 'object_id' => 'p100' ) ); $this->assertEquals( 'p100', -- To view, visit https://gerrit.wikimedia.org/r/245953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f353a90493f05c9980732513eafbc9ef4029653 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits