Skip to content

Commit

Permalink
marked method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko committed Oct 17, 2024
1 parent 9193ff1 commit 2fc3820
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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),
),
);
}
}

0 comments on commit 2fc3820

Please sign in to comment.