name(); if (!$root->hasMethod($name)) { return 0; } $method = $root->getMethod($name); $attributes = $method->getAttributes(Retry::class); $attribute = $attributes[0] ?? null; $args = $attribute?->getArguments(); $retries = $args['count'] ?? $args[0] ?? 0; return \max(0, $retries); } }