@@ -793,8 +793,14 @@ private function multisite_convert_( $assoc_args ) {
793793 }
794794
795795 // 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+ ) {
798804 global $ wpdb , $ current_site , $ wp_rewrite ;
799805
800806 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- This is meant to replace Core functionality.
@@ -1138,10 +1144,8 @@ public function update( $args, $assoc_args ) {
11381144 WP_CLI ::success ( 'WordPress is at the latest minor release. ' );
11391145 return ;
11401146 }
1141- } else {
1142- if ( ! empty ( $ from_api ->updates ) ) {
1147+ } elseif ( ! empty ( $ from_api ->updates ) ) {
11431148 list ( $ update ) = $ from_api ->updates ;
1144- }
11451149 }
11461150 } elseif ( Utils \wp_version_compare ( $ assoc_args ['version ' ], '< ' )
11471151 || 'nightly ' === $ assoc_args ['version ' ]
@@ -1262,7 +1266,7 @@ public function update_db( $args, $assoc_args ) {
12621266 $ total = 0 ;
12631267 $ site_ids = [];
12641268 foreach ( $ it as $ blog ) {
1265- $ total ++ ;
1269+ ++ $ total ;
12661270 $ site_ids [] = $ blog ->site_id ;
12671271 $ url = $ blog ->domain . $ blog ->path ;
12681272 $ cmd = "--url= {$ url } core update-db " ;
@@ -1285,7 +1289,7 @@ public function update_db( $args, $assoc_args ) {
12851289 $ message = "Database upgraded successfully on {$ url }" ;
12861290 }
12871291 WP_CLI ::log ( $ message );
1288- $ success ++ ;
1292+ ++ $ success ;
12891293 } else {
12901294 WP_CLI ::warning ( "Database failed to upgrade on {$ url }" );
12911295 }
@@ -1506,7 +1510,7 @@ private function cleanup_extra_files( $version_from, $version_to, $locale, $inse
15061510 if ( file_exists ( ABSPATH . $ file ) ) {
15071511 unlink ( ABSPATH . $ file );
15081512 WP_CLI ::log ( "File removed: {$ file }" );
1509- $ count ++ ;
1513+ ++ $ count ;
15101514 }
15111515 }
15121516
@@ -1562,5 +1566,4 @@ function () use ( $new_zip_file ) {
15621566 WP_CLI ::error ( 'ZipArchive failed to open ZIP file. ' );
15631567 }
15641568 }
1565-
15661569}
0 commit comments