From a6e5d0344152589a20067f84c1347c2c2507b867 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 8 Apr 2021 02:26:44 +0800 Subject: [PATCH] modify --- Annotation/Loader.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index 796bf7d6..1ab7c0e6 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -238,7 +238,6 @@ class Loader extends BaseObject } - /** * @param string $filePath * @param string $className @@ -353,11 +352,11 @@ class Loader extends BaseObject return; } foreach ($classes as $className) { - if (!isset($this->_classes[$className])) { + $annotations = $this->_classes[$className] ?? null; + if ($annotations === null) { continue; } - $annotations = $this->_classes[$className]; if (isset($annotations['target']) && !empty($annotations['target'])) { foreach ($annotations['target'] as $value) { $value->execute([$annotations['handler']]);