Skip to content

Commit

Permalink
Try to fix PHPStan... again
Browse files Browse the repository at this point in the history
  • Loading branch information
bcobzh committed Sep 5, 2019
1 parent 3b05826 commit 384b74c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Bridge/Symfony/Bundle/Test/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,12 @@ public function request(string $method, string $url, array $options = []): Respo
[$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions);
$resolvedUrl = implode('', $url);

/** @var array<string, string[]> $headers */
$headers = self::extractHeaders($options);

$server = [];
// Convert headers to a $_SERVER-like array
foreach (self::extractHeaders($options) as $key => $value) {
foreach ($headers as $key => $value) {
if ('content-type' === $key) {
$server['CONTENT_TYPE'] = $value[0] ?? '';

Expand Down Expand Up @@ -222,7 +225,6 @@ private static function extractHeaders(array $options): array
return $options['headers'];
}

/** @var array<string, string[]> $headers */
$headers = [];

foreach ($options['normalized_headers'] as $key => $values) {
Expand Down

0 comments on commit 384b74c

Please sign in to comment.