Skip to content

Commit 7d85a3a

Browse files
committed
Fix
1 parent b5d418c commit 7d85a3a

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/Php/PhpVersion.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,6 @@ public function isCurloptUrlCheckingFileSchemeWithOpenBasedir(): bool
338338
return $this->versionId < 80000;
339339
}
340340

341-
public function hasExitAsFunction(): bool
342-
{
343-
return $this->versionId >= 80400;
344-
}
345-
346341
public function highlightStringDoesNotReturnFalse(): bool
347342
{
348343
return $this->versionId >= 80400;

src/Reflection/BetterReflection/BetterReflectionProvider.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,8 @@ public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAn
266266
return $this->functionReflections[$lowerCasedFunctionName];
267267
}
268268

269-
if ($this->phpVersion->hasExitAsFunction()) {
270-
if (in_array($lowerCasedFunctionName, ['exit', 'die'], true)) {
271-
return $this->functionReflections[$lowerCasedFunctionName] = new ExitFunctionReflection($lowerCasedFunctionName);
272-
}
269+
if (in_array($lowerCasedFunctionName, ['exit', 'die'], true)) {
270+
return $this->functionReflections[$lowerCasedFunctionName] = new ExitFunctionReflection($lowerCasedFunctionName);
273271
}
274272

275273
$nativeFunctionReflection = $this->nativeFunctionReflectionProvider->findFunctionReflection($lowerCasedFunctionName);
@@ -351,12 +349,11 @@ private function getCustomFunction(string $functionName): PhpFunctionReflection
351349

352350
public function resolveFunctionName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): ?string
353351
{
354-
if ($this->phpVersion->hasExitAsFunction()) {
355-
$name = $nameNode->toLowerString();
356-
if (in_array($name, ['exit', 'die'], true)) {
357-
return $name;
358-
}
352+
$name = $nameNode->toLowerString();
353+
if (in_array($name, ['exit', 'die'], true)) {
354+
return $name;
359355
}
356+
360357
return $this->resolveName($nameNode, function (string $name): bool {
361358
try {
362359
$this->reflector->reflectFunction($name);

0 commit comments

Comments
 (0)