Follow-up cleanup tracking issue created during the Phase 2 fleet root-config consolidation sync ("chore: sync canonical root configs + mechanical phpmd cleanup").
Pattern matches ConductionNL/shillinq#299 and ConductionNL/decidesk#243. openregister is the foundation app — largest follow-up scope across the fleet.
Quality gate state after sync + mechanical fixes
- phpcs: 336 errors, 3594 warnings remain (auto-fix already ran)
- phpstan: 0 unmatched errors, 1724 baselined entries (
phpstan-baseline.neon)
- psalm: 145 unbaselined errors surfaced — existing
psalm-baseline.xml preserved untouched per fleet plan
- phpmd: 59 architectural violations remain (mechanical categories cleared)
Phase-2 mechanical fixes already applied in this PR
- MissingImport: 57 → 0 (added 25+
use statements across Application.php, BookmarksProvider, CalendarProvider, TasksProvider, ExternalIntegrationRouter, ResponseGenerationHandler, ObjectService, PdfReportWriter, UserService)
- ElseExpression: 15 → 0 (refactored to early-return / continue / default-then-override patterns)
- UnusedFormalParameter: 7 → 0 (added
@SuppressWarnings(PHPMD.UnusedFormalParameter) on deprecated facade signatures with TODO comments)
- UnusedLocalVariable: 2 → 0 (renamed to
$_ + suppression annotation)
- BooleanArgumentFlag: 2 → 0 (suppressed on
requestHeaders($withBody) — body-vs-no-body is the natural HTTP-headers toggle)
Total mechanical fixes: ~80 violations cleared.
phpcs follow-up debt (336 errors / 3594 warnings)
- CustomSn.Commenting.SpecTag missing method spec: 2793 — ADR-008
@spec tag missing on per-method docblocks across lib/
- CustomSn.Commenting.SpecTag missing class spec: 801 — same, class-level
- Squiz.PHP.DisallowInlineIf: 309 ternaries flagged (~/2 line refactors each, mostly readable already)
- A handful of
Squiz.Whitespace.FunctionSpacing and Generic.WhiteSpace.ScopeIndent corner cases the auto-fixer can't resolve.
phpstan baselined debt (1724 entries — top categories)
- Magic method
Entity::get*()/set*(): Register/Schema/ObjectEntity/Organisation entity getters not declared as @method docblocks → add explicit annotations.
find() / findAll() signature drift across mappers: extra args like uuid/slug/_multitenancy/_rbac not on the QBMapper parent contract → unify the mapper contract.
- LLPhant dynamic-property access:
$config->temperature = … etc. — vendor doesn't declare these, wrap in a typed adapter or pin a vendor patch.
Cron\\CronExpression / Sabre\\VObject\\*: vendor noise from runtime-only deps, acceptable to allowlist.
AppendOnlyException, AuthorizedAdminSetting: real type drift, fix in code.
psalm follow-up debt (145 unbaselined errors)
The canonical psalm.xml is stricter than the prior per-app one — most new errors fall in:
TooFewArguments on BuiltinProviders\TasksProvider::__construct (DI wiring lost args after refactor — real bug)
InvalidTemplateParam on JSONResponse<int, …> — Nextcloud OCP's S template restricts to specific HTTP status ints; controllers pass int widening
UndefinedClass: OC\\Security\\CSP\\ContentSecurityPolicyNonceManager / CSRF\\CsrfTokenManager in GraphQLController — internal OC namespace, suppress per-file
- Various
MissingPropertyType / MissingClosureReturnType — annotate as encountered
phpmd architectural debt (59 remaining)
All categories are architectural (refactor required):
- 13 CyclomaticComplexity, 10 NPathComplexity, 4 ExcessiveMethodLength, 4 CouplingBetweenObjects (
AuditTrailMapper, ConfigurationSettingsHandler, Application::registerIntegrationRegistry — the usual suspects)
- 7 StaticAccess (
\\OC::$server access points to migrate; ADR forbids new uses, kept for legacy bootstrapping)
- 7 IfStatementAssignment (assignment-in-if pattern — refactor for clarity)
- 5 LongVariable, 2 TooManyMethods, 2 ExcessiveClassComplexity, 2 ErrorControlOperator (
@-suppression), 2 TooManyPublicMethods, 1 NumberOfChildren, 1 ExitExpression, 1 ExcessiveClassLength
Next steps (priorities)
Follow-up cleanup tracking issue created during the Phase 2 fleet root-config consolidation sync ("chore: sync canonical root configs + mechanical phpmd cleanup").
Pattern matches ConductionNL/shillinq#299 and ConductionNL/decidesk#243. openregister is the foundation app — largest follow-up scope across the fleet.
Quality gate state after sync + mechanical fixes
phpstan-baseline.neon)psalm-baseline.xmlpreserved untouched per fleet planPhase-2 mechanical fixes already applied in this PR
usestatements acrossApplication.php,BookmarksProvider,CalendarProvider,TasksProvider,ExternalIntegrationRouter,ResponseGenerationHandler,ObjectService,PdfReportWriter,UserService)@SuppressWarnings(PHPMD.UnusedFormalParameter)on deprecated facade signatures with TODO comments)$_+ suppression annotation)requestHeaders($withBody)— body-vs-no-body is the natural HTTP-headers toggle)Total mechanical fixes: ~80 violations cleared.
phpcs follow-up debt (336 errors / 3594 warnings)
@spectag missing on per-method docblocks acrosslib/Squiz.Whitespace.FunctionSpacingandGeneric.WhiteSpace.ScopeIndentcorner cases the auto-fixer can't resolve.phpstan baselined debt (1724 entries — top categories)
Entity::get*()/set*(): Register/Schema/ObjectEntity/Organisation entity getters not declared as@methoddocblocks → add explicit annotations.find()/findAll()signature drift across mappers: extra args likeuuid/slug/_multitenancy/_rbacnot on the QBMapper parent contract → unify the mapper contract.$config->temperature = …etc. — vendor doesn't declare these, wrap in a typed adapter or pin a vendor patch.Cron\\CronExpression/Sabre\\VObject\\*: vendor noise from runtime-only deps, acceptable to allowlist.AppendOnlyException,AuthorizedAdminSetting: real type drift, fix in code.psalm follow-up debt (145 unbaselined errors)
The canonical psalm.xml is stricter than the prior per-app one — most new errors fall in:
TooFewArgumentsonBuiltinProviders\TasksProvider::__construct(DI wiring lost args after refactor — real bug)InvalidTemplateParamonJSONResponse<int, …>— Nextcloud OCP's S template restricts to specific HTTP status ints; controllers passintwideningUndefinedClass: OC\\Security\\CSP\\ContentSecurityPolicyNonceManager/CSRF\\CsrfTokenManagerinGraphQLController— internal OC namespace, suppress per-fileMissingPropertyType/MissingClosureReturnType— annotate as encounteredphpmd architectural debt (59 remaining)
All categories are architectural (refactor required):
AuditTrailMapper,ConfigurationSettingsHandler,Application::registerIntegrationRegistry— the usual suspects)\\OC::$serveraccess points to migrate; ADR forbids new uses, kept for legacy bootstrapping)@-suppression), 2 TooManyPublicMethods, 1 NumberOfChildren, 1 ExitExpression, 1 ExcessiveClassLengthNext steps (priorities)
@methoddocblocks toRegister,Schema,ObjectEntity,Organisationentities — likely clears 200+ phpstan baseline entriesfind()/findAll()signatures across registers/schemas/objects/audit-trail mappersBuiltinProviders\TasksProvider::__constructto fix the real psalmTooFewArgumentsfindingAuditTrailMapper,ConfigurationSettingsHandler::*,Application::registerIntegrationRegistryover multiple smaller helpers@spectags on the 800 classes / 2800 methods that drive the phpcs warning volume (likely the longest-tail item)