Skip to content

Commit cd75615

Browse files
committed
minor #49432 Fix phpdocs in HttpClient, HttpFoundation, HttpKernel, Intl components (alamirault)
This PR was merged into the 5.4 branch. Discussion ---------- Fix phpdocs in HttpClient, HttpFoundation, HttpKernel, Intl components | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Fix phpdocs in HttpClient, HttpFoundation, HttpKernel, Intl components Commits ------- d4ff65e Fix phpdocs in HttpClient, HttpFoundation, HttpKernel, Intl components
2 parents 29f46fc + d4ff65e commit cd75615

File tree

14 files changed

+73
-73
lines changed

14 files changed

+73
-73
lines changed

src/Symfony/Component/HttpClient/AmpHttpClient.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ final class AmpHttpClient implements HttpClientInterface, LoggerAwareInterface,
5454
private $multi;
5555

5656
/**
57-
* @param array $defaultOptions Default requests' options
58-
* @param callable $clientConfigurator A callable that builds a {@see DelegateHttpClient} from a {@see PooledHttpClient};
59-
* passing null builds an {@see InterceptedHttpClient} with 2 retries on failures
60-
* @param int $maxHostConnections The maximum number of connections to a single host
61-
* @param int $maxPendingPushes The maximum number of pushed responses to accept in the queue
57+
* @param array $defaultOptions Default requests' options
58+
* @param callable|null $clientConfigurator A callable that builds a {@see DelegateHttpClient} from a {@see PooledHttpClient};
59+
* passing null builds an {@see InterceptedHttpClient} with 2 retries on failures
60+
* @param int $maxHostConnections The maximum number of connections to a single host
61+
* @param int $maxPendingPushes The maximum number of pushed responses to accept in the queue
6262
*
6363
* @see HttpClientInterface::OPTIONS_DEFAULTS for available options
6464
*/

src/Symfony/Component/HttpFoundation/Cookie.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function create(string $name, string $value = null, $expire = 0, ?
8080
* @param string $name The name of the cookie
8181
* @param string|null $value The value of the cookie
8282
* @param int|string|\DateTimeInterface $expire The time the cookie expires
83-
* @param string $path The path on the server in which the cookie will be available on
83+
* @param string|null $path The path on the server in which the cookie will be available on
8484
* @param string|null $domain The domain that the cookie is available to
8585
* @param bool|null $secure Whether the client should send back the cookie only over HTTPS or null to auto-enable this when the request is already using HTTPS
8686
* @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,12 @@ public static function setFactory(?callable $callable)
439439
/**
440440
* Clones a request and overrides some of its parameters.
441441
*
442-
* @param array $query The GET parameters
443-
* @param array $request The POST parameters
444-
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
445-
* @param array $cookies The COOKIE parameters
446-
* @param array $files The FILES parameters
447-
* @param array $server The SERVER parameters
442+
* @param array|null $query The GET parameters
443+
* @param array|null $request The POST parameters
444+
* @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
445+
* @param array|null $cookies The COOKIE parameters
446+
* @param array|null $files The FILES parameters
447+
* @param array|null $server The SERVER parameters
448448
*
449449
* @return static
450450
*/

src/Symfony/Component/HttpFoundation/Session/SessionInterface.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public function setName(string $name);
5959
* Clears all session attributes and flashes and regenerates the
6060
* session and deletes the old session from persistence.
6161
*
62-
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
63-
* will leave the system settings unchanged, 0 sets the cookie
64-
* to expire with browser session. Time is in seconds, and is
65-
* not a Unix timestamp.
62+
* @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value
63+
* will leave the system settings unchanged, 0 sets the cookie
64+
* to expire with browser session. Time is in seconds, and is
65+
* not a Unix timestamp.
6666
*
6767
* @return bool
6868
*/
@@ -72,11 +72,11 @@ public function invalidate(int $lifetime = null);
7272
* Migrates the current session to a new session id while maintaining all
7373
* session attributes.
7474
*
75-
* @param bool $destroy Whether to delete the old session or leave it to garbage collection
76-
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
77-
* will leave the system settings unchanged, 0 sets the cookie
78-
* to expire with browser session. Time is in seconds, and is
79-
* not a Unix timestamp.
75+
* @param bool $destroy Whether to delete the old session or leave it to garbage collection
76+
* @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value
77+
* will leave the system settings unchanged, 0 sets the cookie
78+
* to expire with browser session. Time is in seconds, and is
79+
* not a Unix timestamp.
8080
*
8181
* @return bool
8282
*/

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
class NativeFileSessionHandler extends \SessionHandler
2020
{
2121
/**
22-
* @param string $savePath Path of directory to save session files
23-
* Default null will leave setting as defined by PHP.
24-
* '/path', 'N;/path', or 'N;octal-mode;/path
22+
* @param string|null $savePath Path of directory to save session files
23+
* Default null will leave setting as defined by PHP.
24+
* '/path', 'N;/path', or 'N;octal-mode;/path
2525
*
2626
* @see https://php.net/session.configuration#ini.session.save-path for further details.
2727
*

src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ public function getLifetime()
9595
/**
9696
* Stamps a new session's metadata.
9797
*
98-
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
99-
* will leave the system settings unchanged, 0 sets the cookie
100-
* to expire with browser session. Time is in seconds, and is
101-
* not a Unix timestamp.
98+
* @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value
99+
* will leave the system settings unchanged, 0 sets the cookie
100+
* to expire with browser session. Time is in seconds, and is
101+
* not a Unix timestamp.
102102
*/
103103
public function stampNew(int $lifetime = null)
104104
{

src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ public function setName(string $name);
8080
* Otherwise session data could get lost again for concurrent requests with the
8181
* new ID. One result could be that you get logged out after just logging in.
8282
*
83-
* @param bool $destroy Destroy session when regenerating?
84-
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
85-
* will leave the system settings unchanged, 0 sets the cookie
86-
* to expire with browser session. Time is in seconds, and is
87-
* not a Unix timestamp.
83+
* @param bool $destroy Destroy session when regenerating?
84+
* @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value
85+
* will leave the system settings unchanged, 0 sets the cookie
86+
* to expire with browser session. Time is in seconds, and is
87+
* not a Unix timestamp.
8888
*
8989
* @return bool
9090
*

src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
3030
private $charset;
3131

3232
/**
33-
* @param string $globalDefaultTemplate The global default content (it can be a template name or the content)
33+
* @param string|null $globalDefaultTemplate The global default content (it can be a template name or the content)
3434
*/
3535
public function __construct(Environment $twig = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8')
3636
{

src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public function needsParsing(Response $response);
5959
/**
6060
* Renders a Surrogate tag.
6161
*
62-
* @param string $alt An alternate URI
63-
* @param string $comment A comment to add as an esi:include tag
62+
* @param string|null $alt An alternate URI
63+
* @param string $comment A comment to add as an esi:include tag
6464
*
6565
* @return string
6666
*/

src/Symfony/Component/Intl/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
*/

src/Symfony/Component/Intl/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
*

src/Symfony/Component/Intl/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
*

src/Symfony/Component/Intl/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
*

src/Symfony/Component/Intl/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)