From 6b2a71c6af9257633cfc2c320c9cb4aaa622e0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 25 Apr 2023 16:09:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scanner.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Scanner.php b/Scanner.php index 781e330..efa4011 100644 --- a/Scanner.php +++ b/Scanner.php @@ -44,11 +44,13 @@ class Scanner extends Component continue; } $reflect = $container->getReflectionClass($class); - $data = $reflect->getAttributes(Skip::class); - if (count($data) > 0) { - continue; + if ($reflect->isInstantiable()) { + $data = $reflect->getAttributes(Skip::class); + if (count($data) > 0) { + continue; + } + $container->parse($class); } - $container->parse($class); } }