diff --git a/DateFormatter/DateFormat/HourTransformer.php b/DateFormatter/DateFormat/HourTransformer.php index 54dcbfe2..a9734ac0 100644 --- a/DateFormatter/DateFormat/HourTransformer.php +++ b/DateFormatter/DateFormat/HourTransformer.php @@ -25,8 +25,8 @@ abstract class HourTransformer extends Transformer /** * Returns a normalized hour value suitable for the hour transformer type. * - * @param int $hour The hour value - * @param string $marker An optional AM/PM marker + * @param int $hour The hour value + * @param string|null $marker An optional AM/PM marker * * @return int The normalized hour value */ diff --git a/DateFormatter/IntlDateFormatter.php b/DateFormatter/IntlDateFormatter.php index 5b683c4c..86257898 100644 --- a/DateFormatter/IntlDateFormatter.php +++ b/DateFormatter/IntlDateFormatter.php @@ -124,7 +124,7 @@ abstract class IntlDateFormatter * @param int|null $datetype Type of date formatting, one of the format type constants * @param int|null $timetype Type of time formatting, one of the format type constants * @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier - * @param int $calendar Calendar to use for formatting or parsing. The only currently + * @param int|null $calendar Calendar to use for formatting or parsing. The only currently * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN") * @param string|null $pattern Optional pattern to use when formatting * @@ -418,11 +418,11 @@ public function localtime(string $value, int &$position = 0) /** * Parse string to a timestamp value. * - * @param string $value String to convert to a time value - * @param int $position Not supported. Position at which to start the parsing in $value (zero-based) - * If no error occurs before $value is consumed, $parse_pos will - * contain -1 otherwise it will contain the position at which parsing - * ended. If $parse_pos > strlen($value), the parse fails immediately. + * @param string $value String to convert to a time value + * @param int|null $position Not supported. Position at which to start the parsing in $value (zero-based) + * If no error occurs before $value is consumed, $parse_pos will + * contain -1 otherwise it will contain the position at which parsing + * ended. If $parse_pos > strlen($value), the parse fails immediately. * * @return int|false Parsed value as a timestamp * @@ -494,7 +494,7 @@ public function setLenient(bool $lenient) /** * Set the formatter's pattern. * - * @param string $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation + * @param string|null $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation * * @return bool true on success or false on failure * diff --git a/Locale/Locale.php b/Locale/Locale.php index 79d2f079..d8066714 100644 --- a/Locale/Locale.php +++ b/Locale/Locale.php @@ -152,8 +152,8 @@ public static function getDefault() /** * Not supported. Returns the localized display name for the locale language. * - * @param string $locale The locale code to return the display language from - * @param string $inLocale Optional format locale code to use to display the language name + * @param string $locale The locale code to return the display language from + * @param string|null $inLocale Optional format locale code to use to display the language name * * @return string * @@ -169,8 +169,8 @@ public static function getDisplayLanguage(string $locale, string $inLocale = nul /** * Not supported. Returns the localized display name for the locale. * - * @param string $locale The locale code to return the display locale name from - * @param string $inLocale Optional format locale code to use to display the locale name + * @param string $locale The locale code to return the display locale name from + * @param string|null $inLocale Optional format locale code to use to display the locale name * * @return string * @@ -186,8 +186,8 @@ public static function getDisplayName(string $locale, string $inLocale = null) /** * Not supported. Returns the localized display name for the locale region. * - * @param string $locale The locale code to return the display region from - * @param string $inLocale Optional format locale code to use to display the region name + * @param string $locale The locale code to return the display region from + * @param string|null $inLocale Optional format locale code to use to display the region name * * @return string * @@ -203,8 +203,8 @@ public static function getDisplayRegion(string $locale, string $inLocale = null) /** * Not supported. Returns the localized display name for the locale script. * - * @param string $locale The locale code to return the display script from - * @param string $inLocale Optional format locale code to use to display the script name + * @param string $locale The locale code to return the display script from + * @param string|null $inLocale Optional format locale code to use to display the script name * * @return string * @@ -220,8 +220,8 @@ public static function getDisplayScript(string $locale, string $inLocale = null) /** * Not supported. Returns the localized display name for the locale variant. * - * @param string $locale The locale code to return the display variant from - * @param string $inLocale Optional format locale code to use to display the variant name + * @param string $locale The locale code to return the display variant from + * @param string|null $inLocale Optional format locale code to use to display the variant name * * @return string * @@ -301,10 +301,10 @@ public static function getScript(string $locale) /** * Not supported. Returns the closest language tag for the locale. * - * @param array $langtag A list of the language tags to compare to locale - * @param string $locale The locale to use as the language range when matching - * @param bool $canonicalize If true, the arguments will be converted to canonical form before matching - * @param string $default The locale to use if no match is found + * @param array $langtag A list of the language tags to compare to locale + * @param string $locale The locale to use as the language range when matching + * @param bool $canonicalize If true, the arguments will be converted to canonical form before matching + * @param string|null $default The locale to use if no match is found * * @see https://php.net/locale.lookup * diff --git a/NumberFormatter/NumberFormatter.php b/NumberFormatter/NumberFormatter.php index 2a369c27..b573f639 100644 --- a/NumberFormatter/NumberFormatter.php +++ b/NumberFormatter/NumberFormatter.php @@ -244,10 +244,10 @@ abstract class NumberFormatter /** * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $style Style of the formatting, one of the format style constants. + * @param int|null $style Style of the formatting, one of the format style constants. * The only supported styles are NumberFormatter::DECIMAL * and NumberFormatter::CURRENCY. - * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or + * @param string|null $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation * @@ -281,10 +281,10 @@ public function __construct(?string $locale = 'en', int $style = null, string $p * Static constructor. * * @param string|null $locale The locale code. The only supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $style Style of the formatting, one of the format style constants. + * @param int|null $style Style of the formatting, one of the format style constants. * The only currently supported styles are NumberFormatter::DECIMAL * and NumberFormatter::CURRENCY. - * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or + * @param string|null $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation * @@ -485,9 +485,9 @@ public function getTextAttribute(int $attr) /** * Not supported. Parse a currency number. * - * @param string $value The value to parse - * @param string $currency Parameter to receive the currency name (reference) - * @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended + * @param string $value The value to parse + * @param string $currency Parameter to receive the currency name (reference) + * @param int|null $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended * * @return float|false The parsed numeric value or false on error * diff --git a/ResourceBundle.php b/ResourceBundle.php index 4f2ee32d..c0ef5d1e 100644 --- a/ResourceBundle.php +++ b/ResourceBundle.php @@ -32,13 +32,13 @@ abstract protected static function getPath(): string; * * @see BundleEntryReaderInterface::readEntry() * - * @param string[] $indices The indices to read from the bundle - * @param string $locale The locale to read - * @param bool $fallback Whether to merge the value with the value from - * the fallback locale (e.g. "en" for "en_GB"). - * Only applicable if the result is multivalued - * (i.e. array or \ArrayAccess) or cannot be found - * in the requested locale. + * @param string[] $indices The indices to read from the bundle + * @param string|null $locale The locale to read + * @param bool $fallback Whether to merge the value with the value from + * the fallback locale (e.g. "en" for "en_GB"). + * Only applicable if the result is multivalued + * (i.e. array or \ArrayAccess) or cannot be found + * in the requested locale. * * @return mixed returns an array or {@link \ArrayAccess} instance for * complex data and a scalar value for simple data