From e08d45368965a66e566bab3b011779a57ba84489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IT=E5=B0=8F=E5=BC=BAxqitw=2Ecn?= <360237521@qq.com> Date: Wed, 6 Jun 2018 09:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/ParseComment.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ParseComment.php b/src/lib/ParseComment.php index 92e44c7..643a3d4 100644 --- a/src/lib/ParseComment.php +++ b/src/lib/ParseComment.php @@ -22,7 +22,7 @@ class ParseComment /** * @var array - 注释解析后的数组 */ - protected $commentParams = []; + private $commentParams = []; /** * 将注释按行解析并以数组格式返回 @@ -56,7 +56,7 @@ class ParseComment } $_type = $_parse['type']; $_content = isset($_parse['content']) ? $_parse['content'] : ''; - if ($_type === 'param') { + if (in_array($_type, ['param', 'code', 'return'])) { if (!isset($this->commentParams[$_type])) { $this->commentParams[$_type] = []; } @@ -78,7 +78,7 @@ class ParseComment $line = explode(' ', $line); $line[0] = substr($line[0], 1); $class = new ParseLine(); - $action = 'parseLine' . $class->underlineToHump($line[0]); + $action = 'parseLine' . Tools::underlineToHump($line[0]); if (!method_exists($class, $action)) { $action = 'parseLineTitle'; }