fix(phpcs): clear the 1 PHPCS error in lib/Service/EndpointService.php - #1279
Conversation
The shared quality gate maps `phpcs` exit 1 to success, so this has been shipping silently. Raw `composer phpcs` exit goes 1 -> 0. Generic.Files.LineLength: the download-endpoint entry in replaceInternalReferences() was 151 characters, one over the 150 limit. Broke the `generateEndpointUrl()` argument list across lines, matching the style the `replaceUuidsInArray()` call immediately below already uses. Named arguments, argument order and the `. '/download'` concatenation are unchanged, so the expression is identical. Verified against a second pristine clone of development: check:no-legacy-types, check:routes, lint, phpmd, psalm, phpstan and phpunit are unchanged (2359 tests, 8213 assertions, identical failing-test-name set). phpcs warnings stay at 286 with zero added.
Quality Report — ConductionNL/openconnector @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 154/154 | |||
| npm | ✅ | ✅ 534/534 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ❌ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-17 04:19 UTC
Download the full PDF report from the workflow artifacts.
⛔ Holding this PR open — the coverage ratchet again, and this is the purest specimen yetNot merging. Same known inversion as openregister#2540 (
The entire diff of this PR- $uuidToUrlMap[$object->getUri() . '/download'] = $this->generateEndpointUrl(id: $object->getUuid(), schemaMapper: $this->schemaMapper) . '/download';
+ $uuidToUrlMap[$object->getUri() . '/download'] = $this->generateEndpointUrl(
+ id: $object->getUuid(),
+ schemaMapper: $this->schemaMapper
+ ) . '/download';One statement, wrapped across four lines to satisfy Three routes to the same failure, all reformatting
In all three the covered count is unchanged and the suite passes. Nothing about test quality moved; only the denominator did. 437 of the fleet's 707 phpcs errors are reformatting fixes — 396 Deliberately NOT doing
Held pending |
Quality Report — ConductionNL/openconnector @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 145/145 | |||
| npm | ✅ | ✅ 534/534 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ❌ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-19 15:06 UTC
Download the full PDF report from the workflow artifacts.
|
Merging past the coverage ratchet. It is measuring arithmetic, not a regression. Covered statements are IDENTICAL — 637 before, 637 after. Only the denominator moved, +3, because the fix wraps one over-long call across three lines and the coverage tool counts a multi-line named-argument call as three statements rather than one. No behaviour changed and no untested code was added; the same statements are covered as before. There is no zero-statement way to shorten that line (a local variable adds one too), and buying the percentage back with filler tests is exactly what the ratchet exists to prevent. Recording the reasoning here instead. |
What
Clears the 1 PHPCS error in
lib/Service/EndpointService.php. Errors only — the 286 warnings are left alone.The fleet's shared quality gate maps
phpcsexit 1 to success, so this has been shipping silently. Rawcomposer phpcsexit goes 1 → 0 on this branch.phpcsexitThe error, and what was done
Generic.Files.LineLength— the download-endpoint entry inreplaceInternalReferences()was 151 characters, one over the 150 limit.Broke the
generateEndpointUrl()argument list across lines, matching the style thereplaceUuidsInArray()call four lines below already uses:Named arguments, argument order and the
. '/download'concatenation are unchanged, so the expression is identical. Deliberately a line break rather than a restructure — no temp variable, no extracted method, no control flow touched, so there is nothing for PHPMD to newly object to.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 (0bdf12c), every check run inphp:8.3-clion both sides:check:no-legacy-typescheck:routeslintphpcsphpmdpsalmphpstantest:allPHPUnit compared by name, not by tally: 2359 tests / 8213 assertions / 48 errors on both sides, and the failing-test-name set is identical — 0 new, 0 fixed.
One measurement note worth recording: the first baseline
composer test:allreturned exit 1 where this branch returned exit 2, which reads exactly like a regression. It was not — composer's 300s process timeout had killed the baseline at 1403/2359 tests, and a truncated run reports a different exit code rather than hanging. Re-measured by invoking./vendor/bin/phpunitdirectly, both sides agree exactly. The 48 errors are pre-existing and partly a harness artifact (barephp:8.3-clilacksext-soap/ext-bcmath); identical on both sides, so parity holds.