From 243cb517fc910007eec14f70a97541d302fa64c4 Mon Sep 17 00:00:00 2001 From: Dust Date: Sun, 11 Feb 2018 02:28:48 +0800 Subject: [PATCH] 1.6 --- README.md | 2 +- extend/mumbaicat/makeapidoc/ApiDoc.php | 1 + src/ApiDoc.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b90f7c..3b6480a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# php注释自动生成api文档 v1.5 +# php注释自动生成api文档 v1.6 作者: [Dust](http://dust101.lofter.com) ---- ``` diff --git a/extend/mumbaicat/makeapidoc/ApiDoc.php b/extend/mumbaicat/makeapidoc/ApiDoc.php index 862a102..bd56c81 100644 --- a/extend/mumbaicat/makeapidoc/ApiDoc.php +++ b/extend/mumbaicat/makeapidoc/ApiDoc.php @@ -159,6 +159,7 @@ private function parse($data,$fileName) } } preg_match_all('/\s+\*\s+@return\s+(.*?)\s+(.*?)\s+(.*?)\s/', $data, $matches); + $return['return'] = []; if(empty($matches[1])){ $return['return'] = []; }else{ diff --git a/src/ApiDoc.php b/src/ApiDoc.php index 862a102..bd56c81 100644 --- a/src/ApiDoc.php +++ b/src/ApiDoc.php @@ -159,6 +159,7 @@ private function parse($data,$fileName) } } preg_match_all('/\s+\*\s+@return\s+(.*?)\s+(.*?)\s+(.*?)\s/', $data, $matches); + $return['return'] = []; if(empty($matches[1])){ $return['return'] = []; }else{