Skip to content

style: auto-fix 83k PHPCS violations via PHPCBF - #25

Merged
rpgmem merged 1 commit into
mainfrom
claude/phpcs-phase1-autofix
Apr 16, 2026
Merged

style: auto-fix 83k PHPCS violations via PHPCBF#25
rpgmem merged 1 commit into
mainfrom
claude/phpcs-phase1-autofix

Conversation

@rpgmem

@rpgmem rpgmem commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Why

84k+ PHPCS violations made the advisory linter output useless — real issues were buried in formatting noise. This clears the formatting debt so the remaining ~5k violations are actionable.

What changed

Ran vendor/bin/phpcbf across all 185 PHP files. Changes are purely cosmetic:

  • Tab indentation (47,873 fixes)
  • Bracket/parenthesis spacing (18,000+ fixes)
  • Operator spacing, array alignment, control structure spacing
  • No logic changes whatsoever

Verification

vendor/bin/phpstan analyze  →  [OK] No errors (baseline regenerated, same 518 count)
vendor/bin/phpunit          →  OK (3165 tests, 7439 assertions)

Before/after

Before After Reduction
Errors 84,293 4,879 -94.2%
Warnings 4,106 204 -95.0%

Test plan

  • PHPStan (PHP 8.1) green
  • PHPUnit (PHP 8.1 / 8.2 / 8.3 / 8.4) all green
  • Composer audit green
  • Verify minified assets green
  • WPCS on changed files runs (will show remaining ~5k violations, advisory)

Ran `vendor/bin/phpcbf` across the entire codebase, fixing formatting-only
violations: tab indentation, bracket spacing, operator spacing, array
alignment, control structure spacing, and similar cosmetic rules.

- 88,399 total violations → 5,083 remaining (94.3% reduction)
- Regenerated phpstan-baseline.neon to sync line numbers (518 errors,
  unchanged count)
- All 3165 PHPUnit tests passing, PHPStan [OK]

No logic changes — purely whitespace and formatting.
@rpgmem
rpgmem merged commit 2783cae into main Apr 16, 2026
12 checks passed
@rpgmem
rpgmem deleted the claude/phpcs-phase1-autofix branch April 16, 2026 02:11
rpgmem pushed a commit that referenced this pull request Apr 16, 2026
Cleanup sprints #25-#27 reduced PHPCS violations from 88,399 to ~1,295.
The remaining violations are in untouched legacy files (mostly missing
docblocks) and only surface when a PR touches those files.

- Removed continue-on-error: true from PHPCS job
- Removed || true from phpcs command so non-zero exit fails the check
- Updated CONTRIBUTING.md to reflect gating status
rpgmem added a commit that referenced this pull request Apr 16, 2026
Cleanup sprints #25-#27 reduced PHPCS violations from 88,399 to ~1,295.
The remaining violations are in untouched legacy files (mostly missing
docblocks) and only surface when a PR touches those files.

- Removed continue-on-error: true from PHPCS job
- Removed || true from phpcs command so non-zero exit fails the check
- Updated CONTRIBUTING.md to reflect gating status

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants