periods === []) { throw new \DomainException('Diffusion requires at least one period.'); } foreach ($this->periods as $period) { if (!$period instanceof Period) { throw new \DomainException('CouponDiffusion periods must be Period instances.'); } } } }