/** * @param Payment $payment */ public function add(Payment $payment) { $this->payments[(string) $payment->id()] = $payment; }