Make WordPress Core

Changeset 54896


Ignore:
Timestamp:
11/29/2022 09:11:42 PM (23 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Fix spacing for incrementors and decrementors in various files.

Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/template.php

    r54891 r54896  
    627627
    628628    $r = '';
    629     ++ $count;
     629    ++$count;
    630630
    631631    if ( is_serialized( $entry['meta_value'] ) ) {
  • trunk/src/wp-includes/functions.php

    r54891 r54896  
    263263        $weekday       = $wp_locale->get_weekday( $datetime->format( 'w' ) );
    264264
    265         for ( $i = 0; $i < $format_length; $i ++ ) {
     265        for ( $i = 0; $i < $format_length; $i++ ) {
    266266            switch ( $format[ $i ] ) {
    267267                case 'D':
  • trunk/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php

    r54133 r54896  
    108108
    109109        foreach ( $sitemap_types as $type ) {
    110             for ( $page = 1; $page <= $type['pages']; $page ++ ) {
     110            for ( $page = 1; $page <= $type['pages']; $page++ ) {
    111111                $sitemap_entry = array(
    112112                    'loc' => $this->get_sitemap_url( $type['name'], $page ),
  • trunk/tests/phpunit/includes/wp-profiler.php

    r51551 r54896  
    7474        if ( isset( $this->profile[ $name ] ) ) {
    7575            $this->profile[ $name ]['time'] += $time;
    76             $this->profile[ $name ]['calls'] ++;
     76            $this->profile[ $name ]['calls']++;
    7777            $this->profile[ $name ]['cache_cold_hits']    += ( $wp_object_cache->cold_cache_hits - $item['cache_cold_hits'] );
    7878            $this->profile[ $name ]['cache_warm_hits']    += ( $wp_object_cache->warm_cache_hits - $item['cache_warm_hits'] );
     
    144144            $sql = preg_replace( '/(WHERE \w+ =) \'\[-\w]+\'/', '$1 \'xxx\'', $sql );
    145145
    146             $out[ $sql ] ++;
     146            $out[ $sql ]++;
    147147        }
    148148        asort( $out );
  • trunk/tests/phpunit/tests/date/theDate.php

    r52010 r54896  
    8181
    8282    public function count_hook( $input ) {
    83         $this->hooks_called[ current_filter() ] ++;
     83        $this->hooks_called[ current_filter() ]++;
    8484
    8585        return $input;
  • trunk/tests/phpunit/tests/meta/isProtectedMeta.php

    r49387 r54896  
    1818            array( '_wp_attachment' ),
    1919        );
    20         for ( $i = 0, $max = 31; $i < $max; $i ++ ) {
     20        for ( $i = 0, $max = 31; $i < $max; $i++ ) {
    2121            $protected_keys[] = array( chr( $i ) . '_wp_attachment' );
    2222        }
    23         for ( $i = 127, $max = 159; $i <= $max; $i ++ ) {
     23        for ( $i = 127, $max = 159; $i <= $max; $i++ ) {
    2424            $protected_keys[] = array( chr( $i ) . '_wp_attachment' );
    2525        }
     
    4343        );
    4444
    45         for ( $i = 32, $max = 94; $i <= $max; $i ++ ) {
     45        for ( $i = 32, $max = 94; $i <= $max; $i++ ) {
    4646            $unprotected_keys[] = array( chr( $i ) . '_wp_attachment' );
    4747        }
    48         for ( $i = 96, $max = 126; $i <= $max; $i ++ ) {
     48        for ( $i = 96, $max = 126; $i <= $max; $i++ ) {
    4949            $unprotected_keys[] = array( chr( $i ) . '_wp_attachment' );
    5050        }
  • trunk/tests/phpunit/tests/rest-api/rest-sidebars-controller.php

    r54058 r54896  
    950950                unset( $data[ $count ]['_links'] );
    951951            }
    952             $count ++;
     952            $count++;
    953953        }
    954954
  • trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php

    r54058 r54896  
    15561556                unset( $data[ $count ]['_links'] );
    15571557            }
    1558             $count ++;
     1558            $count++;
    15591559        }
    15601560
  • trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php

    r52248 r54896  
    376376        $expected    = array();
    377377        $actual      = array();
    378         for ( $i = 1; $i < 5; $i ++ ) {
     378        for ( $i = 1; $i < 5; $i++ ) {
    379379            $request = new WP_REST_Request( 'POST', '/wp/v2/menu-items' );
    380380            $request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
     
    922922                $this->assertSame( $taxonomy->name, $links['https://api.w.org/term'][ $num ]['attributes']['taxonomy'] );
    923923                $this->assertSame( add_query_arg( 'post', $data['id'], rest_url( 'wp/v2/' . $taxonomy->rest_base ) ), $links['https://api.w.org/term'][ $num ]['href'] );
    924                 $num ++;
     924                $num++;
    925925            }
    926926
  • trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r54889 r54896  
    649649
    650650        $global_styles_query_count = 0;
    651         for ( $i = 0; $i < 3; $i ++ ) {
     651        for ( $i = 0; $i < 3; $i++ ) {
    652652            $new_user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles( $theme );
    653653            WP_Theme_JSON_Resolver::clean_cached_data();
Note: See TracChangeset for help on using the changeset viewer.