mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54896 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4b55a18d23
commit
8e44ab05a6
@ -626,7 +626,7 @@ function _list_meta_row( $entry, &$count ) {
|
||||
}
|
||||
|
||||
$r = '';
|
||||
++ $count;
|
||||
++$count;
|
||||
|
||||
if ( is_serialized( $entry['meta_value'] ) ) {
|
||||
if ( is_serialized_string( $entry['meta_value'] ) ) {
|
||||
|
||||
@ -262,7 +262,7 @@ function wp_date( $format, $timestamp = null, $timezone = null ) {
|
||||
$month = $wp_locale->get_month( $datetime->format( 'm' ) );
|
||||
$weekday = $wp_locale->get_weekday( $datetime->format( 'w' ) );
|
||||
|
||||
for ( $i = 0; $i < $format_length; $i ++ ) {
|
||||
for ( $i = 0; $i < $format_length; $i++ ) {
|
||||
switch ( $format[ $i ] ) {
|
||||
case 'D':
|
||||
$new_format .= addcslashes( $wp_locale->get_weekday_abbrev( $weekday ), '\\A..Za..z' );
|
||||
|
||||
@ -107,7 +107,7 @@ abstract class WP_Sitemaps_Provider {
|
||||
$sitemap_types = $this->get_sitemap_type_data();
|
||||
|
||||
foreach ( $sitemap_types as $type ) {
|
||||
for ( $page = 1; $page <= $type['pages']; $page ++ ) {
|
||||
for ( $page = 1; $page <= $type['pages']; $page++ ) {
|
||||
$sitemap_entry = array(
|
||||
'loc' => $this->get_sitemap_url( $type['name'], $page ),
|
||||
);
|
||||
|
||||
@ -73,7 +73,7 @@ class WPProfiler {
|
||||
|
||||
if ( isset( $this->profile[ $name ] ) ) {
|
||||
$this->profile[ $name ]['time'] += $time;
|
||||
$this->profile[ $name ]['calls'] ++;
|
||||
$this->profile[ $name ]['calls']++;
|
||||
$this->profile[ $name ]['cache_cold_hits'] += ( $wp_object_cache->cold_cache_hits - $item['cache_cold_hits'] );
|
||||
$this->profile[ $name ]['cache_warm_hits'] += ( $wp_object_cache->warm_cache_hits - $item['cache_warm_hits'] );
|
||||
$this->profile[ $name ]['cache_misses'] += ( $wp_object_cache->cache_misses - $item['cache_misses'] );
|
||||
@ -143,7 +143,7 @@ class WPProfiler {
|
||||
$sql = preg_replace( '/(WHERE \w+ =) \d+/', '$1 x', $sql );
|
||||
$sql = preg_replace( '/(WHERE \w+ =) \'\[-\w]+\'/', '$1 \'xxx\'', $sql );
|
||||
|
||||
$out[ $sql ] ++;
|
||||
$out[ $sql ]++;
|
||||
}
|
||||
asort( $out );
|
||||
return;
|
||||
|
||||
@ -80,7 +80,7 @@ class Tests_Date_TheDate extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
public function count_hook( $input ) {
|
||||
$this->hooks_called[ current_filter() ] ++;
|
||||
$this->hooks_called[ current_filter() ]++;
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
@ -17,10 +17,10 @@ class Tests_Meta_isProtectedMeta extends WP_UnitTestCase {
|
||||
$protected_keys = array(
|
||||
array( '_wp_attachment' ),
|
||||
);
|
||||
for ( $i = 0, $max = 31; $i < $max; $i ++ ) {
|
||||
for ( $i = 0, $max = 31; $i < $max; $i++ ) {
|
||||
$protected_keys[] = array( chr( $i ) . '_wp_attachment' );
|
||||
}
|
||||
for ( $i = 127, $max = 159; $i <= $max; $i ++ ) {
|
||||
for ( $i = 127, $max = 159; $i <= $max; $i++ ) {
|
||||
$protected_keys[] = array( chr( $i ) . '_wp_attachment' );
|
||||
}
|
||||
$protected_keys[] = array( chr( 95 ) . '_wp_attachment' );
|
||||
@ -42,10 +42,10 @@ class Tests_Meta_isProtectedMeta extends WP_UnitTestCase {
|
||||
array( 'ąŌ_not_so_protected_meta' ),
|
||||
);
|
||||
|
||||
for ( $i = 32, $max = 94; $i <= $max; $i ++ ) {
|
||||
for ( $i = 32, $max = 94; $i <= $max; $i++ ) {
|
||||
$unprotected_keys[] = array( chr( $i ) . '_wp_attachment' );
|
||||
}
|
||||
for ( $i = 96, $max = 126; $i <= $max; $i ++ ) {
|
||||
for ( $i = 96, $max = 126; $i <= $max; $i++ ) {
|
||||
$unprotected_keys[] = array( chr( $i ) . '_wp_attachment' );
|
||||
}
|
||||
|
||||
|
||||
@ -949,7 +949,7 @@ class WP_Test_REST_Sidebars_Controller extends WP_Test_REST_Controller_Testcase
|
||||
if ( isset( $item['_links'] ) ) {
|
||||
unset( $data[ $count ]['_links'] );
|
||||
}
|
||||
$count ++;
|
||||
$count++;
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@ -1555,7 +1555,7 @@ class WP_Test_REST_Widgets_Controller extends WP_Test_REST_Controller_Testcase {
|
||||
if ( is_array( $item ) && isset( $item['_links'] ) ) {
|
||||
unset( $data[ $count ]['_links'] );
|
||||
}
|
||||
$count ++;
|
||||
$count++;
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@ -375,7 +375,7 @@ class Tests_REST_WpRestMenuItemsController extends WP_Test_REST_Post_Type_Contro
|
||||
$new_menu_id = wp_create_nav_menu( rand_str() );
|
||||
$expected = array();
|
||||
$actual = array();
|
||||
for ( $i = 1; $i < 5; $i ++ ) {
|
||||
for ( $i = 1; $i < 5; $i++ ) {
|
||||
$request = new WP_REST_Request( 'POST', '/wp/v2/menu-items' );
|
||||
$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
|
||||
$params = $this->set_menu_item_data(
|
||||
@ -921,7 +921,7 @@ class Tests_REST_WpRestMenuItemsController extends WP_Test_REST_Post_Type_Contro
|
||||
foreach ( $taxonomies as $taxonomy ) {
|
||||
$this->assertSame( $taxonomy->name, $links['https://api.w.org/term'][ $num ]['attributes']['taxonomy'] );
|
||||
$this->assertSame( add_query_arg( 'post', $data['id'], rest_url( 'wp/v2/' . $taxonomy->rest_base ) ), $links['https://api.w.org/term'][ $num ]['href'] );
|
||||
$num ++;
|
||||
$num++;
|
||||
}
|
||||
|
||||
if ( 'post_type' === $data['type'] ) {
|
||||
|
||||
@ -648,7 +648,7 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase {
|
||||
$this->assertNotEmpty( $user_cpt, 'User CPT is expected not to be empty.' );
|
||||
|
||||
$global_styles_query_count = 0;
|
||||
for ( $i = 0; $i < 3; $i ++ ) {
|
||||
for ( $i = 0; $i < 3; $i++ ) {
|
||||
$new_user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles( $theme );
|
||||
WP_Theme_JSON_Resolver::clean_cached_data();
|
||||
$this->assertSameSets( $user_cpt, $new_user_cpt, "User CPTs do not match on run {$i}." );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user