Skip to content

Commit 7d4b42c

Browse files
committed
minor #46573 Precise array Phpdoc for Request (VincentLanglet)
This PR was squashed before being merged into the 6.2 branch. Discussion ---------- Precise array Phpdoc for Request | Q | A | ------------- | --- | Branch? | 6.2 for phpdoc | 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 exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Commits ------- 7ea06b0 Precise array Phpdoc for Request
2 parents 013857a + 7ea06b0 commit 7d4b42c

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,22 @@ class Request
134134
protected $content;
135135

136136
/**
137-
* @var array
137+
* @var string[]
138138
*/
139139
protected $languages;
140140

141141
/**
142-
* @var array
142+
* @var string[]
143143
*/
144144
protected $charsets;
145145

146146
/**
147-
* @var array
147+
* @var string[]
148148
*/
149149
protected $encodings;
150150

151151
/**
152-
* @var array
152+
* @var string[]
153153
*/
154154
protected $acceptableContentTypes;
155155

@@ -199,7 +199,7 @@ class Request
199199
protected $defaultLocale = 'en';
200200

201201
/**
202-
* @var array
202+
* @var array<string, string[]>
203203
*/
204204
protected static $formats;
205205

@@ -578,6 +578,8 @@ public static function setTrustedProxies(array $proxies, int $trustedHeaderSet)
578578

579579
/**
580580
* Gets the list of trusted proxies.
581+
*
582+
* @return string[]
581583
*/
582584
public static function getTrustedProxies(): array
583585
{
@@ -612,6 +614,8 @@ public static function setTrustedHosts(array $hostPatterns)
612614

613615
/**
614616
* Gets the list of trusted host patterns.
617+
*
618+
* @return string[]
615619
*/
616620
public static function getTrustedHosts(): array
617621
{
@@ -1246,6 +1250,8 @@ public function getMimeType(string $format): ?string
12461250

12471251
/**
12481252
* Gets the mime types associated with the format.
1253+
*
1254+
* @return string[]
12491255
*/
12501256
public static function getMimeTypes(string $format): array
12511257
{
@@ -1285,7 +1291,7 @@ public function getFormat(?string $mimeType): ?string
12851291
/**
12861292
* Associates a format with mime types.
12871293
*
1288-
* @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
1294+
* @param string|string[] $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
12891295
*/
12901296
public function setFormat(?string $format, string|array $mimeTypes)
12911297
{
@@ -1568,6 +1574,8 @@ public function getPreferredLanguage(array $locales = null): ?string
15681574

15691575
/**
15701576
* Gets a list of languages acceptable by the client browser ordered in the user browser preferences.
1577+
*
1578+
* @return string[]
15711579
*/
15721580
public function getLanguages(): array
15731581
{
@@ -1606,6 +1614,8 @@ public function getLanguages(): array
16061614

16071615
/**
16081616
* Gets a list of charsets acceptable by the client browser in preferable order.
1617+
*
1618+
* @return string[]
16091619
*/
16101620
public function getCharsets(): array
16111621
{
@@ -1618,6 +1628,8 @@ public function getCharsets(): array
16181628

16191629
/**
16201630
* Gets a list of encodings acceptable by the client browser in preferable order.
1631+
*
1632+
* @return string[]
16211633
*/
16221634
public function getEncodings(): array
16231635
{
@@ -1630,6 +1642,8 @@ public function getEncodings(): array
16301642

16311643
/**
16321644
* Gets a list of content types acceptable by the client browser in preferable order.
1645+
*
1646+
* @return string[]
16331647
*/
16341648
public function getAcceptableContentTypes(): array
16351649
{

0 commit comments

Comments
 (0)