@@ -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