Skip to content

Commit 325abf4

Browse files
authored
more precise getenv() signature
1 parent f5bb0f6 commit 325abf4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

resources/functionMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,7 @@
33253325
'getcwd' => ['non-empty-string|false'],
33263326
'getdate' => ['array{seconds: int<0, 59>, minutes: int<0, 59>, hours: int<0, 23>, mday: int<1, 31>, wday: int<0, 6>, mon: int<1, 12>, year: int, yday: int<0, 365>, weekday: "Monday"|"Tuesday"|"Wednesday"|"Thursday"|"Friday"|"Saturday"|"Sunday", month: "January"|"February"|"March"|"April"|"May"|"June"|"July"|"August"|"September"|"October"|"November"|"December", 0: int}', 'timestamp='=>'int'],
33273327
'getenv' => ['string|false', 'varname'=>'string', 'local_only='=>'bool'],
3328-
'getenv\'1' => ['string[]'],
3328+
'getenv\'1' => ['array<string, string>'],
33293329
'gethostbyaddr' => ['string|false', 'ip_address'=>'string'],
33303330
'gethostbyname' => ['string', 'hostname'=>'string'],
33313331
'gethostbynamel' => ['array|false', 'hostname'=>'string'],

tests/PHPStan/Analyser/data/bug-4538.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class Foo
1212
public function bar(string $index): void
1313
{
1414
assertType('string|false', getenv($index));
15-
assertType('array<string>', getenv());
15+
assertType('array<string, string>', getenv());
1616
}
1717
}

0 commit comments

Comments
 (0)