X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FMoney.php;h=22d5551dd78c4d36f810542a661ec67454f0c542;hb=725b3de6f03330ab5e310f397fc0336fe551ec6f;hp=c02b55ceadaa779e5f39850fe12fff1615970bee;hpb=b2ac9e9ca74be7f852e37e0dfbf0e77627471c4d;p=civicrm-core.git diff --git a/CRM/Utils/Money.php b/CRM/Utils/Money.php index c02b55cead..22d5551dd7 100644 --- a/CRM/Utils/Money.php +++ b/CRM/Utils/Money.php @@ -23,7 +23,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * @@ -40,7 +40,7 @@ class CRM_Utils_Money { static $_currencySymbols = NULL; /** - * Format a monetary string + * Format a monetary string. * * Format a monetary string basing on the amount provided, * ISO currency code provided and a format string consisting of: @@ -49,15 +49,19 @@ class CRM_Utils_Money { * %C - the currency ISO code (e.g., 'USD') if provided * %c - the currency symbol (e.g., '$') if available * - * @param float $amount the monetary amount to display (1234.56) - * @param string $currency the three-letter ISO currency code ('USD') - * @param string $format the desired currency format + * @param float $amount + * The monetary amount to display (1234.56). + * @param string $currency + * The three-letter ISO currency code ('USD'). + * @param string $format + * The desired currency format. * @param bool $onlyNumber - * @param string $valueFormat the desired monetary value display format (e.g. '%!i') + * @param string $valueFormat + * The desired monetary value display format (e.g. '%!i'). * - * @return string formatted monetary string + * @return string + * formatted monetary string * - * @static */ public static function format($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE, $valueFormat = NULL) { @@ -84,7 +88,10 @@ class CRM_Utils_Money { } if (!self::$_currencySymbols) { - self::$_currencySymbols = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('keyColumn' => 'name', 'labelColumn' => 'symbol')); + self::$_currencySymbols = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array( + 'keyColumn' => 'name', + 'labelColumn' => 'symbol', + )); } if (!$currency) { @@ -119,4 +126,5 @@ class CRM_Utils_Money { ); return strtr($format, $replacements); } + }