Files
ai-chat/.continue/rules/usecase-input-via-dtos.md
T
2026-06-10 18:22:27 +02:00

612 B

globs, description, alwaysApply
globs description alwaysApply
src/Logic/**/UseCase/*.php, src/Logic/**/DTO/*.php Enforces the use of DTOs for UseCase entry points to maintain clean architecture, immutability, and type safety. true

UseCase methods must accept DTOs (Data Transfer Objects) for input parameters instead of raw arrays or Request objects. DTOs must be located in the /src/Logic/[FeatureName]/DTO directory and should be immutable (readonly properties). This ensures decoupling between the Logic and UI layers. Simple primitive inputs (like a single ID) may be passed directly, but complex data structures require DTOs.