@@ -793,8 +793,14 @@ private function multisite_convert_( $assoc_args ) {
793
793
}
794
794
795
795
// copied from populate_network()
796
- private static function create_initial_blog ( $ network_id , $ blog_id , $ domain , $ path ,
797
- $ subdomain_install , $ site_user ) {
796
+ private static function create_initial_blog (
797
+ $ network_id ,
798
+ $ blog_id ,
799
+ $ domain ,
800
+ $ path ,
801
+ $ subdomain_install ,
802
+ $ site_user
803
+ ) {
798
804
global $ wpdb , $ current_site , $ wp_rewrite ;
799
805
800
806
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- This is meant to replace Core functionality.
@@ -1138,10 +1144,8 @@ public function update( $args, $assoc_args ) {
1138
1144
WP_CLI ::success ( 'WordPress is at the latest minor release. ' );
1139
1145
return ;
1140
1146
}
1141
- } else {
1142
- if ( ! empty ( $ from_api ->updates ) ) {
1147
+ } elseif ( ! empty ( $ from_api ->updates ) ) {
1143
1148
list ( $ update ) = $ from_api ->updates ;
1144
- }
1145
1149
}
1146
1150
} elseif ( Utils \wp_version_compare ( $ assoc_args ['version ' ], '< ' )
1147
1151
|| 'nightly ' === $ assoc_args ['version ' ]
@@ -1262,7 +1266,7 @@ public function update_db( $args, $assoc_args ) {
1262
1266
$ total = 0 ;
1263
1267
$ site_ids = [];
1264
1268
foreach ( $ it as $ blog ) {
1265
- $ total ++ ;
1269
+ ++ $ total ;
1266
1270
$ site_ids [] = $ blog ->site_id ;
1267
1271
$ url = $ blog ->domain . $ blog ->path ;
1268
1272
$ cmd = "--url= {$ url } core update-db " ;
@@ -1285,7 +1289,7 @@ public function update_db( $args, $assoc_args ) {
1285
1289
$ message = "Database upgraded successfully on {$ url }" ;
1286
1290
}
1287
1291
WP_CLI ::log ( $ message );
1288
- $ success ++ ;
1292
+ ++ $ success ;
1289
1293
} else {
1290
1294
WP_CLI ::warning ( "Database failed to upgrade on {$ url }" );
1291
1295
}
@@ -1506,7 +1510,7 @@ private function cleanup_extra_files( $version_from, $version_to, $locale, $inse
1506
1510
if ( file_exists ( ABSPATH . $ file ) ) {
1507
1511
unlink ( ABSPATH . $ file );
1508
1512
WP_CLI ::log ( "File removed: {$ file }" );
1509
- $ count ++ ;
1513
+ ++ $ count ;
1510
1514
}
1511
1515
}
1512
1516
@@ -1562,5 +1566,4 @@ function () use ( $new_zip_file ) {
1562
1566
WP_CLI ::error ( 'ZipArchive failed to open ZIP file. ' );
1563
1567
}
1564
1568
}
1565
-
1566
1569
}
0 commit comments