fix: rename $class param to $class_name + ignore UnfinishedPrepare + ruleset cleanup

- autoloader.php load() + migration-runner.php class_to_file(): rename $class
  parameter to $class_name to satisfy
  Universal.NamingConventions.NoReservedKeywordParameterNames.classFound
- dosing-repository.php line 81: add phpcs:ignore UnfinishedPrepare on
  $wpdb->prepare() — {} is a builder-constructed safe value,
  not an unfinished placeholder
- phpcs.xml.dist: remove incorrect rule names (WordPress.WP.ReservedKeyword.class,
  WordPress.DB.PreparedSQLPlaceholders.ReplacementsFound); fix excluded names to
  match actual sniff IDs from CI logs

Agent-Session: claude-adopt-ci-20260616
This commit is contained in:
peptiderepo
2026-06-16 16:29:26 +00:00
parent cb7cd7305e
commit 1d9d9d508c
4 changed files with 10 additions and 14 deletions

View File

@@ -102,11 +102,11 @@ class PR_Core_Migration_Runner {
*
* PR_Core_Migration_0001_Dosing_Rows => migrations/class-pr-core-migration-0001-dosing-rows.php
*
* @param string $class Fully-qualified class name.
* @param string $class_name Fully-qualified class name.
* @return string Absolute file path.
*/
private function class_to_file( string $class ): string {
$suffix = substr( $class, 8 ); // Strip 'PR_Core_'.
private function class_to_file( string $class_name ): string {
$suffix = substr( $class_name, 8 ); // Strip 'PR_Core_'.
$filename = 'class-pr-core-' . str_replace( '_', '-', strtolower( $suffix ) ) . '.php';
return PR_CORE_PLUGIN_DIR . 'includes/migrations/' . $filename;