Skip to content

Commit

Permalink
Fix phpdocs in HttpClient, HttpFoundation, HttpKernel, Intl components
Browse files Browse the repository at this point in the history
  • Loading branch information
alamirault committed Feb 17, 2023
1 parent ba98f39 commit 32c2d95
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions DateFormatter/DateFormat/HourTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
14 changes: 7 additions & 7 deletions DateFormatter/IntlDateFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down
28 changes: 14 additions & 14 deletions Locale/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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
*
Expand All @@ -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
*
Expand All @@ -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
*
Expand All @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down
14 changes: 7 additions & 7 deletions NumberFormatter/NumberFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down
14 changes: 7 additions & 7 deletions ResourceBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32c2d95

Please sign in to comment.