private function getMethodIdentifier(\ReflectionMethod $method): ?string
    {
        if (!$method->isPublic() || $method->isStatic()) {
            return null;
        }

        if (preg_match('/^__[^_]/', $method->getName())) {
            return null;
        }

        $type = $method->getReturnType();

        if (!$type instanceof \ReflectionType || $type->isBuiltin()) {
            return null;
        }

        return $type->getName();
    }