From 1f68570bf1227111b7619511cf20402538689988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 15:44:21 +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/Annotation.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index d09d4ea1..580e5de0 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -86,9 +86,11 @@ class Annotation extends Component */ public function runtime(string $dir, string|array $outPath = '') { -// if (!empty($outPath) && !is_array($outPath)) { -// $outPath = [$outPath]; -// } + if (empty($outPath)) { + $outPath = []; + } else if (is_string($outPath)) { + $outPath = [$outPath]; + } $this->_loader->loadByDirectory($dir, $outPath); }