Skip to content

Commit

Permalink
CS: remove redundant ignore annotations (#55615)
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
SergeyBiryukov authored Oct 27, 2023
1 parent 820b135 commit 564ef55
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/block-library/src/calendar/index.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 564ef55

Please sign in to comment.