Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Remove/replace some MW specific code
......................................................................

Remove/replace some MW specific code

Change-Id: Iabb09eded5ee9bbba2306ef7116ff75632cbb790
---
M DataModel/DataModel/Entity/Item.php
1 file changed, 3 insertions(+), 7 deletions(-)


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

diff --git a/DataModel/DataModel/Entity/Item.php 
b/DataModel/DataModel/Entity/Item.php
index 01ccdca..649c4bf 100644
--- a/DataModel/DataModel/Entity/Item.php
+++ b/DataModel/DataModel/Entity/Item.php
@@ -3,7 +3,7 @@
 namespace Wikibase;
 
 use Diff\Patcher;
-use MWException;
+use InvalidArgumentException;
 use OutOfBoundsException;
 use Wikibase\DataModel\SimpleSiteLink;
 
@@ -33,7 +33,6 @@
  *
  * @licence GNU GPL v2+
  * @author Jeroen De Dauw < [email protected] >
- * @author Daniel Kinzler
  */
 class Item extends Entity {
 
@@ -122,15 +121,12 @@
         * @return array a list of SiteLink objects
         */
        public function getSiteLinks() {
-               wfProfileIn( __METHOD__ );
-
                $links = array();
 
                foreach ( $this->data['links'] as $globalSiteId => $title ) {
                        $links[] = SiteLink::newFromText( $globalSiteId, $title 
);
                }
 
-               wfProfileOut( __METHOD__ );
                return $links;
        }
 
@@ -264,11 +260,11 @@
         * @param Entity $entity
         *
         * @return array
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        protected function entityToDiffArray( Entity $entity ) {
                if ( !( $entity instanceof Item ) ) {
-                       throw new MWException( 'ItemDiffer only accepts Item 
objects' );
+                       throw new InvalidArgumentException( 'ItemDiffer only 
accepts Item objects' );
                }
 
                $array = parent::entityToDiffArray( $entity );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iabb09eded5ee9bbba2306ef7116ff75632cbb790
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