Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / db / CloneDatabase.php
index 9eb3e2f..3cd09e2 100644 (file)
@@ -32,7 +32,7 @@ class CloneDatabase {
        private $oldTablePrefix = '';
 
        /** @var array List of tables to be cloned */
-       private $tablesToClone = array();
+       private $tablesToClone = [];
 
        /** @var bool Should we DROP tables containing the new names? */
        private $dropCurrentTables = true;
@@ -89,7 +89,7 @@ class CloneDatabase {
                        $newTableName = $this->db->tableName( $tbl, 'raw' );
 
                        if ( $this->dropCurrentTables
-                               && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) )
+                               && !in_array( $this->db->getType(), [ 'postgres', 'oracle' ] )
                        ) {
                                if ( $oldTableName === $newTableName ) {
                                        // Last ditch check to avoid data loss
@@ -98,7 +98,7 @@ class CloneDatabase {
                                }
                                $this->db->dropTable( $tbl, __METHOD__ );
                                wfDebug( __METHOD__ . " dropping {$newTableName}\n" );
-                               //Dropping the oldTable because the prefix was changed
+                               // Dropping the oldTable because the prefix was changed
                        }
 
                        # Create new table
@@ -129,7 +129,7 @@ class CloneDatabase {
         */
        public static function changePrefix( $prefix ) {
                global $wgDBprefix;
-               wfGetLBFactory()->forEachLB( array( 'CloneDatabase', 'changeLBPrefix' ), array( $prefix ) );
+               wfGetLBFactory()->forEachLB( [ 'CloneDatabase', 'changeLBPrefix' ], [ $prefix ] );
                $wgDBprefix = $prefix;
        }
 
@@ -139,7 +139,7 @@ class CloneDatabase {
         * @return void
         */
        public static function changeLBPrefix( $lb, $prefix ) {
-               $lb->forEachOpenConnection( array( 'CloneDatabase', 'changeDBPrefix' ), array( $prefix ) );
+               $lb->forEachOpenConnection( [ 'CloneDatabase', 'changeDBPrefix' ], [ $prefix ] );
        }
 
        /**