fix(phpcs): clear the 2 PHPCS errors in lib/Controller - #133
Merged
Conversation
The shared quality gate maps `phpcs` exit 1 to success, so these have been shipping silently. Raw `composer phpcs` exit goes 1 -> 0. Both are PEAR.Commenting.FunctionComment.WrongStyle, and both are the same shape: a real `/** */` docblock, then a `//` block explaining the `#[AnonRateLimit]` choice, then the attribute, then the function. Because the `//` block is what immediately precedes the function, PHPCS reads THAT as the function comment and rejects its style. Fixed by folding the rate-limit rationale into the docblock it belongs to and keeping the attributes contiguous. No prose is deleted -- every sentence is preserved, as a "Rate-limit rationale:" paragraph. Side effect, deliberate and verified: this also removes 2 CustomSniffs.Commenting.SpecTag.MissingMethodSpec warnings (470 -> 468), and drops the same two methods off `composer lint:spec-annotations`. Those reports were false. Both methods already carried an `@spec` tag; the stray `//` block sat between the docblock and the function and hid it. `grep -c '@SPEC'` is identical before and after in both files -- no tag was added, and none was suppressed. A warning set-diff confirms 0 warnings added. Documentation only -- no executable statement is touched. Verified against a second pristine clone of development: lint, lint:initial-state, lint:licenses, phpmd, psalm, phpstan and phpunit are unchanged (1575 tests, identical failing-test-name set). lint:spec-annotations stays red on its pre-existing Db/Migration backlog, which this branch does not touch.
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
August 17, 2026 03:50
Contributor
Quality Report — ConductionNL/launchpad @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 525/525 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-17 04:12 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Clears the 2 PHPCS errors in
lib/Controller. Errors only — the warnings are left alone.The fleet's shared quality gate maps
phpcsexit 1 to success, so these have been shipping silently. Rawcomposer phpcsexit goes 1 → 0 on this branch.phpcsexitThe errors, and what was done
Both are
PEAR.Commenting.FunctionComment.WrongStyle, inHealthController::index()andPageController::publicShare(). Both are the same shape:Because the
//block is what immediately precedes the function, PHPCS reads that as the function comment and rejects its style — the/** */docblock above it is never considered.Fixed by folding the rate-limit rationale into the docblock it belongs to and keeping the attributes contiguous. No prose is deleted — every sentence is preserved verbatim in meaning, as a
Rate-limit rationale:paragraph in the description.Why the warning count drops by 2 — and why that is a correction, not suppression
The 2 removed warnings are
CustomSniffs.Commenting.SpecTag.MissingMethodSpec, on exactly the 2 methods fixed here. Those warnings were false. Both methods already carried an@spectag; the stray//block sat between the docblock and the function and hid the whole docblock from the sniff, the same mechanism that caused the error.Evidenced three ways rather than asserted:
grep -c '@spec'is byte-identical before and after in both files (2 and 4). No tag was added, so no gap was papered over.composer lint:spec-annotationsis a separate PHP script, not a PHPCS sniff, and it drops these same two methods off its missing-annotation list — with nothing added.Blast radius
Documentation only. No executable statement is touched — 10 insertions / 7 deletions, all inside docblocks and the removed
//lines. The#[AnonRateLimit]limits and periods are unchanged.No
phpcs:ignore, no<exclude>, no ruleset edit, nophpcbf/--fix. Every rule stays on.Verification
Measured against a second pristine clone of
developmentat the same commit (2bf1a6b), every check run inphp:8.3-clion both sides:lintlint:initial-statelint:spec-annotationslint:licensesphpcsphpmdpsalmphpstantest:alllint:spec-annotationsstays red on both sides on its pre-existinglib/Db/*andlib/Migration/*backlog, which this branch does not touch. Its list gets strictly shorter here (the two controller methods above drop off); nothing is added.PHPUnit compared by name, not by tally: 1575 tests / 3974 assertions / 16 errors on both sides, and the failing-test-name set is identical — 0 new, 0 fixed.
Note on the red that is already there:
psalmandphpunitare red on both sides in this harness; pre-existing and identical on both sides, so parity holds. Not this branch's doing.