Skip to content

Commit d41d659

Browse files
committed
Fixes DocBlocks in Zend_Locale_Format - Closes zendframework#299
1 parent 0cca53e commit d41d659

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

Locale/Format.php

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Zend_Locale_Format
5959
* @param array $options Array of options, keyed by option name: format_type = 'iso' | 'php', fix_date = true | false,
6060
* locale = Zend_Locale | locale string, precision = whole number between -1 and 30
6161
* @throws Zend_Locale_Exception
62-
* @return Options array if no option was given
62+
* @return array if no option was given
6363
*/
6464
public static function setOptions(array $options = array())
6565
{
@@ -74,7 +74,7 @@ public static function setOptions(array $options = array())
7474
* @param array $options Array of options, keyed by option name: format_type = 'iso' | 'php', fix_date = true | false,
7575
* locale = Zend_Locale | locale string, precision = whole number between -1 and 30
7676
* @throws Zend_Locale_Exception
77-
* @return Options array if no option was given
77+
* @return array if no option was given
7878
*/
7979
private static function _checkOptions(array $options = array())
8080
{
@@ -292,7 +292,7 @@ public static function getNumber($input, array $options = array())
292292
* ##0.00 -> 12345.12345 -> 12345.12
293293
* ##,##0.00 -> 12345.12345 -> 12,345.12
294294
*
295-
* @param string $input Localized number string
295+
* @param string $value Localized number string
296296
* @param array $options Options: number_format, locale, precision. See {@link setOptions()} for details.
297297
* @return string locale formatted number
298298
* @throws Zend_Locale_Exception
@@ -475,6 +475,12 @@ public static function toNumber($value, array $options = array())
475475
return (string) $format;
476476
}
477477

478+
/**
479+
* @param string $format
480+
* @param string $value
481+
* @param int $precision
482+
* @return string
483+
*/
478484
private static function _seperateFormat($format, $value, $precision)
479485
{
480486
if (iconv_strpos($format, ';') !== false) {
@@ -531,7 +537,9 @@ public static function isNumber($input, array $options = array())
531537
* Internal method to convert cldr number syntax into regex
532538
*
533539
* @param string $type
540+
* @param array $options Options: locale. See {@link setOptions()} for details.
534541
* @return string
542+
* @throws Zend_Locale_Exception
535543
*/
536544
private static function _getRegexForType($type, $options)
537545
{
@@ -631,7 +639,7 @@ private static function _getRegexForType($type, $options)
631639
/**
632640
* Alias for getNumber
633641
*
634-
* @param string $value Number to localize
642+
* @param string $input Number to localize
635643
* @param array $options Options: locale, precision. See {@link setOptions()} for details.
636644
* @return float
637645
*/
@@ -658,9 +666,9 @@ public static function toFloat($value, array $options = array())
658666
* Returns if a float was found
659667
* Alias for isNumber()
660668
*
661-
* @param string $input Localized number string
662-
* @param array $options Options: locale. See {@link setOptions()} for details.
663-
* @return boolean Returns true if a number was found
669+
* @param string $value Localized number string
670+
* @param array $options Options: locale. See {@link setOptions()} for details.
671+
* @return boolean Returns true if a number was found
664672
*/
665673
public static function isFloat($value, array $options = array())
666674
{
@@ -706,9 +714,9 @@ public static function toInteger($value, array $options = array())
706714
/**
707715
* Returns if a integer was found
708716
*
709-
* @param string $input Localized number string
710-
* @param array $options Options: locale. See {@link setOptions()} for details.
711-
* @return boolean Returns true if a integer was found
717+
* @param string $value Localized number string
718+
* @param array $options Options: locale. See {@link setOptions()} for details.
719+
* @return boolean Returns true if a integer was found
712720
*/
713721
public static function isInteger($value, array $options = array())
714722
{
@@ -755,15 +763,16 @@ public static function convertPhpToIsoFormat($format)
755763
}
756764
}
757765

758-
return join($values);
766+
return implode($values);
759767
}
760768

761769
/**
762770
* Parse date and split in named array fields
763771
*
764-
* @param string $date Date string to parse
765-
* @param array $options Options: format_type, fix_date, locale, date_format. See {@link setOptions()} for details.
766-
* @return array Possible array members: day, month, year, hour, minute, second, fixed, format
772+
* @param string $date Date string to parse
773+
* @param array $options Options: format_type, fix_date, locale, date_format. See {@link setOptions()} for details.
774+
* @return array Possible array members: day, month, year, hour, minute, second, fixed, format
775+
* @throws Zend_Locale_Exception
767776
*/
768777
private static function _parseDate($date, $options)
769778
{
@@ -1181,8 +1190,9 @@ public static function checkDateFormat($date, array $options = array())
11811190
/**
11821191
* Returns the default time format for $locale.
11831192
*
1184-
* @param string|Zend_Locale $locale OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
1193+
* @param string|Zend_Locale $locale OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
11851194
* @return string format
1195+
* @throws Zend_Locale_Exception
11861196
*/
11871197
public static function getTimeFormat($locale = null)
11881198
{
@@ -1196,7 +1206,7 @@ public static function getTimeFormat($locale = null)
11961206

11971207
/**
11981208
* Returns an array with 'hour', 'minute', and 'second' elements extracted from $time
1199-
* according to the order described in $format. For a format of 'H:m:s', and
1209+
* according to the order described in $format. For a format of 'H:i:s', and
12001210
* an input of 11:20:55, getTime() would return:
12011211
* array ('hour' => 11, 'minute' => 20, 'second' => 55)
12021212
* The optional $locale parameter may be used to help extract times from strings
@@ -1219,8 +1229,9 @@ public static function getTime($time, array $options = array())
12191229
/**
12201230
* Returns the default datetime format for $locale.
12211231
*
1222-
* @param string|Zend_Locale $locale OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
1232+
* @param string|Zend_Locale $locale OPTIONAL Locale of $number, possibly in string form (e.g. 'de_AT')
12231233
* @return string format
1234+
* @throws Zend_Locale_Exception
12241235
*/
12251236
public static function getDateTimeFormat($locale = null)
12261237
{
@@ -1234,7 +1245,7 @@ public static function getDateTimeFormat($locale = null)
12341245

12351246
/**
12361247
* Returns an array with 'year', 'month', 'day', 'hour', 'minute', and 'second' elements
1237-
* extracted from $datetime according to the order described in $format. For a format of 'd.M.y H:m:s',
1248+
* extracted from $datetime according to the order described in $format. For a format of 'd.M.y H:i:s',
12381249
* and an input of 10.05.1985 11:20:55, getDateTime() would return:
12391250
* array ('year' => 1985, 'month' => 5, 'day' => 10, 'hour' => 11, 'minute' => 20, 'second' => 55)
12401251
* The optional $locale parameter may be used to help extract times from strings

0 commit comments

Comments
 (0)