Skip to content

Commit

Permalink
CS: remove redundant ignore annotations [4] / Unused WPCS rules
Browse files Browse the repository at this point in the history
Remove ignore annotations related to sniffs which are not used by WP Core (like sniffs which are in the `WordPress-Extra` ruleset).
  • Loading branch information
jrfnl committed Oct 5, 2023
1 parent bb84e92 commit 0565ce5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/wp-includes/blocks/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ function render_block_core_calendar( $attributes ) {
str_contains( $permalink_structure, '%monthnum%' ) &&
str_contains( $permalink_structure, '%year%' )
) {
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$monthnum = $attributes['month'];
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$year = $attributes['year'];
$year = $attributes['year'];
}
}

Expand Down Expand Up @@ -70,10 +68,8 @@ function render_block_core_calendar( $attributes ) {
$calendar
);

// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$monthnum = $previous_monthnum;
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$year = $previous_year;
$year = $previous_year;

return $output;
}
Expand Down

0 comments on commit 0565ce5

Please sign in to comment.