Latent debt surfaced by the reusable PHPCS job (previously continue-on-error). PHPCS fixes (all pre-existing, not introduced by this PR): - Add @package PeptideReconstitutionCalculator to file docblocks in all 12 PHP files (previously missing; phpcbf cannot insert missing docblock tags). - Replace two short-ternary ?: operators in class-prc-preset-provider.php with full ternary (Universal.Operators.DisallowShortTernary.Found; lines 136+152). JS lint fix: - Add package.json + package-lock.json (no deps; lint script = node --check) so the reusable lint-js job's npm ci / cache: npm steps succeed. The calculator ships vanilla JS with no build toolchain — package.json is the minimal stub the reusable workflow requires for has_js: true. Agent-Session: claude/adopt-ci-20260616
30 lines
548 B
PHP
30 lines
548 B
PHP
<?php
|
|
/**
|
|
* Activation handler.
|
|
*
|
|
* What: Runs on plugin activation — flushes rewrite rules.
|
|
* Who calls it: register_activation_hook in bootstrap.
|
|
* Dependencies: None.
|
|
* @package PeptideReconstitutionCalculator
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Handles plugin activation tasks.
|
|
*/
|
|
class PRC_Activator {
|
|
|
|
/**
|
|
* Run activation tasks.
|
|
*
|
|
* Flushes rewrite rules so any new pages using the shortcode
|
|
* are immediately accessible.
|
|
*
|
|
* @return void
|
|
*/
|
|
public static function activate(): void {
|
|
flush_rewrite_rules();
|
|
}
|
|
}
|