Make WordPress Core

Changeset 45601


Ignore:
Timestamp:
07/05/2019 03:13:31 AM (7 years ago)
Author:
pento
Message:

Coding Standards: Fix all WordPress.CodeAnalysis.AssignmentInCondition issues.

WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition can be ignored, as this is allowed in Core.

See #47632.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcs.xml.dist

    r45590 r45601  
    185185        </rule>
    186186
     187        <!-- Assignments in while conditions are a valid method of looping over iterables -->
     188        <rule ref="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition">
     189                <exclude-pattern>*</exclude-pattern>
     190        </rule>
     191
    187192        <!-- Exclude the unit tests from select sniffs. -->
    188193        <rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
  • trunk/src/wp-includes/revision.php

    r45590 r45601  
    157157                 * @param WP_Post $post              The post object.
    158158                 */
    159                 if ( isset( $last_revision ) && apply_filters( 'wp_save_post_revision_check_for_changes', $check_for_changes = true, $last_revision, $post ) ) {
     159                if ( isset( $last_revision ) && apply_filters( 'wp_save_post_revision_check_for_changes', true, $last_revision, $post ) ) {
    160160                        $post_has_changed = false;
    161161
Note: See TracChangeset for help on using the changeset viewer.