Files
everything-claude-code/docs/ja-JP/rules/php/patterns.md
Claude ec9ace9c54 docs: add native Japanese translation of ECC documentation (ja-JP)
Translate everything-claude-code repository to Japanese including:
- 17 root documentation files
- 60 agent documentation files
- 80 command documentation files
- 99 rule files across 18 language directories (common, angular, arkts, cpp, csharp, dart, fsharp, golang, java, kotlin, perl, php, python, ruby, rust, swift, typescript, web)
- 199 skill documentation files

Total: 455 files translated to Japanese with:
- Consistent terminology glossary applied throughout
- YAML field names preserved in English (name, description, etc.)
- Code blocks and examples untouched (comments translated)
- Markdown structure and relative links preserved
- Professional translation maintaining technical accuracy

This translation expands ECC accessibility to Japanese-speaking developers and teams.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-17 02:31:40 -04:00

1.7 KiB

paths
paths
**/*.php
**/composer.json

PHP パターン

このファイルは common/patterns.md を PHP 固有のコンテンツで拡張します。

薄いコントローラ、明示的なサービス

  • コントローラはトランスポートに集中する: 認証、バリデーション、シリアライゼーション、ステータスコード。
  • ビジネスルールは HTTP ブートストラップなしでテストしやすいアプリケーション/ドメインサービスに移動する。

DTO と値オブジェクト

  • 形状の重い連想配列をリクエスト、コマンド、外部 API ペイロード用の DTO に置き換える。
  • 金額、識別子、日付範囲、その他の制約のある概念には値オブジェクトを使用する。

依存性注入

  • フレームワークのグローバルではなく、インターフェースまたは狭いサービス契約に依存する。
  • サービスロケータ検索なしでテスト可能になるよう、コンストラクタ経由で協力オブジェクトを渡す。

境界

  • モデル層が永続化以上のことをしている場合、ORM モデルをドメイン判断から分離する。
  • サードパーティ SDK を小さなアダプタでラップし、コードベースの残りが彼らの契約ではなく自身の契約に依存するようにする。

リファレンス

スキル: api-design でエンドポイントの規約とレスポンス形状のガイダンスを参照してください。 スキル: laravel-patterns で Laravel 固有のアーキテクチャガイダンスを参照してください。