9 lines
512 B
Markdown
9 lines
512 B
Markdown
---
|
|
globs: "**/UI/**/*Controller*.php"
|
|
description: Improves code readability and maintainability by using
|
|
self-documenting constants instead of magic numbers for HTTP status codes.
|
|
Applies to all controllers in the UI layer and any response handling.
|
|
alwaysApply: true
|
|
---
|
|
|
|
Always use Symfony Response HTTP status constants (e.g., Response::HTTP_OK, Response::HTTP_CREATED, Response::HTTP_NOT_FOUND) instead of magic numbers (e.g., 200, 201, 404) when setting HTTP status codes in controllers and responses. |