From 2bb686a3488ba60b5208e8c60b083a8985716381 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Sat, 25 Apr 2026 20:02:23 +0000 Subject: [PATCH] fix: PHPCS violations in brand components (Yoda conditions, array formatting, PHP tag) --- page-about.php | 3 ++- page-how-we-review.php | 3 ++- template-parts/verdict/badge.php | 25 ++++++++++++++++++++----- template-parts/verdict/card.php | 2 +- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/page-about.php b/page-about.php index 52559ce..10229ba 100644 --- a/page-about.php +++ b/page-about.php @@ -42,4 +42,5 @@ get_header(); - - array( 'glyph' => '✓', 'label' => 'Established' ), - 'promising' => array( 'glyph' => '◐', 'label' => 'Promising' ), - 'investigational' => array( 'glyph' => '?', 'label' => 'Investigational' ), - 'insufficient' => array( 'glyph' => '⊘', 'label' => 'Insufficient Evidence' ), - 'cautionary' => array( 'glyph' => '⚠', 'label' => 'Cautionary' ), + 'established' => array( + 'glyph' => '✓', + 'label' => 'Established', + ), + 'promising' => array( + 'glyph' => '◐', + 'label' => 'Promising', + ), + 'investigational' => array( + 'glyph' => '?', + 'label' => 'Investigational', + ), + 'insufficient' => array( + 'glyph' => '⊘', + 'label' => 'Insufficient Evidence', + ), + 'cautionary' => array( + 'glyph' => '⚠', + 'label' => 'Cautionary', + ), ); // Early exit if invalid state. diff --git a/template-parts/verdict/card.php b/template-parts/verdict/card.php index 095e04a..9f8fcf0 100644 --- a/template-parts/verdict/card.php +++ b/template-parts/verdict/card.php @@ -29,7 +29,7 @@ for ( $i = 1; $i <= 3; $i++ ) { $signal_text = get_post_meta( $post_id, 'signal_row_' . $i, true ); if ( ! empty( $signal_text ) ) { $signals[] = array( - 'glyph' => $i === 1 ? '✓' : ( $i === 2 ? '!' : '?' ), + 'glyph' => 1 === $i ? '✓' : ( 2 === $i ? '!' : '?' ), 'label' => $signal_text, ); }