From e350746a19e7681a90d04d4b2f5487b905ecae02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Feb 2021 14:50:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Annotation/Route/Node.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Annotation/Route/Node.php b/Annotation/Route/Node.php index e2accecc..c661e526 100644 --- a/Annotation/Route/Node.php +++ b/Annotation/Route/Node.php @@ -23,23 +23,23 @@ trait Node */ public function reflectClass(array $classes): array { - $di = Snowflake::getDi(); - foreach ($classes as $class) { - $object = $di->get($class); + $array = []; + foreach ($classes as $class) { + $object = Snowflake::getDi()->get($class); if ($object instanceof Interceptor) { - $classes[] = [$object, 'Interceptor']; + $array[] = [$object, 'Interceptor']; } if ($object instanceof Limits) { - $classes[] = [$object, 'next']; + $array[] = [$object, 'next']; } if ($object instanceof After) { - $classes[] = [$object, 'onHandler']; + $array[] = [$object, 'onHandler']; } if ($object instanceof Middleware) { - $classes[] = [$object, 'onHandler']; + $array[] = [$object, 'onHandler']; } } - return $classes; + return $array; } }