Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / includes / externalstore / ExternalStoreDB.php
index ad0c217..45a6baf 100644 (file)
@@ -27,7 +27,7 @@ use Wikimedia\Rdbms\DBConnRef;
 use Wikimedia\Rdbms\MaintainableDBConnRef;
 
 /**
- * DB accessable external objects.
+ * DB accessible external objects.
  *
  * In this system, each store "location" maps to a database "cluster".
  * The clusters must be defined in the normal LBFactory configuration.
@@ -128,7 +128,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
        public function getSlave( $cluster ) {
                global $wgDefaultExternalStore;
 
-               $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
+               $wiki = $this->params['wiki'] ?? false;
                $lb = $this->getLoadBalancer( $cluster );
 
                if ( !in_array( "DB://" . $cluster, (array)$wgDefaultExternalStore ) ) {
@@ -151,7 +151,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
         * @return MaintainableDBConnRef
         */
        public function getMaster( $cluster ) {
-               $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
+               $wiki = $this->params['wiki'] ?? false;
                $lb = $this->getLoadBalancer( $cluster );
 
                $db = $lb->getMaintenanceConnectionRef( DB_MASTER, [], $wiki );
@@ -301,7 +301,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
                return [
                        $path[2], // cluster
                        $path[3], // id
-                       isset( $path[4] ) ? $path[4] : false // itemID
+                       $path[4] ?? false // itemID
                ];
        }
 }