
| Current Path : /var/www/html/store/web/modules/contrib/commerce/modules/price/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/commerce/modules/price/src/RounderInterface.php |
<?php
namespace Drupal\commerce_price;
/**
* Rounds prices.
*/
interface RounderInterface {
/**
* Rounds the given price to its currency precision.
*
* For example, USD prices will be rounded to 2 decimals.
*
* @param \Drupal\commerce_price\Price $price
* The price.
* @param int $mode
* The rounding mode. One of the following constants: PHP_ROUND_HALF_UP,
* PHP_ROUND_HALF_DOWN, PHP_ROUND_HALF_EVEN, PHP_ROUND_HALF_ODD.
*
* @return \Drupal\commerce_price\Price
* The rounded price.
*
* @throws \InvalidArgumentException
* When given a price with an unknown currency.
*/
public function round(Price $price, $mode = PHP_ROUND_HALF_UP);
}