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

8 lines
612 B
Markdown

---
globs: src/Logic/**/UseCase/*.php, src/Logic/**/DTO/*.php
description: Enforces the use of DTOs for UseCase entry points to maintain clean
architecture, immutability, and type safety.
alwaysApply: 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.