private function locateFunctionByName(string $functionName) : ?string
    {
        if (! function_exists($functionName)) {
            return null;
        }

        $reflection         = new ReflectionFunction($functionName);
        $reflectionFileName = $reflection->getFileName();

        if (! is_string($reflectionFileName)) {
            return null;
        }

        return $reflectionFileName;
    }
private function locateFunctionByName(string $functionName) : ?string
    {
        if (! function_exists($functionName)) {
            return null;
        }

        $reflection         = new ReflectionFunction($functionName);
        $reflectionFileName = $reflection->getFileName();

        if (! is_string($reflectionFileName)) {
            return null;
        }

        return $reflectionFileName;
    }
private function locateFunctionByName ( string $ functionName ) : ? string { if ( ! function_exists ( $ functionName ) ) { return null ; } $ reflection = new ReflectionFunction ( $ functionName ) ; $ reflectionFileName = $ reflection -> getFileName ( ) ; if ( ! is_string ( $ reflectionFileName ) ) { return null ; } return $ reflectionFileName ; }
We can only load functions if they already exist, because PHP does not
have function autoloading. Therefore if it exists, we simply use the
internal reflection API to find the filename. If it doesn't we can do
nothing so throw an exception.

@throws ReflectionException
We can only load functions if they already exist because PHP does not have function autoloading . Therefore if it exists we simply use the internal reflection API to find the filename . If it doesn t we can do nothing so throw an exception .