Skip to content

Commit ea5856e

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56738 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6fa2ce4 commit ea5856e

File tree

4 files changed

+2
-5
lines changed

4 files changed

+2
-5
lines changed

src/wp-includes/block-patterns.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,10 @@ function _register_theme_block_patterns() {
468468

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
}
477477

src/wp-includes/canonical.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,6 @@ function redirect_guess_404_permalink() {
957957
// If any of post_type, year, monthnum, or day are set, use them to refine the query.
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 {
963962
$where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) );

tests/phpunit/tests/db/dbDelta.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public function set_up() {
6868
$wpdb->prepare(
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,
7473
column_2 text,

tests/phpunit/tests/import/import.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public function set_up() {
2828
global $wpdb;
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
}
3433
}

0 commit comments

Comments
 (0)