style: apply php-cs-fixer across lib/ and tests/ (no behaviour change) - #815
Merged
Conversation
`composer cs:check` was red on 119 files. The fixer is wired into no
workflow, so this had drifted silently — running it now brings the tree to
the standard the repo declares.
The ruleset is exactly Nextcloud's: `Conduction\CodingStandard\Config`
extends it and its ADDITIONS array is EMPTY by design, because every rule
the fleet wants beyond Nextcloud's is semantic rather than typographic and
lives in PHP_CodeSniffer instead. So this can only move whitespace and
syntax, never meaning.
Verified rather than assumed, because an autofix CAN change meaning:
* `git diff -w` (whitespace-blind) is NOT empty — 110 files — so the run
did make token-level changes, and they were inspected rather than
waved through. Every one falls into three groups: `use` statements
REORDERED (identical text, moved lines), trailing commas added to
multi-line signatures (PHP 8.0+; CI runs 8.3 and 8.4), and promoted
constructor properties split across lines. No comparison operators, no
`declare(strict_types)` insertion, nothing semantic.
* All 119 changed files parse (`php -l`).
* Suite identical before and after: 1153 tests, 4573 assertions, 0
failures — the same counts, which is what a typographic change should
produce.
* phpmd, psalm, phpstan all exit 0. `cs:check` now exits 0.
`composer phpcs` still exits 1, unchanged by this commit and expected: the
108 SPDX-header `InvalidEndChar` warnings are DELIBERATE. A full stop after
`SPDX-License-Identifier: EUPL-1.2` makes it a different, invalid
identifier and breaks REUSE, so hydra-gates' shared ruleset downgrades that
one code to a warning on purpose. CI counts errors only.
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
August 21, 2026 05:05
…xer agree
The sweep introduced ONE phpcs error, caught by CI and confirmed by
measuring both branches: development has 0 files with errors, the sweep
branch had 1.
php-cs-fixer's docblock aligner indents a tag description to clear the
longest type on the block. Behind HealthController::engineBody()'s
88-character `array{...}|null` shape that lands at column 95, producing a
162-character line — over phpcs's 150-character budget, which the shared
ruleset adds deliberately because Nextcloud enforces no line length at all.
The two tools genuinely disagree here, so the fix is to remove what they
disagree about: the prose moves into the docblock body, leaving the tag with
nothing to over-align.
Verified against BOTH tools and against the baseline: phpcs errors 0 (same
as development), php-cs-fixer clean (exit 0), warnings still 108 (unchanged
— those are the deliberate SPDX ones REUSE requires), suite green.
Contributor
Quality Report — ConductionNL/decidesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-nav-ceiling | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 538/538 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ❌ | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-08-21 05:32 UTC
Download the full PDF report from the workflow artifacts.
Contributor
Quality Report — ConductionNL/decidesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-nav-ceiling | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 538/538 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-21 06:24 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.
composer cs:checkwas red on 119 files. php-cs-fixer is wired into no workflow, so this had drifted silently; running it brings the tree to the standard the repo declares.This cannot change meaning by construction.
Conduction\CodingStandard\Configextends Nextcloud's and itsADDITIONSarray is empty by design — every rule the fleet wants beyond Nextcloud's is semantic rather than typographic and lives in PHP_CodeSniffer instead, "precisely so it cannot contradict the fixer".Verified anyway, because an autofix can change meaning:
git diff -w(whitespace-blind) is not empty — 110 files — so the run did make token-level changes. Inspected rather than waved through; all three groups are syntactic:usestatements reordered (identical text, moved lines), trailing commas added to multi-line signatures (PHP 8.0+, CI runs 8.3/8.4), and promoted constructor properties split across lines. No comparison operators, nodeclare(strict_types)insertion, nothing semantic.php -l).cs:checknow exits 0.On
composer phpcsstill exiting 1 — unchanged by this commit and expected. The 108 SPDX-headerInvalidEndCharwarnings are deliberate: a full stop afterSPDX-License-Identifier: EUPL-1.2makes it a different, invalid identifier and breaks REUSE, so hydra-gates' shared ruleset downgrades that one code to a warning on purpose ("the two requirements are in direct conflict and REUSE wins"). CI counts errors only. I had previously mis-reported these warnings as resolved, off a broken CSV parse; they were never gone, and they should not be "fixed".