Files
peptide-reconstitution-calc…/peptide-reconstitution-calculator.php
peptiderepo 8e1405d5a5 fix(ci): resolve latent PHPCS + JS lint failures
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
2026-06-16 15:24:19 +00:00

47 lines
2.2 KiB
PHP

<?php
/**
* Plugin Name: Peptide Reconstitution Calculator
* Plugin URI: https://peptiderepo.com/tools/reconstitution-calculator
* Description: Interactive reconstitution calculator with peptide-specific presets from Peptide Repo Core. Computes concentration, injection volume, syringe units, and doses per vial.
* Version: 1.2.0
* Author: peptiderepo
* Author URI: https://peptiderepo.com
* License: GPL-2.0-or-later
* Text Domain: peptide-reconstitution-calculator
* Requires PHP: 8.1
*
* @see ARCHITECTURE.md — Full data flow and file tree.
* @see CONVENTIONS.md — Naming patterns and extension guides.
*
* Depends on: Peptide Repo Core (optional — provides peptide-specific presets).
* Without PR Core, the calculator still works with manual entry and built-in defaults.
* @package PeptideReconstitutionCalculator
*/
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/* ── Constants ────────────────────────────────────────────────────────── */
define( 'PRC_VERSION', '1.2.0' );
define( 'PRC_PLUGIN_FILE', __FILE__ );
define( 'PRC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'PRC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
/* ── Autoloader ───────────────────────────────────────────────────────── */
require_once PRC_PLUGIN_DIR . 'includes/class-prc-autoloader.php';
PRC_Autoloader::register();
/* ── Activation / Deactivation ────────────────────────────────────────── */
register_activation_hook( __FILE__, array( 'PRC_Activator', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'PRC_Deactivator', 'deactivate' ) );
/* ── Boot ─────────────────────────────────────────────────────────────── */
add_action( 'plugins_loaded', array( 'PRC_Calculator', 'boot' ) );