Make WordPress Core


Ignore:
Timestamp:
09/09/2023 09:26:01 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use pre-increment/decrement for stand-alone statements.

Note: This is enforced by WPCS 3.0.0:

  1. There should be no space between an increment/decrement operator and the variable it applies to.
  2. Pre-increment/decrement should be favoured over post-increment/decrement for stand-alone statements. “Pre” will in/decrement and then return, “post” will return and then in/decrement. Using the “pre” version is slightly more performant and can prevent future bugs when code gets moved around.

References:

Props jrf.
See #59161, #58831.

File:
1 edited

Legend:

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

    r56434 r56549  
    14941494        // Ensure only valid-length signatures are considered.
    14951495        if ( SODIUM_CRYPTO_SIGN_BYTES !== strlen( $signature_raw ) ) {
    1496             $skipped_signature++;
     1496            ++$skipped_signature;
    14971497            continue;
    14981498        }
     
    15031503            // Only pass valid public keys through.
    15041504            if ( SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES !== strlen( $key_raw ) ) {
    1505                 $skipped_key++;
     1505                ++$skipped_key;
    15061506                continue;
    15071507            }
Note: See TracChangeset for help on using the changeset viewer.