From e7e951ab39f94c111bc74f697e25ee9eebae84c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sun, 27 Feb 2022 18:56:44 +0800 Subject: [PATCH] modify plugin name --- Target.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Target.php b/Target.php index 548fdee..f58833c 100644 --- a/Target.php +++ b/Target.php @@ -88,6 +88,7 @@ class Target * @param string $method * @param string $annotation * @return mixed + * @throws ReflectionException */ public function getSpecify_annotation(string $method, string $annotation): mixed { @@ -100,15 +101,16 @@ class Target /** - * @return array + * @return array + * @throws ReflectionException */ #[Pure] public function getMethodsAttribute(): array { $methods = $this->target->getMethods(); $array = []; - foreach ($methods as $key => $method) { - $array[$key] = $this->getMethodAttribute($method); + foreach ($methods as $method) { + $array[$method->getName()] = $this->getMethodAttribute($method->getName()); } return $array; }