style: auto-fix PHPCS violations via phpcbf

This commit is contained in:
peptiderepo
2026-06-16 15:26:16 +00:00
parent 08d7696444
commit b9158d7dca
45 changed files with 1018 additions and 658 deletions

View File

@@ -23,7 +23,7 @@ class PR_Core_Verification_Widget {
wp_add_dashboard_widget(
'pr_core_verification_status',
__( 'Monographs Needing Review', 'peptide-repo-core' ),
[ __CLASS__, 'render' ]
array( __CLASS__, 'render' )
);
}
@@ -33,35 +33,38 @@ class PR_Core_Verification_Widget {
* @return void
*/
public static function render(): void {
$repo = new PR_Core_Peptide_Repository();
$peptides = $repo->find_all( [ 'status' => 'publish' ] );
$repo = new PR_Core_Peptide_Repository();
$peptides = $repo->find_all( array( 'status' => 'publish' ) );
$due_overdue = [];
$due_overdue = array();
foreach ( $peptides as $dto ) {
$status = get_post_meta( $dto->id, '_pr_verification_status', true ) ?: 'current';
if ( in_array( $status, [ 'due', 'overdue' ], true ) ) {
if ( in_array( $status, array( 'due', 'overdue' ), true ) ) {
$last_verified = get_post_meta( $dto->id, '_pr_last_source_verified', true );
$days_since = $last_verified
? (int) ( ( time() - strtotime( $last_verified ) ) / DAY_IN_SECONDS )
: 999;
$due_overdue[] = [
'id' => $dto->id,
'title' => $dto->title,
'status' => $status,
'velocity' => get_post_meta( $dto->id, '_pr_verification_velocity', true ) ?: 'medium',
$due_overdue[] = array(
'id' => $dto->id,
'title' => $dto->title,
'status' => $status,
'velocity' => get_post_meta( $dto->id, '_pr_verification_velocity', true ) ?: 'medium',
'last_verified' => $last_verified,
'days_since' => $days_since,
];
'days_since' => $days_since,
);
}
}
// Sort by days_since descending (most overdue first).
usort( $due_overdue, static function ( $a, $b ) {
return $b['days_since'] <=> $a['days_since'];
} );
usort(
$due_overdue,
static function ( $a, $b ) {
return $b['days_since'] <=> $a['days_since'];
}
);
if ( empty( $due_overdue ) ) {
echo '<p>' . esc_html__( 'All monographs are current. ', 'peptide-repo-core' );