Fix CI: PHPCS param alignment + stub _n() in bootstrap
- Simplify @param type-hints in render_bento_band docblock from
complex array<K,V{...}> generics to plain 'array' — eliminates
SpacingAfterParamType alignment errors (PHPCS rule requires exact
column alignment across multi-param functions; long generics are
impossible to auto-align). Alignment is now uniform (longest type
'string' = 6 chars; all others padded to col 7).
- Add phpcs:ignore comment on line above the /
echo (dot is a fixed HTML entity; label is escaped by esc_html__()).
- Add _n() stub to tests/bootstrap.php — WP plural-form helper used
by derive_health_pill_state(); not a PHP built-in; was missing.
This commit is contained in:
@@ -137,6 +137,7 @@ function current_time( string $type, bool $gmt = false ): string {
|
||||
function home_url( string $path = '' ): string { return 'http://example.test' . $path; }
|
||||
|
||||
function __( string $text, string $domain = 'default' ): string { return $text; }
|
||||
function _n( string $single, string $plural, int $number, string $domain = 'default' ): string { return 1 === $number ? $single : $plural; }
|
||||
function esc_html( string $text ): string { return htmlspecialchars( $text, ENT_QUOTES ); }
|
||||
function esc_html__( string $text, string $domain = 'default' ): string { return esc_html( $text ); }
|
||||
function esc_attr( string $text ): string { return htmlspecialchars( $text, ENT_QUOTES ); }
|
||||
|
||||
Reference in New Issue
Block a user