/** * Deposit the given amount to the beneficiary's account * * @param Money $amount * @throws InvalidTransferAmount * A member cannot transfer a negative amount to another member */ protected function applyDeposit(Money $amount) { if ($amount->isNegative()) { throw new InvalidTransferAmount("Cannot transfer negative amount {$amount->getAmount()}"); } $this->account->deposit($amount); }