Make WordPress Core

Changeset 56738


Ignore:
Timestamp:
09/28/2023 12:02:47 AM (10 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove redundant ignore annotations.

This removes ignore annotations which are ignoring an error which would not be thrown for that code.

Includes tidying up the format of the ignore annotation:

  • Customary one space between the // and the start of the comment.
  • There should be no spaces in the comma-separated sniff list.

Follow-up to [45607], [47185], [49200], [53152].

Props jrf.
See #59161.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-patterns.php

    r56472 r56738  
    469469                    // Translate the pattern metadata.
    470470                    $text_domain = $theme->get( 'TextDomain' );
    471                     // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText, WordPress.WP.I18n.NonSingularStringLiteralContext, WordPress.WP.I18n.NonSingularStringLiteralDomain, WordPress.WP.I18n.LowLevelTranslationFunction
     471                    // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralDomain,WordPress.WP.I18n.LowLevelTranslationFunction
    472472                    $pattern_data['title'] = translate_with_gettext_context( $pattern_data['title'], 'Pattern title', $text_domain );
    473473                    if ( ! empty( $pattern_data['description'] ) ) {
    474                         // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText, WordPress.WP.I18n.NonSingularStringLiteralContext, WordPress.WP.I18n.NonSingularStringLiteralDomain, WordPress.WP.I18n.LowLevelTranslationFunction
     474                        // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralDomain,WordPress.WP.I18n.LowLevelTranslationFunction
    475475                        $pattern_data['description'] = translate_with_gettext_context( $pattern_data['description'], 'Pattern description', $text_domain );
    476476                    }
  • trunk/src/wp-includes/canonical.php

    r56718 r56738  
    958958        if ( get_query_var( 'post_type' ) ) {
    959959            if ( is_array( get_query_var( 'post_type' ) ) ) {
    960                 // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
    961960                $where .= " AND post_type IN ('" . join( "', '", esc_sql( get_query_var( 'post_type' ) ) ) . "')";
    962961            } else {
  • trunk/tests/phpunit/tests/db/dbDelta.php

    r56548 r56738  
    6969                "
    7070                CREATE TABLE {$wpdb->prefix}dbdelta_test (" .
    71                     // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
    7271                    'id bigint(20) NOT NULL AUTO_INCREMENT,
    7372                    column_1 varchar(255) NOT NULL,
  • trunk/tests/phpunit/tests/import/import.php

    r54402 r56738  
    2929        // Crude but effective: make sure there's no residual data in the main tables.
    3030        foreach ( array( 'posts', 'postmeta', 'comments', 'terms', 'term_taxonomy', 'term_relationships', 'users', 'usermeta' ) as $table ) {
    31             // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
    3231            $wpdb->query( "DELETE FROM {$wpdb->$table}" );
    3332        }
Note: See TracChangeset for help on using the changeset viewer.