Files
peptide-repo-core/includes/class-pr-core-deactivator.php
peptiderepo 53c71dca12 fix: move file docblocks to immediately after <?php (before declare)
PHPCS Squiz.Commenting.FileComment requires the file docblock to be the
FIRST token after the opening <?php tag. Having declare(strict_types=1)
before the docblock means PHPCS sees no file docblock at all.

Fix: in every includes/*.php file, insert a minimal /** @package ... */
docblock immediately after <?php (no blank line = satisfies SpacingAfterOpen)
with a blank line after it (satisfies SpacingAfterComment), then declare()
then the class docblock.

Also fixes peptide-repo-core.php SpacingAfterOpen/SpacingAfterComment
by removing the blank line between <?php and the existing file docblock
and ensuring one blank line after it.

Agent-Session: claude-adopt-ci-20260616
2026-06-16 16:06:11 +00:00

41 lines
874 B
PHP

<?php
/**
* @package Peptide_Repo_Core
*/
declare(strict_types=1);
/**
* Flushes rewrite rules on deactivation (data preserved)
*
* @package Peptide_Repo_Core
*/
/**
* Plugin deactivation handler.
*
* What: Flushes rewrite rules on deactivation (data preserved).
* Who calls it: register_deactivation_hook() in peptide-repo-core.php.
* Dependencies: None.
*
* @see peptide-repo-core.php — Registers this class on deactivation.
* @see uninstall.php — Full data teardown happens on uninstall, not deactivation.
*/
class PR_Core_Deactivator {
/**
* Run on plugin deactivation.
*
* Side effects: flushes rewrite rules.
*
* @return void
*/
public static function deactivate(): void {
// Clear verification scan cron.
wp_clear_scheduled_hook( 'pr_core_verification_scan' );
// Flush rewrite rules.
flush_rewrite_rules();
}
}