From 0f885f8f26eef1993275c488a0e885f7c42e2739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 20 Apr 2021 10:35:57 +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/Loader.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index c2f01408..2be8ee63 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -272,23 +272,23 @@ class Loader extends BaseObject public function appendFileToDirectory(string $filePath, string $className) { $array = explode('/', $filePath); - array_pop($array); + unset($array[count($array) - 1]); $array = '/' . trim(implode('/', $array), '/'); $this->_directory[$array][] = $className; - $directory = $this->splitDirectory($filePath); - array_pop($directory); - - $tree = null; - foreach ($directory as $value) { - $tree = $this->getTree($tree, $value); - } - - if ($tree instanceof FileTree) { - $tree->addFile($className, $filePath); - } +// $directory = $this->splitDirectory($filePath); +// array_pop($directory); +// +// $tree = null; +// foreach ($directory as $value) { +// $tree = $this->getTree($tree, $value); +// } +// +// if ($tree instanceof FileTree) { +// $tree->addFile($className, $filePath); +// } }