Skip to content

Commit 7b176f3

Browse files
Fix
1 parent b4d3410 commit 7b176f3

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/Php/PhpVersion.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,4 @@ public function substrReturnFalseInsteadOfEmptyString(): bool
353353
return $this->versionId < 80000;
354354
}
355355

356-
public function getenvAcceptsNull(): bool
357-
{
358-
return $this->versionId >= 80000;
359-
}
360-
361356
}

tests/PHPStan/Analyser/nsrt/getenv-php74.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
<?php // lint <= 7.4
1+
<?php // lint < 8.0
22

33
namespace GetenvPHP74;
44

55
use function PHPStan\Testing\assertType;
66

77
class Foo
88
{
9-
10-
public function test(string|null $stringOrNull, mixed $mixed)
9+
/**
10+
* @param string|null $stringOrNull
11+
* @param mixed $mixed
12+
*/
13+
public function test($stringOrNull, $mixed)
1114
{
1215
assertType('string|false', getenv(null));
1316
assertType('array<string, string>', getenv());

tests/PHPStan/Analyser/nsrt/getenv-php80.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 80
1+
<?php // lint >= 8.0
22

33
namespace GetenvPHP80;
44

0 commit comments

Comments
 (0)