src/Model/StripeLocalCharge.php
public function setAmount(MoneyInterface $amount): self
    {
        if (null === $this->amount) {
            $this->amount = $amount;
        }

        return $this;
    }
public function setAmount(MoneyInterface $amount): self
    {
        if (null === $this->amount) {
            $this->amount = $amount;
        }

        return $this;
    }
public function setAmount ( MoneyInterface $ amount ) : self { if ( null === $ this -> amount ) { $ this -> amount = $ amount ; } return $ this ; }
This sets the amount only if it is null.

This is to prevent an accidental overwriting of it.

@param Money|MoneyInterface $amount

@throws \InvalidArgumentException If the amount is not an integer

@return StripeLocalCharge
This sets the amount only if it is null .