src/Reflector/FunctionReflector.php
public function reflect(string $functionName) : Reflection
    {
        $identifier = new Identifier($functionName, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION));

        /** @var ReflectionFunction|null $functionInfo */
        $functionInfo = $this->sourceLocator->locateIdentifier($this->classReflector, $identifier);

        if ($functionInfo === null) {
            throw Exception\IdentifierNotFound::fromIdentifier($identifier);
        }

        return $functionInfo;
    }
public function reflect(string $functionName) : Reflection
    {
        $identifier = new Identifier($functionName, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION));

        /** @var ReflectionFunction|null $functionInfo */
        $functionInfo = $this->sourceLocator->locateIdentifier($this->classReflector, $identifier);

        if ($functionInfo === null) {
            throw Exception\IdentifierNotFound::fromIdentifier($identifier);
        }

        return $functionInfo;
    }
Create a ReflectionFunction for the specified $functionName.

@return ReflectionFunction

@throws IdentifierNotFound