Adopt reusable CI standard + PHPUnit conversion (#22)

Squash-merge of PR #22: adopt shared reusable CI workflow, convert PHPUnit to stubs, update branch-protection contexts.

QA-approved at 05d8094a1d. All required CI checks green.

Agent-Session: 2026-06-17-prcore-ci-deploy
This commit is contained in:
peptiderepo
2026-06-17 01:12:00 +07:00
committed by GitHub
parent d0b5875fd8
commit 665d7fa9e1
72 changed files with 4604 additions and 1212 deletions

View File

@@ -1,6 +1,18 @@
<?php
/**
* Verification Metabox.
*
* @package Peptide_Repo_Core
*/
declare(strict_types=1);
/**
* Renders and saves verification status sidebar meta box
*
* @package Peptide_Repo_Core
*/
/**
* Verification status meta box for peptide edit screen.
*
@@ -21,7 +33,7 @@ class PR_Core_Verification_Metabox {
add_meta_box(
'pr-core-verification',
__( 'Verification Status', 'peptide-repo-core' ),
[ __CLASS__, 'render' ],
array( __CLASS__, 'render' ),
PR_Core_Peptide_CPT::POST_TYPE,
'side',
'default'
@@ -38,16 +50,20 @@ class PR_Core_Verification_Metabox {
wp_nonce_field( 'pr_core_verification_nonce', 'pr_core_verification_nonce' );
$last_verified = get_post_meta( $post->ID, '_pr_last_source_verified', true );
$velocity = get_post_meta( $post->ID, '_pr_verification_velocity', true ) ?: 'medium';
$status = get_post_meta( $post->ID, '_pr_verification_status', true ) ?: 'current';
$notes = get_post_meta( $post->ID, '_pr_verification_notes', true ) ?: '';
$velocity = get_post_meta( $post->ID, '_pr_verification_velocity', true ) ?: 'medium'; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found
$status = get_post_meta( $post->ID, '_pr_verification_status', true ) ?: 'current'; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found
$notes = get_post_meta( $post->ID, '_pr_verification_notes', true ) ?: ''; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found
echo '<p><strong>' . esc_html__( 'Last Verified', 'peptide-repo-core' ) . ':</strong><br />';
echo '<code style="color: #666;">' . esc_html( $last_verified ?: '—' ) . '</code></p>';
echo '<code style="color: #666;">' . esc_html( $last_verified ?: '—' ) . '</code></p>'; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found
echo '<p><strong>' . esc_html__( 'Verification Velocity', 'peptide-repo-core' ) . ':</strong><br />';
echo '<select name="pr_core__pr_verification_velocity" style="width:100%;">';
foreach ( [ 'low' => 'Low', 'medium' => 'Medium', 'high' => 'High' ] as $val => $label ) {
foreach ( array(
'low' => 'Low',
'medium' => 'Medium',
'high' => 'High',
) as $val => $label ) {
printf(
'<option value="%s"%s>%s</option>',
esc_attr( $val ),
@@ -58,12 +74,12 @@ class PR_Core_Verification_Metabox {
echo '</select></p>';
echo '<p><strong>' . esc_html__( 'Status', 'peptide-repo-core' ) . ':</strong><br />';
$badge_class = match( $status ) {
$badge_class = match ( $status ) {
'due' => 'style="background:#ff9800;color:white;padding:4px 8px;border-radius:3px;"',
'overdue' => 'style="background:#f44336;color:white;padding:4px 8px;border-radius:3px;"',
default => 'style="background:#4caf50;color:white;padding:4px 8px;border-radius:3px;"',
};
echo '<span ' . $badge_class . '>' . esc_html( ucfirst( $status ) ) . '</span></p>';
echo '<span ' . $badge_class . '>' . esc_html( ucfirst( $status ) ) . '</span></p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- badge_class is a hardcoded match expression
echo '<p><strong>' . esc_html__( 'Verification Notes', 'peptide-repo-core' ) . ':</strong><br />';
printf(