Aude has uploaded a new change for review.

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

Change subject: Fix long lines in WikiPageEntityStore
......................................................................

Fix long lines in WikiPageEntityStore

and fixed a typo in one of the exception messages

Change-Id: I2f3f18339dff3a414e9b23a18e43158c8b6e9b34
---
M repo/includes/store/sql/WikiPageEntityStore.php
1 file changed, 22 insertions(+), 4 deletions(-)


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

diff --git a/repo/includes/store/sql/WikiPageEntityStore.php 
b/repo/includes/store/sql/WikiPageEntityStore.php
index 746f024..e73aeed 100644
--- a/repo/includes/store/sql/WikiPageEntityStore.php
+++ b/repo/includes/store/sql/WikiPageEntityStore.php
@@ -119,7 +119,13 @@
         * @throws StorageException
         * @return EntityRevision
         */
-       public function saveEntity( EntityDocument $entity, $summary, User 
$user, $flags = 0, $baseRevId = false ) {
+       public function saveEntity(
+               EntityDocument $entity,
+               $summary,
+               User $user,
+               $flags = 0,
+               $baseRevId = false
+       ) {
                if ( $entity->getId() === null ) {
                        if ( ( $flags & EDIT_NEW ) !== EDIT_NEW ) {
                                throw new StorageException( Status::newFatal( 
'edit-gone-missing' ) );
@@ -131,7 +137,11 @@
                $content = $this->contentFactory->newFromEntity( $entity );
                $revision = $this->saveEntityContent( $content, $summary, 
$user, $flags, $baseRevId );
 
-               $entityRevision = new EntityRevision( $entity, 
$revision->getId(), $revision->getTimestamp() );
+               $entityRevision = new EntityRevision(
+                       $entity,
+                       $revision->getId(),
+                       $revision->getTimestamp()
+               );
 
                $this->dispatcher->dispatch( 'entityUpdated', $entityRevision );
 
@@ -151,7 +161,13 @@
         * @throws StorageException
         * @return int The new revision ID
         */
-       public function saveRedirect( EntityRedirect $redirect, $summary, User 
$user, $flags = 0, $baseRevId = false ) {
+       public function saveRedirect(
+               EntityRedirect $redirect,
+               $summary,
+               User $user,
+               $flags = 0,
+               $baseRevId = false
+       ) {
                $content = $this->contentFactory->newFromRedirect( $redirect );
 
                if ( !$content ) {
@@ -264,7 +280,9 @@
                $ok = $page->doDeleteArticle( $reason, false, 0, true, $error, 
$user );
 
                if ( !$ok ) {
-                       throw new StorageException( 'Faield to delete ' . 
$entityId->getSerialization(). ': ' . $error );
+                       throw new StorageException(
+                               'Failed to delete ' . 
$entityId->getSerialization(). ': ' . $error
+                       );
                }
 
                $this->dispatcher->dispatch( 'entityDeleted', $entityId );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f3f18339dff3a414e9b23a18e43158c8b6e9b34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>

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

Reply via email to