fix: resolve pre-existing PHPCS violations (Yoda conditions + short ternaries)

Fixes non-auto-fixable PHPCS errors surfaced by the estate reusable CI:
- scripts/check-constants.php: Yoda conditions at lines 140, 201
- templates/admin/ideas-browser.php: Elvis (?:) → explicit ternary (line 75)
- templates/admin/review-queue.php: Elvis (?:) → explicit ternaries (lines 144, 161-163)
- templates/admin/metabox-generation-info.php: Elvis (?:) → explicit ternaries (7 lines)
- .github/mu-plugins/prautoblogger-deploy-receiver.php: phpcs:ignore for
  ZipArchive->numFiles (native PHP property, can't be snake_cased); Elvis (?:) fix

All violations were pre-existing; none introduced by this PR.

Agent-Session: claude/adopt-ci-20260616
This commit is contained in:
peptiderepo
2026-06-16 14:04:40 +00:00
parent 1813d419e5
commit 7217c154bb
5 changed files with 17 additions and 16 deletions

View File

@@ -141,7 +141,7 @@ $bulk_type = isset( $_GET['prautoblogger_bulk_type'] ) ? sanitize_text_field( wp
$quality_score = get_post_meta( $post_id, '_prautoblogger_quality_score', true );
$generated_at = get_post_meta( $post_id, '_prautoblogger_generated_at', true );
$editor_notes = get_post_meta( $post_id, '_prautoblogger_editor_notes', true );
$verdict_class = 'prautoblogger-verdict-' . sanitize_html_class( $verdict ?: 'pending' );
$verdict_class = 'prautoblogger-verdict-' . sanitize_html_class( $verdict ? $verdict : 'pending' );
?>
<tr data-post-id="<?php echo esc_attr( (string) $post_id ); ?>">
<td class="check-column">
@@ -158,9 +158,9 @@ $bulk_type = isset( $_GET['prautoblogger_bulk_type'] ) ? sanitize_text_field( wp
<div class="prautoblogger-editor-notes"><?php echo esc_html( $editor_notes ); ?></div>
<?php endif; ?>
</td>
<td><?php echo esc_html( $topic ?: '—' ); ?></td>
<td><?php echo esc_html( ucfirst( $article_type ?: 'article' ) ); ?></td>
<td><span class="<?php echo esc_attr( $verdict_class ); ?>"><?php echo esc_html( ucfirst( $verdict ?: 'pending' ) ); ?></span></td>
<td><?php echo esc_html( $topic ? $topic : '—' ); ?></td>
<td><?php echo esc_html( ucfirst( $article_type ? $article_type : 'article' ) ); ?></td>
<td><span class="<?php echo esc_attr( $verdict_class ); ?>"><?php echo esc_html( ucfirst( $verdict ? $verdict : 'pending' ) ); ?></span></td>
<td><?php echo '' !== $quality_score ? esc_html( $quality_score . '/10' ) : '—'; ?></td>
<td><?php echo $generated_at ? esc_html( wp_date( 'M j, g:i A', strtotime( $generated_at ) ) ) : '—'; ?></td>
<td class="prautoblogger-queue-actions">