original_string: public static function percentage( $value, $decimals = 0 )
  	{
  		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::PERCENT);
  		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
  		return $value > 1 ? $nf->format($value) : $nf->format($value);
  	}
code: public static function percentage( $value, $decimals = 0 )
  	{
  		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::PERCENT);
  		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
  		return $value > 1 ? $nf->format($value) : $nf->format($value);
  	}
code_tokens: public static function percentage ( $ value , $ decimals = 0 ) { $ nf = new \ NumberFormatter ( \ Locale :: getDefault ( ) , \ NumberFormatter :: PERCENT ) ; $ nf -> setAttribute ( \ NumberFormatter :: MAX_FRACTION_DIGITS , $ decimals ) ; return $ value > 1 ? $ nf -> format ( $ value ) : $ nf -> format ( $ value ) ; }
docstring: returns a string with percentage formatted accordingly to Yii dateFormatter
  @param $value
  @param $decimals
  @return string
docstring_tokens: returns a string with percentage formatted accordingly to Yii dateFormatter