jenkins-bot has submitted this change and it was merged.

Change subject: Use EntityDocument instead of Entity
......................................................................


Use EntityDocument instead of Entity

Change-Id: I99b174d232a41b85c80c5f1604a383afe661713e
---
M repo/includes/api/ApiWikibase.php
M repo/includes/content/EntityContentFactory.php
M repo/includes/store/EntityPermissionChecker.php
3 files changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/api/ApiWikibase.php 
b/repo/includes/api/ApiWikibase.php
index de7e1ea..c95bc20 100644
--- a/repo/includes/api/ApiWikibase.php
+++ b/repo/includes/api/ApiWikibase.php
@@ -250,13 +250,13 @@
        /**
         * Check the rights for the user accessing the module.
         *
-        * @param $entity Entity the entity to check
+        * @param $entity EntityDocument the entity to check
         * @param $user User doing the action
         *
         * @return Status the check's result
         * @todo: use this also to check for read access in ApiGetEntities, etc
         */
-       protected function checkPermissions( Entity $entity, User $user ) {
+       protected function checkPermissions( EntityDocument $entity, User $user 
) {
                $permissions = $this->getRequiredPermissions( $entity );
                $status = Status::newGood();
 
diff --git a/repo/includes/content/EntityContentFactory.php 
b/repo/includes/content/EntityContentFactory.php
index 6b675d5..05b9d52 100644
--- a/repo/includes/content/EntityContentFactory.php
+++ b/repo/includes/content/EntityContentFactory.php
@@ -10,7 +10,7 @@
 use Title;
 use User;
 use Wikibase\Content\EntityInstanceHolder;
-use Wikibase\DataModel\Entity\Entity;
+use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\EntityContent;
@@ -219,11 +219,11 @@
         *
         * @since 0.3
         *
-        * @param Entity $entity
+        * @param EntityDocument $entity
         *
         * @return EntityContent
         */
-       public function newFromEntity( Entity $entity ) {
+       public function newFromEntity( EntityDocument $entity ) {
                $handler = $this->getContentHandlerForType( $entity->getType() 
);
                return $handler->makeEntityContent( new EntityInstanceHolder( 
$entity ) );
        }
@@ -323,14 +323,14 @@
         *
         * @param User $user
         * @param string $permission
-        * @param Entity $entity
+        * @param EntityDocument $entity
         * @param string $quick
         *
         * @return Status a status object representing the check's result.
         *
         * @todo Move to a separate service (merge into WikiPageEntityStore?)
         */
-       public function getPermissionStatusForEntity( User $user, $permission, 
Entity $entity, $quick = '' ) {
+       public function getPermissionStatusForEntity( User $user, $permission, 
EntityDocument $entity, $quick = '' ) {
                $id = $entity->getId();
                $status = null;
 
diff --git a/repo/includes/store/EntityPermissionChecker.php 
b/repo/includes/store/EntityPermissionChecker.php
index fdd7d33..166f0ca 100644
--- a/repo/includes/store/EntityPermissionChecker.php
+++ b/repo/includes/store/EntityPermissionChecker.php
@@ -4,7 +4,7 @@
 
 use Status;
 use User;
-use Wikibase\DataModel\Entity\Entity;
+use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
 
 /**
@@ -23,7 +23,7 @@
         *
         * @param User $user
         * @param string $permission
-        * @param Entity $entity
+        * @param EntityDocument $entity
         * @param string $quick Flag for allowing quick permission checking. If 
set to
         * 'quick', implementations may return inaccurate results if 
determining the accurate result
         * would be slow (e.g. checking for cascading protection).
@@ -32,7 +32,7 @@
         *
         * @return Status a status object representing the check's result.
         */
-       public function getPermissionStatusForEntity( User $user, $permission, 
Entity $entity, $quick = '' );
+       public function getPermissionStatusForEntity( User $user, $permission, 
EntityDocument $entity, $quick = '' );
 
        /**
         * Check whether the given user has the given permission on an entity.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99b174d232a41b85c80c5f1604a383afe661713e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to