• ユースケース • インターフェイスアダプター • フレームワークとドライバー ◦ インフラストラクチャー のほうが馴 染みある ◦ 最下位、一番外側 と言われる 各レイヤーの話をしましたが... 9 “Only Four Circles?” “No, the circles are schematic. You may find that you need more than just these four. There’s no rule that says you must always have just these four. However, The Dependency Rule always applies. ” 「円は4つ?」 「いや、円はあくまで概念だよ。実際には4つ以上必要な場 合もあるし、4つだけじゃなきゃいけないって決まりはな い。ただし、依存性のルールだけはいつも守らなきゃね。」 https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html より意訳
function processPayment( float $amount, string $token ): Result; } <?php namespace App\Domain\Payment; readonly class Result { public function __construct( private bool $success ) {} public function isSuccess(): bool { return $this->success; } } 39