From abbf032483e8e04fd7e9e1ee6dff0e0841c2c9fe Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Tue, 1 Oct 2024 17:43:18 +0300 Subject: [PATCH] Remove unused argument --- Extractor/ApiDocExtractor.php | 3 +-- Extractor/Handler/PhpDocHandler.php | 2 +- Extractor/HandlerInterface.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Extractor/ApiDocExtractor.php b/Extractor/ApiDocExtractor.php index 7e76a58..5d59ecd 100644 --- a/Extractor/ApiDocExtractor.php +++ b/Extractor/ApiDocExtractor.php @@ -477,9 +477,8 @@ class ApiDocExtractor */ protected function parseAnnotations(ApiDoc $annotation, Route $route, \ReflectionMethod $method): void { - $annots = $this->reader->getMethodAnnotations($method); foreach ($this->handlers as $handler) { - $handler->handle($annotation, $annots, $route, $method); + $handler->handle($annotation, $route, $method); } } diff --git a/Extractor/Handler/PhpDocHandler.php b/Extractor/Handler/PhpDocHandler.php index e2d05cf..5e90c89 100644 --- a/Extractor/Handler/PhpDocHandler.php +++ b/Extractor/Handler/PhpDocHandler.php @@ -28,7 +28,7 @@ class PhpDocHandler implements HandlerInterface $this->commentExtractor = $commentExtractor; } - public function handle(ApiDoc $annotation, array $annotations, Route $route, \ReflectionMethod $method): void + public function handle(ApiDoc $annotation, Route $route, \ReflectionMethod $method): void { // description if (null === $annotation->getDescription()) { diff --git a/Extractor/HandlerInterface.php b/Extractor/HandlerInterface.php index d3bebcb..3605e8c 100644 --- a/Extractor/HandlerInterface.php +++ b/Extractor/HandlerInterface.php @@ -19,5 +19,5 @@ interface HandlerInterface /** * Parse route parameters in order to populate ApiDoc. */ - public function handle(ApiDoc $annotation, array $annotations, Route $route, \ReflectionMethod $method); + public function handle(ApiDoc $annotation, Route $route, \ReflectionMethod $method); }