original_string: public static function currency( $value, $decimals = 2, $currencyCode = null )
  	{
  		$app = Application::instance();
  		$currencyCode = $currencyCode ?: $app->getConfig('app.settings.currency');
  
  		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::CURRENCY);
  		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
  		return $nf->formatCurrency($value, $currencyCode);
  	}
code: public static function currency( $value, $decimals = 2, $currencyCode = null )
  	{
  		$app = Application::instance();
  		$currencyCode = $currencyCode ?: $app->getConfig('app.settings.currency');
  
  		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::CURRENCY);
  		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
  		return $nf->formatCurrency($value, $currencyCode);
  	}
code_tokens: public static function currency ( $ value , $ decimals = 2 , $ currencyCode = null ) { $ app = Application :: instance ( ) ; $ currencyCode = $ currencyCode ? : $ app -> getConfig ( 'app.settings.currency' ) ; $ nf = new \ NumberFormatter ( \ Locale :: getDefault ( ) , \ NumberFormatter :: CURRENCY ) ; $ nf -> setAttribute ( \ NumberFormatter :: MAX_FRACTION_DIGITS , $ decimals ) ; return $ nf -> formatCurrency ( $ value , $ currencyCode ) ; }
docstring: returns a string with currency formatted accordingly to locale settings
  @param string $value
  @param string $decimals
  @param string $currencyCode
  @return string
docstring_tokens: returns a string with currency formatted accordingly to locale settings