@@ -266,10 +266,8 @@ public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAn
266
266
return $ this ->functionReflections [$ lowerCasedFunctionName ];
267
267
}
268
268
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 );
273
271
}
274
272
275
273
$ nativeFunctionReflection = $ this ->nativeFunctionReflectionProvider ->findFunctionReflection ($ lowerCasedFunctionName );
@@ -351,12 +349,11 @@ private function getCustomFunction(string $functionName): PhpFunctionReflection
351
349
352
350
public function resolveFunctionName (Node \Name $ nameNode , ?NamespaceAnswerer $ namespaceAnswerer ): ?string
353
351
{
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 ;
359
355
}
356
+
360
357
return $ this ->resolveName ($ nameNode , function (string $ name ): bool {
361
358
try {
362
359
$ this ->reflector ->reflectFunction ($ name );
0 commit comments