From 2fc38203540a4ab2f6d67ce2ab07e26d511e7bdf Mon Sep 17 00:00:00 2001 From: Roman Lytvynenko Date: Thu, 17 Oct 2024 10:43:35 +0300 Subject: [PATCH] marked method calls --- .../RulesExtractor/RequestMethodCallsExtractor.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Support/OperationExtensions/RulesExtractor/RequestMethodCallsExtractor.php b/src/Support/OperationExtensions/RulesExtractor/RequestMethodCallsExtractor.php index 8f00ae88..db8d3544 100644 --- a/src/Support/OperationExtensions/RulesExtractor/RequestMethodCallsExtractor.php +++ b/src/Support/OperationExtensions/RulesExtractor/RequestMethodCallsExtractor.php @@ -2,6 +2,7 @@ namespace Dedoc\Scramble\Support\OperationExtensions\RulesExtractor; +use Dedoc\Scramble\Support\Generator\Parameter; use Dedoc\Scramble\Support\RouteInfo; class RequestMethodCallsExtractor implements RulesExtractor @@ -14,7 +15,13 @@ public function shouldHandle(): bool public function extract(RouteInfo $routeInfo): ParametersExtractionResult { return new ParametersExtractionResult( - parameters: array_values($routeInfo->requestParametersFromCalls->data), + parameters: array_map( + function (Parameter $p) { + $p->setAttribute('isFromMethodCall', true); + return $p; + }, + array_values($routeInfo->requestParametersFromCalls->data), + ), ); } }