From 26ce822d20259762c6205f951a0cdbc1fb8deb55 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Tue, 20 Jul 2021 17:58:21 +0200
Subject: [PATCH] CS: remove redundant ignore annotations
---
src/wp-admin/includes/schema.php | 2 +-
src/wp-includes/blocks/calendar.php | 8 ++------
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/wp-admin/includes/schema.php b/src/wp-admin/includes/schema.php
index 8b1e56f3af..1bb2c27c45 100644
a
|
b
|
function populate_options( array $options = array() ) { |
390 | 390 | * or a valid timezone string (America/New_York). See https://www.php.net/manual/en/timezones.php |
391 | 391 | * for all timezone strings supported by PHP. |
392 | 392 | */ |
393 | | $offset_or_tz = _x( '0', 'default GMT offset or timezone string' ); // phpcs:ignore WordPress.WP.I18n.NoEmptyStrings |
| 393 | $offset_or_tz = _x( '0', 'default GMT offset or timezone string' ); |
394 | 394 | if ( is_numeric( $offset_or_tz ) ) { |
395 | 395 | $gmt_offset = $offset_or_tz; |
396 | 396 | } elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list(), true ) ) { |
diff --git a/src/wp-includes/blocks/calendar.php b/src/wp-includes/blocks/calendar.php
index 6e0c52886a..8bde5c2694 100644
a
|
b
|
function render_block_core_calendar( $attributes ) { |
24 | 24 | strpos( $permalink_structure, '%monthnum%' ) !== false && |
25 | 25 | strpos( $permalink_structure, '%year%' ) !== false |
26 | 26 | ) { |
27 | | // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
28 | 27 | $monthnum = $attributes['month']; |
29 | | // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
30 | | $year = $attributes['year']; |
| 28 | $year = $attributes['year']; |
31 | 29 | } |
32 | 30 | } |
33 | 31 | |
… |
… |
function render_block_core_calendar( $attributes ) { |
38 | 36 | get_calendar( true, false ) |
39 | 37 | ); |
40 | 38 | |
41 | | // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
42 | 39 | $monthnum = $previous_monthnum; |
43 | | // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
44 | | $year = $previous_year; |
| 40 | $year = $previous_year; |
45 | 41 | |
46 | 42 | return $output; |
47 | 43 | } |