0 ? $entered : 1.0, $currency, $system ) ); } /** * Convert an amount into the system currency. * * @param float $amount The amount. * @param string $currency The currency it is in. */ public static function to_base( float $amount, string $currency ): float { return $amount * self::rate( $currency ); } }