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

Change subject: Update formatting of externalstore classes
......................................................................


Update formatting of externalstore classes

Change-Id: Ie31c370ba497eedc7458973b704132cf4725cf1f
---
M includes/externalstore/ExternalStore.php
M includes/externalstore/ExternalStoreDB.php
M includes/externalstore/ExternalStoreMedium.php
M includes/externalstore/ExternalStoreMwstore.php
4 files changed, 18 insertions(+), 1 deletion(-)

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



diff --git a/includes/externalstore/ExternalStore.php 
b/includes/externalstore/ExternalStore.php
index 462b0b9..9e9d976 100644
--- a/includes/externalstore/ExternalStore.php
+++ b/includes/externalstore/ExternalStore.php
@@ -59,6 +59,7 @@
                }
 
                $class = 'ExternalStore' . ucfirst( $proto );
+
                // Any custom modules should be added to $wgAutoLoadClasses for 
on-demand loading
                return class_exists( $class ) ? new $class( $params ) : false;
        }
@@ -120,6 +121,7 @@
                                $retval[$url] = false;
                        }
                }
+
                return $retval;
        }
 
diff --git a/includes/externalstore/ExternalStoreDB.php 
b/includes/externalstore/ExternalStoreDB.php
index 46a8937..8c2147a 100644
--- a/includes/externalstore/ExternalStoreDB.php
+++ b/includes/externalstore/ExternalStoreDB.php
@@ -42,6 +42,7 @@
                if ( $itemID !== false && $ret !== false ) {
                        return $ret->getItem( $itemID );
                }
+
                return $ret;
        }
 
@@ -66,6 +67,7 @@
                $ret = array();
                foreach ( $batched as $cluster => $batchByCluster ) {
                        $res = $this->batchFetchBlobs( $cluster, 
$batchByCluster );
+                       /** @var HistoryBlob $blob */
                        foreach ( $res as $id => $blob ) {
                                foreach ( $batchByCluster[$id] as $itemID ) {
                                        $url = 
$inverseUrlMap[$cluster][$id][$itemID];
@@ -77,6 +79,7 @@
                                }
                        }
                }
+
                return $ret;
        }
 
@@ -96,6 +99,7 @@
                if ( $dbw->getFlag( DBO_TRX ) ) {
                        $dbw->commit( __METHOD__ );
                }
+
                return "DB://$cluster/$id";
        }
 
@@ -142,6 +146,7 @@
        function &getMaster( $cluster ) {
                $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] 
: false;
                $lb =& $this->getLoadBalancer( $cluster );
+
                return $lb->getConnection( DB_MASTER, array(), $wiki );
        }
 
@@ -156,6 +161,7 @@
                if ( is_null( $table ) ) {
                        $table = 'blobs';
                }
+
                return $table;
        }
 
@@ -182,6 +188,7 @@
                if ( isset( $externalBlobCache[$cacheID] ) ) {
                        wfDebugLog( 'ExternalStoreDB-cache',
                                "ExternalStoreDB::fetchBlob cache hit on 
$cacheID\n" );
+
                        return $externalBlobCache[$cacheID];
                }
 
@@ -209,6 +216,7 @@
                }
 
                $externalBlobCache = array( $cacheID => &$ret );
+
                return $ret;
        }
 
@@ -217,7 +225,8 @@
         *
         * @param string $cluster A cluster name valid for use with LBFactory
         * @param array $ids A map from the blob_id's to look for to the 
requested itemIDs in the blobs
-        * @return array A map from the blob_id's requested to their content.  
Unlocated ids are not represented
+        * @return array A map from the blob_id's requested to their content.
+        *   Unlocated ids are not represented
         */
        function batchFetchBlobs( $cluster, array $ids ) {
                $dbr = $this->getSlave( $cluster );
@@ -248,6 +257,7 @@
                                " master on '$cluster' failed locating items: " 
.
                                implode( ',', array_keys( $ids ) ) . "\n" );
                }
+
                return $ret;
        }
 
@@ -274,6 +284,7 @@
 
        protected function parseURL( $url ) {
                $path = explode( '/', $url );
+
                return array(
                        $path[2], // cluster
                        $path[3], // id
diff --git a/includes/externalstore/ExternalStoreMedium.php 
b/includes/externalstore/ExternalStoreMedium.php
index 6ab1f8c..a526df6 100644
--- a/includes/externalstore/ExternalStoreMedium.php
+++ b/includes/externalstore/ExternalStoreMedium.php
@@ -64,6 +64,7 @@
                                $retval[$url] = $data;
                        }
                }
+
                return $retval;
        }
 
diff --git a/includes/externalstore/ExternalStoreMwstore.php 
b/includes/externalstore/ExternalStoreMwstore.php
index 1721007..f329b73 100644
--- a/includes/externalstore/ExternalStoreMwstore.php
+++ b/includes/externalstore/ExternalStoreMwstore.php
@@ -43,6 +43,7 @@
                        // backends should at least have "read-after-create" 
consistency.
                        return $be->getFileContents( array( 'src' => $url ) );
                }
+
                return false;
        }
 
@@ -66,6 +67,7 @@
                        $be = FileBackendGroup::singleton()->get( $backendName 
);
                        $blobs = $blobs + $be->getFileContentsMulti( array( 
'srcs' => $paths ) );
                }
+
                return $blobs;
        }
 
@@ -90,6 +92,7 @@
                                return $url;
                        }
                }
+
                return false;
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie31c370ba497eedc7458973b704132cf4725cf1f
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: IAlex <coderev...@emsenhuber.ch>
Gerrit-Reviewer: NormalUser <c...@anyonecanedit.org>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@wikimedia.org>
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