Jeroen De Dauw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/245986

Change subject: Remove not needed post-construct stuff from ChangeRow
......................................................................

Remove not needed post-construct stuff from ChangeRow

Change-Id: I104c3fc3123788c7638af76066317c13e70110bf
---
M lib/includes/changes/ChangeRow.php
M lib/includes/changes/DiffChange.php
M lib/includes/changes/EntityChange.php
D lib/tests/phpunit/changes/DiffChangeTest.php
4 files changed, 1 insertion(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/86/245986/1

diff --git a/lib/includes/changes/ChangeRow.php 
b/lib/includes/changes/ChangeRow.php
index cdcd63b..15d1765 100644
--- a/lib/includes/changes/ChangeRow.php
+++ b/lib/includes/changes/ChangeRow.php
@@ -67,17 +67,6 @@
 
        public function __construct( array $fields = array() ) {
                $this->setFields( $fields );
-
-               $this->postConstruct();
-       }
-
-       /**
-        * @since 0.1
-        */
-       protected function postConstruct() {
-               if ( !$this->hasField( 'type' ) ) {
-                       $this->setField( 'type', $this->getType() );
-               }
        }
 
        /**
diff --git a/lib/includes/changes/DiffChange.php 
b/lib/includes/changes/DiffChange.php
index 6c834b8..5be5718 100644
--- a/lib/includes/changes/DiffChange.php
+++ b/lib/includes/changes/DiffChange.php
@@ -14,7 +14,7 @@
  * @author Jeroen De Dauw < [email protected] >
  * @author Daniel Kinzler
  */
-class DiffChange extends ChangeRow {
+abstract class DiffChange extends ChangeRow {
 
        /**
         * @since 0.1
diff --git a/lib/includes/changes/EntityChange.php 
b/lib/includes/changes/EntityChange.php
index b897338..6a664f4 100644
--- a/lib/includes/changes/EntityChange.php
+++ b/lib/includes/changes/EntityChange.php
@@ -146,13 +146,6 @@
        }
 
        /**
-        * @see ChangeRow::postConstruct
-        */
-       protected function postConstruct() {
-               // This implementation should not set the type field.
-       }
-
-       /**
         * @param RecentChange $rc
         *
         * @todo rename to setRecentChangeInfo
diff --git a/lib/tests/phpunit/changes/DiffChangeTest.php 
b/lib/tests/phpunit/changes/DiffChangeTest.php
deleted file mode 100644
index 758c50c..0000000
--- a/lib/tests/phpunit/changes/DiffChangeTest.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-namespace Wikibase\Test;
-
-/**
- * @covers Wikibase\DiffChange
- *
- * @since 0.1
- *
- * @group Database
- * @group Wikibase
- * @group WikibaseLib
- * @group WikibaseChange
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < [email protected] >
- * @author Daniel Kinzler
- */
-class DiffChangeTest extends ChangeRowTest {
-
-       /**
-        * @since 0.4
-        * @return string
-        */
-       protected function getRowClass() {
-               return '\Wikibase\DiffChange';
-       }
-
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/245986
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I104c3fc3123788c7638af76066317c13e70110bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to