Merge pull request #1 from itxq/v1.1.x-dev

细节优化
This commit is contained in:
IT小强xqitw.cn 2018-06-24 12:20:25 +08:00 committed by GitHub
commit 79ac71cf09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -16,7 +16,7 @@
### 扩展安装:
+ 方法一composer命令 `composer require itxq/wechat-sdk-php`
+ 方法一composer命令 `composer require itxq/api-doc-php`
+ 方法二:直接下载压缩包,然后进入项目中执行 composer命令 `composer update` 来生成自动加载文件

View File

@ -25,7 +25,7 @@ class ParseLine
* @return array
*/
public function parseLineTitle($line) {
return ['type' => $line[0], 'content' => $line[1]];
return ['type' => isset($line[0]) ? $line[0] : '', 'content' => isset($line[1]) ? $line[1] : ''];
}
/**
@ -35,12 +35,12 @@ class ParseLine
*/
public function parseLineParam($line) {
return [
'type' => $line[0],
'param_type' => $line[1],
'param_name' => $line[2],
'param_title' => $line[3],
'param_default' => $line[4],
'param_require' => $line[5],
'type' => isset($line[0]) ? $line[0] : '',
'param_type' => isset($line[1]) ? $line[1] : '',
'param_name' => isset($line[2]) ? $line[2] : '',
'param_title' => isset($line[3]) ? $line[3] : '',
'param_default' => isset($line[4]) ? $line[4] : '',
'param_require' => isset($line[5]) ? $line[5] : '',
];
}
@ -51,8 +51,8 @@ class ParseLine
*/
public function parseLineCode($line) {
return [
'type' => $line[0],
'code' => $line[1],
'type' => isset($line[0]) ? $line[0] : '',
'code' => isset($line[1]) ? $line[1] : '',
'content' => isset($line[2]) ? $line[2] : '',
];
}
@ -64,9 +64,9 @@ class ParseLine
*/
public function parseLineReturn($line) {
return [
'type' => $line[0],
'return_type' => $line[1],
'return_name' => $line[2],
'type' => isset($line[0]) ? $line[0] : '',
'return_type' => isset($line[1]) ? $line[1] : '',
'return_name' => isset($line[2]) ? $line[2] : '',
'return_title' => isset($line[3]) ? $line[3] : '',
];
}