You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decidesk is the pilot for the fleetwide root-config consolidation (template + 17 PHP apps). After syncing the canonical phpcs.xml/phpmd.xml/psalm.xml/phpstan.neon from nextcloud-app-template, lint runs surface a tracked lint debt that needs cleanup. The directive for the fleet is no per-app validation rules — exceptions are fleetwide or they don't exist. This issue captures the per-app code-level debt that the canonical sync unmasked.
phpstan errors (6)
lib/Controller/ApiController.php:85 — Constant SCOPE_MAP is unused. Awaiting REQ-OAUTH-002 implementation. Either delete the constant or wire it into OAuth scope enforcement.
lib/Controller/SettingsController.php:141 — Parameter #1 $settings of AuthorizedAdminSetting expects class-string<IDelegatedSettings>. Pass an IDelegatedSettings::class literal instead of a string.
lib/Service/ActionItemAnalyticsService.php:224 — Comparison ">" between int<1, max> and 0 is always true. PHPDoc says int<1, max> but the comparison checks > 0. Either fix the PHPDoc or remove the dead branch.
lib/Service/ActionItemAnalyticsService.php:226 — Else branch is unreachable (same root cause as above).
lib/Service/EmailLinkService.php:189 — Offset 0 on array... in isset() always exists. Refactor the defensive isset away (offset is guaranteed by preg_match_all contract).
lib/Service/MotionCoauthorService.php:265 — Strict comparison using === between true and false will always evaluate to false. Refactor the dead branch.
phpmd violations (87)
Mechanical (will be fixed in the pilot PR)
38 × MissingImport — add use Exception; etc. where FQCNs are used
15 × ElseExpression — refactor if/else to if/early return
3 × UnusedLocalVariable — remove unused $dateFromDt, $dateToDt etc.
3 × UnusedFormalParameter — remove or use unused parameters
1 × BooleanArgumentFlag — rename / restructure boolean parameter API
Architectural (separate follow-up PRs)
AppInfo/Application.phpregister() 468 lines — split into registerEventListeners(), registerSearchProviders(), registerNotifications(), etc. Big change; needs care to preserve registration order.
Controller/MinutesController.php coupling 16/13 — extract service aggregator(s) to reduce constructor surface.
Apply mechanical phpmd fixes (the ~60 in the first checklist).
Update description strings to "Decidesk" cosmetically.
Architectural refactoring will land in follow-up PRs that close the second checklist. Each architectural PR should ship with tests where the touched logic has any.
Drives the Phase 2 fleet rollout of the root-config consolidation. Once decidesk is green on the canonical (mechanical + architectural), the same recipe applies to the remaining 13 apps.
Context
Decidesk is the pilot for the fleetwide root-config consolidation (template + 17 PHP apps). After syncing the canonical
phpcs.xml/phpmd.xml/psalm.xml/phpstan.neonfromnextcloud-app-template, lint runs surface a tracked lint debt that needs cleanup. The directive for the fleet is no per-app validation rules — exceptions are fleetwide or they don't exist. This issue captures the per-app code-level debt that the canonical sync unmasked.phpstan errors (6)
lib/Controller/ApiController.php:85—Constant SCOPE_MAP is unused. Awaiting REQ-OAUTH-002 implementation. Either delete the constant or wire it into OAuth scope enforcement.lib/Controller/SettingsController.php:141—Parameter #1 $settings of AuthorizedAdminSetting expects class-string<IDelegatedSettings>. Pass anIDelegatedSettings::classliteral instead of a string.lib/Service/ActionItemAnalyticsService.php:224—Comparison ">" between int<1, max> and 0 is always true. PHPDoc saysint<1, max>but the comparison checks> 0. Either fix the PHPDoc or remove the dead branch.lib/Service/ActionItemAnalyticsService.php:226—Else branch is unreachable(same root cause as above).lib/Service/EmailLinkService.php:189—Offset 0 on array... in isset() always exists. Refactor the defensiveissetaway (offset is guaranteed by preg_match_all contract).lib/Service/MotionCoauthorService.php:265—Strict comparison using === between true and false will always evaluate to false. Refactor the dead branch.phpmd violations (87)
Mechanical (will be fixed in the pilot PR)
MissingImport— adduse Exception;etc. where FQCNs are usedElseExpression— refactorif/elsetoif/early returnUnusedLocalVariable— remove unused$dateFromDt,$dateToDtetc.UnusedFormalParameter— remove or use unused parametersBooleanArgumentFlag— rename / restructure boolean parameter APIArchitectural (separate follow-up PRs)
AppInfo/Application.phpregister()468 lines — split intoregisterEventListeners(),registerSearchProviders(),registerNotifications(), etc. Big change; needs care to preserve registration order.Controller/MinutesController.phpcoupling 16/13 — extract service aggregator(s) to reduce constructor surface.Controller/OriController.phpserializeOri()cyclomatic 12, NPath 768 — extract nested conditionals into private helpers.Service/ALVMinutesService.phpgenerateALVDraft()— cyclomatic 15, NPath 3457, length 155. Split into per-section generators.Service/ALVMinutesService.phpdistribute()— cyclomatic 18, NPath 3061, length 110. Extract per-channel distribution methods.Service/CommentService.php— 1× cyclomatic, 1× NPath. Audit and refactor.Service/ActionItemAnalyticsService.phpgetSummary()— cyclomatic 11, plus the two phpstan "always true" issues above.Service/WorkspaceService.php— 1× cyclomatic, 1× NPath, 1× ExcessiveMethodLength.Service/MinutesService.php— 1× cyclomatic, 1× NPath, 1× ExcessiveMethodLength.Service/TaskService.php— 1× cyclomatic.Service/EngagementService.php— 1× cyclomatic.Service/DelegationService.php— 1× cyclomatic.Service/VotingService.php— 1× cyclomatic.Service/MeetingService.php— 1× cyclomatic.Service/LiveDecisionService.php— 1× ExcessiveClassComplexity. Class split.Service/DecisionNotificationService.php— 1× cyclomatic.Service/MotionService.php— 1× cyclomatic.Plan
The pilot PR will:
Architectural refactoring will land in follow-up PRs that close the second checklist. Each architectural PR should ship with tests where the touched logic has any.
Drives the Phase 2 fleet rollout of the root-config consolidation. Once decidesk is green on the canonical (mechanical + architectural), the same recipe applies to the remaining 13 apps.