chezmoi-source (чистая пересборка, не дамп 1.2 ГБ): - dot_claude: CLAUDE.md лин-роутер, AGENTS.md.tmpl (VPS вычищен), settings.json.tmpl (deny-щит 20 + security-guard hook), rules (structure + ECC 21 язык), 30 generic ECC-агентов, health-check - dot_codex: symlink-паритет; dot_agents: registry 13 скриптов HOME-генерик + методология docs - плагины: plugins.manifest + bootstrap Слой 1b (marketplace+install) - launchd: health.plist (PATH-фикс 127) + session-reaper.example - smoke++: secret-токен guard + канон-проверки (зелёный) - 0 hard личных данных; cut личного (kb/references/gsd/owner) → Ф4
1.4 KiB
1.4 KiB
paths
| paths | ||
|---|---|---|
|
PHP Coding Style
This file extends common/coding-style.md with PHP specific content.
Standards
- Follow PSR-12 formatting and naming conventions.
- Prefer
declare(strict_types=1);in application code. - Use scalar type hints, return types, and typed properties everywhere new code permits.
Immutability
- Prefer immutable DTOs and value objects for data crossing service boundaries.
- Use
readonlyproperties or immutable constructors for request/response payloads where possible. - Keep arrays for simple maps; promote business-critical structures into explicit classes.
Formatting
- Use PHP-CS-Fixer or Laravel Pint for formatting.
- Use PHPStan or Psalm for static analysis.
- Keep Composer scripts checked in so the same commands run locally and in CI.
Imports
- Add
usestatements for all referenced classes, interfaces, and traits. - Avoid relying on the global namespace unless the project explicitly prefers fully qualified names.
Error Handling
- Throw exceptions for exceptional states; avoid returning
false/nullas hidden error channels in new code. - Convert framework/request input into validated DTOs before it reaches domain logic.
Reference
See skill: backend-patterns for broader service/repository layering guidance.