Skip to content

Commit 849a414

Browse files
committed
- removes the obsolete typecast
1 parent ce22a79 commit 849a414

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

HeaderTrait.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ public function getHeaders(): array
3131
return $this->headers;
3232
}
3333

34+
/**
35+
* @param string $name
36+
*
37+
* @return array<int, string>
38+
*/
3439
public function getHeader($name): array
3540
{
3641
if (false === isset($this->headersMap[$name = \strtolower($name)])) {
@@ -41,7 +46,7 @@ public function getHeader($name): array
4146
return empty($value) ? [] : [$value];
4247
}
4348
$header = [];
44-
foreach ($value as $_ => $v) {
49+
foreach ($value as $v) {
4550
$header[] = \join(',', (array)$v);
4651
}
4752
return $header;
@@ -121,7 +126,7 @@ public function replaceHeaders(array $headers): static
121126
* Transforms the nested headers as a flatten array.
122127
* This method is not part of the PSR-7.
123128
*
124-
* @return array
129+
* @return array<int, string>
125130
*/
126131
public function getFlattenedHeaders(): array
127132
{

0 commit comments

Comments
 (0)