From fae8c48fa7b3f1da5843f1fddc669bc14f5b289e Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 27 Jul 2021 03:36:21 +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 81153c48..9e9aed3c 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -171,7 +171,7 @@ class Loader extends BaseObject * @param string|array $outPath * @throws Exception */ - public function loadByDirectory(string $path, string|array $outPath = '') + public function loadByDirectory(string $path) { try { $path = '/' . trim($path, '/'); @@ -179,10 +179,9 @@ class Loader extends BaseObject $paths = []; foreach (static::$_directory as $key => $_path) { $key = '/' . trim($key, '/'); - if (!str_starts_with($key, $path) || in_array($key, $outPath)) { + if (!str_starts_with($key, $path)) { continue; } - foreach ($_path as $item) { $paths[] = $item; }