Skip to content

Commit

Permalink
Make $http_response_header a non-empty-list
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffycondor committed Dec 24, 2022
1 parent a76a1d1 commit 87012cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -612,7 +612,7 @@ private static function getGlobalTypeInner(string $var_id, bool $files_full_path
}

if ($var_id === '$http_response_header') {
return Type::getList(Type::getNonEmptyString());
return Type::getNonEmptyList(Type::getNonEmptyString());
}

if ($var_id === '$GLOBALS') {
Expand Down
2 changes: 1 addition & 1 deletion tests/SuperGlobalsTest.php
Expand Up @@ -12,7 +12,7 @@ public function providerValidCodeParse(): iterable
{
yield 'http_response_headerIsList' => [
'code' => '<?php
/** @return list<string> */
/** @return non-empty-list<non-empty-string> */
function returnsList(): array {
return $http_response_header;
}
Expand Down

0 comments on commit 87012cc

Please sign in to comment.