> */ private array $types = [ BillDocument::class, RememberDocument::class, ]; /** * @return Collection> */ public function getTypes(): Collection { return collect($this->types); } /** * @param Collection<(int|string), Member> $members */ public function afterSingle(Invoice $invoice, Collection $members): void { foreach ($members as $member) { foreach ($member->payments as $payment) { $invoice->afterSingle($payment); } } } }