Skip to content

Commit 32c2d95

Browse files
committed
Fix phpdocs in HttpClient, HttpFoundation, HttpKernel, Intl components
1 parent ba98f39 commit 32c2d95

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

DateFormatter/DateFormat/HourTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ abstract class HourTransformer extends Transformer
2525
/**
2626
* Returns a normalized hour value suitable for the hour transformer type.
2727
*
28-
* @param int $hour The hour value
29-
* @param string $marker An optional AM/PM marker
28+
* @param int $hour The hour value
29+
* @param string|null $marker An optional AM/PM marker
3030
*
3131
* @return int The normalized hour value
3232
*/

DateFormatter/IntlDateFormatter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ abstract class IntlDateFormatter
124124
* @param int|null $datetype Type of date formatting, one of the format type constants
125125
* @param int|null $timetype Type of time formatting, one of the format type constants
126126
* @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier
127-
* @param int $calendar Calendar to use for formatting or parsing. The only currently
127+
* @param int|null $calendar Calendar to use for formatting or parsing. The only currently
128128
* supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN")
129129
* @param string|null $pattern Optional pattern to use when formatting
130130
*
@@ -418,11 +418,11 @@ public function localtime(string $value, int &$position = 0)
418418
/**
419419
* Parse string to a timestamp value.
420420
*
421-
* @param string $value String to convert to a time value
422-
* @param int $position Not supported. Position at which to start the parsing in $value (zero-based)
423-
* If no error occurs before $value is consumed, $parse_pos will
424-
* contain -1 otherwise it will contain the position at which parsing
425-
* ended. If $parse_pos > strlen($value), the parse fails immediately.
421+
* @param string $value String to convert to a time value
422+
* @param int|null $position Not supported. Position at which to start the parsing in $value (zero-based)
423+
* If no error occurs before $value is consumed, $parse_pos will
424+
* contain -1 otherwise it will contain the position at which parsing
425+
* ended. If $parse_pos > strlen($value), the parse fails immediately.
426426
*
427427
* @return int|false Parsed value as a timestamp
428428
*
@@ -494,7 +494,7 @@ public function setLenient(bool $lenient)
494494
/**
495495
* Set the formatter's pattern.
496496
*
497-
* @param string $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation
497+
* @param string|null $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation
498498
*
499499
* @return bool true on success or false on failure
500500
*

Locale/Locale.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ public static function getDefault()
152152
/**
153153
* Not supported. Returns the localized display name for the locale language.
154154
*
155-
* @param string $locale The locale code to return the display language from
156-
* @param string $inLocale Optional format locale code to use to display the language name
155+
* @param string $locale The locale code to return the display language from
156+
* @param string|null $inLocale Optional format locale code to use to display the language name
157157
*
158158
* @return string
159159
*
@@ -169,8 +169,8 @@ public static function getDisplayLanguage(string $locale, string $inLocale = nul
169169
/**
170170
* Not supported. Returns the localized display name for the locale.
171171
*
172-
* @param string $locale The locale code to return the display locale name from
173-
* @param string $inLocale Optional format locale code to use to display the locale name
172+
* @param string $locale The locale code to return the display locale name from
173+
* @param string|null $inLocale Optional format locale code to use to display the locale name
174174
*
175175
* @return string
176176
*
@@ -186,8 +186,8 @@ public static function getDisplayName(string $locale, string $inLocale = null)
186186
/**
187187
* Not supported. Returns the localized display name for the locale region.
188188
*
189-
* @param string $locale The locale code to return the display region from
190-
* @param string $inLocale Optional format locale code to use to display the region name
189+
* @param string $locale The locale code to return the display region from
190+
* @param string|null $inLocale Optional format locale code to use to display the region name
191191
*
192192
* @return string
193193
*
@@ -203,8 +203,8 @@ public static function getDisplayRegion(string $locale, string $inLocale = null)
203203
/**
204204
* Not supported. Returns the localized display name for the locale script.
205205
*
206-
* @param string $locale The locale code to return the display script from
207-
* @param string $inLocale Optional format locale code to use to display the script name
206+
* @param string $locale The locale code to return the display script from
207+
* @param string|null $inLocale Optional format locale code to use to display the script name
208208
*
209209
* @return string
210210
*
@@ -220,8 +220,8 @@ public static function getDisplayScript(string $locale, string $inLocale = null)
220220
/**
221221
* Not supported. Returns the localized display name for the locale variant.
222222
*
223-
* @param string $locale The locale code to return the display variant from
224-
* @param string $inLocale Optional format locale code to use to display the variant name
223+
* @param string $locale The locale code to return the display variant from
224+
* @param string|null $inLocale Optional format locale code to use to display the variant name
225225
*
226226
* @return string
227227
*
@@ -301,10 +301,10 @@ public static function getScript(string $locale)
301301
/**
302302
* Not supported. Returns the closest language tag for the locale.
303303
*
304-
* @param array $langtag A list of the language tags to compare to locale
305-
* @param string $locale The locale to use as the language range when matching
306-
* @param bool $canonicalize If true, the arguments will be converted to canonical form before matching
307-
* @param string $default The locale to use if no match is found
304+
* @param array $langtag A list of the language tags to compare to locale
305+
* @param string $locale The locale to use as the language range when matching
306+
* @param bool $canonicalize If true, the arguments will be converted to canonical form before matching
307+
* @param string|null $default The locale to use if no match is found
308308
*
309309
* @see https://php.net/locale.lookup
310310
*

NumberFormatter/NumberFormatter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ abstract class NumberFormatter
244244

245245
/**
246246
* @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en")
247-
* @param int $style Style of the formatting, one of the format style constants.
247+
* @param int|null $style Style of the formatting, one of the format style constants.
248248
* The only supported styles are NumberFormatter::DECIMAL
249249
* and NumberFormatter::CURRENCY.
250-
* @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or
250+
* @param string|null $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or
251251
* NumberFormat::PATTERN_RULEBASED. It must conform to the syntax
252252
* described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation
253253
*
@@ -281,10 +281,10 @@ public function __construct(?string $locale = 'en', int $style = null, string $p
281281
* Static constructor.
282282
*
283283
* @param string|null $locale The locale code. The only supported locale is "en" (or null using the default locale, i.e. "en")
284-
* @param int $style Style of the formatting, one of the format style constants.
284+
* @param int|null $style Style of the formatting, one of the format style constants.
285285
* The only currently supported styles are NumberFormatter::DECIMAL
286286
* and NumberFormatter::CURRENCY.
287-
* @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or
287+
* @param string|null $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or
288288
* NumberFormat::PATTERN_RULEBASED. It must conform to the syntax
289289
* described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation
290290
*
@@ -485,9 +485,9 @@ public function getTextAttribute(int $attr)
485485
/**
486486
* Not supported. Parse a currency number.
487487
*
488-
* @param string $value The value to parse
489-
* @param string $currency Parameter to receive the currency name (reference)
490-
* @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended
488+
* @param string $value The value to parse
489+
* @param string $currency Parameter to receive the currency name (reference)
490+
* @param int|null $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended
491491
*
492492
* @return float|false The parsed numeric value or false on error
493493
*

ResourceBundle.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ abstract protected static function getPath(): string;
3232
*
3333
* @see BundleEntryReaderInterface::readEntry()
3434
*
35-
* @param string[] $indices The indices to read from the bundle
36-
* @param string $locale The locale to read
37-
* @param bool $fallback Whether to merge the value with the value from
38-
* the fallback locale (e.g. "en" for "en_GB").
39-
* Only applicable if the result is multivalued
40-
* (i.e. array or \ArrayAccess) or cannot be found
41-
* in the requested locale.
35+
* @param string[] $indices The indices to read from the bundle
36+
* @param string|null $locale The locale to read
37+
* @param bool $fallback Whether to merge the value with the value from
38+
* the fallback locale (e.g. "en" for "en_GB").
39+
* Only applicable if the result is multivalued
40+
* (i.e. array or \ArrayAccess) or cannot be found
41+
* in the requested locale.
4242
*
4343
* @return mixed returns an array or {@link \ArrayAccess} instance for
4444
* complex data and a scalar value for simple data

0 commit comments

Comments
 (0)