src/Model/Payment.php
protected function createMoney(int $amount = 0) : ?Money
    {
        if (!$this->getCurrency()) {
            return null;
        }

        return new Money($amount, new Currency($this->getCurrency()));
    }
protected function createMoney(int $amount = 0) : ?Money
    {
        if (!$this->getCurrency()) {
            return null;
        }

        return new Money($amount, new Currency($this->getCurrency()));
    }
A helper method for creating a Money object from a float based on the shared currency

@param int $amount
@return Money|null