refactor: fix PHPStan level 5 type errors across services #18

Open
opened 2026-02-21 01:02:58 +00:00 by Clotho · 0 comments
Member

Summary

Multiple service classes have missing or incomplete type declarations that would fail PHPStan level 5 analysis.

Problem Areas

  • AgentSessionService — 21 methods lack return type declarations
  • AgentToolRegistry — 11 methods lack return type declarations
  • AuditLogService — protected methods getSensitivityInfo(), redactFields(), redactRecursive() lack type hints
  • Various array type hints missing shape annotations (@param array<string, mixed>)
  • Nullable return types not declared (should be ?string not string)

Acceptance Criteria

  • Run ./vendor/bin/phpstan analyse --level=5 src/ with zero errors
  • All public, protected, and private methods have return type hints
  • All parameters have type hints
  • No untyped array parameters on public methods

Files

  • All service files in src/Mcp/Services/
  • src/Mcp/Tools/ tool implementations

Notes

Also noted in TODO.md. Estimated effort: 2-3 hours.

## Summary Multiple service classes have missing or incomplete type declarations that would fail PHPStan level 5 analysis. ## Problem Areas - `AgentSessionService` — 21 methods lack return type declarations - `AgentToolRegistry` — 11 methods lack return type declarations - `AuditLogService` — protected methods `getSensitivityInfo()`, `redactFields()`, `redactRecursive()` lack type hints - Various `array` type hints missing shape annotations (`@param array<string, mixed>`) - Nullable return types not declared (should be `?string` not `string`) ## Acceptance Criteria - Run `./vendor/bin/phpstan analyse --level=5 src/` with zero errors - All public, protected, and private methods have return type hints - All parameters have type hints - No untyped array parameters on public methods ## Files - All service files in `src/Mcp/Services/` - `src/Mcp/Tools/` tool implementations ## Notes Also noted in TODO.md. Estimated effort: 2-3 hours.
Clotho added the
refactor
discovery
labels 2026-02-21 01:02:58 +00:00
Snider added the
clotho
label 2026-02-21 01:23:16 +00:00
Charon added the
agent-ready
label 2026-02-21 01:30:15 +00:00
Sign in to join this conversation.
No description provided.