addWeeks(2); } public function createable(Member $member): bool { return $this->getPayments($member)->count() !== 0; } public function allPayments(): Generator { foreach ($this->pages as $page) { foreach ($page as $member) { foreach ($this->getPayments($member) as $payment) { yield $payment; } } } } }