src/Entity/StockMovement.php
protected function money(int $val): Money
    {
        if (!$this->currency) {
            throw new UnsetCurrencyException('The currency is not set on this stock movement');
        }

        return new Money($val, new Currency($this->currency));
    }
protected function money(int $val): Money
    {
        if (!$this->currency) {
            throw new UnsetCurrencyException('The currency is not set on this stock movement');
        }

        return new Money($val, new Currency($this->currency));
    }
protected function money ( int $ val ) : Money { if ( ! $ this -> currency ) { throw new UnsetCurrencyException ( 'The currency is not set on this stock movement' ) ; } return new Money ( $ val , new Currency ( $ this -> currency ) ) ; }
Returns a new Money object based on the shared currency
If no currency is set, it throws an exception.

@param int $val

@return Money

@throws \Loevgaard\DandomainStock\Exception\UnsetCurrencyException
Returns a new Money object based on the shared currency If no currency is set it throws an exception .