refactor(demo): split install() so it clears the complexity thresholds again - #1816
Merged
Merged
Conversation
…s again
PHPMD, on development:
DemoDataService.php:161 CyclomaticComplexity install() has a
Cyclomatic Complexity of 10. The configured threshold is 10.
DemoDataService.php:161 ExcessiveMethodLength install() has 101 lines
of code. Current threshold is set to 100.
Both are one over, and both are mine: #1806 added the objectsOnly() narrowing
and #1808 added the `unchanged` counter and its guard, each fine alone and
together one line and one branch past the line.
Neither the reading of the importer's reply nor the logging of it belongs in
install(), which should read as: load, ask, land, judge, report. So they move
out as `readLanding()` and `reportLanding()`, and the early-return in the
partial-import warning removes the last branch.
No behaviour changes: 34 tests across DemoDataServiceTest and
SetupControllerStatusTest pass unchanged, and PHPUnit, PHPCS, PHPStan, Psalm
and a per-directory PHPMD sweep all exit 0.
Worth recording that a per-directory PHPMD sweep is the only way this was
visible: `composer phpmd` runs the whole of lib/ in one process and gets
OOM-killed on this box, so the run that "passed" had died rather than
finished.
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
September 4, 2026 19:24
Contributor
Quality Report — ConductionNL/dossiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue3-compile | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| check-l10n-js | ✅ | ||||
| composer | ✅ | ✅ 106/106 | |||
| npm | ✅ | ✅ 541/541 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-09-04 19:29 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.
Why
PHPMD, on
development:Both are one over, and both are mine. #1806 added the
objectsOnly()narrowing and #1808 added theunchangedcounter and its guard. Each was fine alone; together they are one line and one branch past the line.What changes
Neither reading the importer's reply nor logging it belongs in
install(), which should read as: load, ask, land, judge, report. They move out asreadLanding()andreportLanding(), and an early return in the partial-import warning removes the last branch.No behaviour changes. 34 tests across
DemoDataServiceTestandSetupControllerStatusTestpass unchanged.How it was found, which is the part worth keeping
composer phpmdruns the whole oflib/in one process and gets OOM-killed on this machine, so the run that "passed" had died rather than finished. A per-directory sweep is what surfaced it:Verification
PHPUnit, PHPCS, PHPStan, Psalm, a per-directory PHPMD sweep and all 77 applicable hydra gates exit 0.
🤖 Generated with Claude Code