Skip to content

Commit

Permalink
ParamFrom支持来自多来源
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Feb 1, 2023
1 parent 05b8012 commit e4cc1c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ static function scanToMarkdown(string $controllerPath, string $controllerNameSpa
foreach ($apiTag->allowMethod as $allowMethodItem) {
$allMethodStr .= "{$allowMethodItem->toString()},";
}
$allMethodStr = rtrim($allMethodStr,',');
}
$finalDoc .= "**Allow Method:** {$allMethodStr}";
$finalDoc = self::buildLine($finalDoc);
Expand Down Expand Up @@ -404,11 +405,9 @@ private static function scanAllController(string $controllerPath,bool $save2Cach
if (is_file($controllerPath)) {
$files[] = $controllerPath;
} else {
$files = File::scanDirectory($controllerPath);
if(isset($files['files'])){
$files = $files['files'];
}else{
return $list;
$temp = File::scanDirectory($controllerPath);
if(isset($temp['files'])){
$files = $temp['files'];
}
}

Expand Down Expand Up @@ -600,6 +599,7 @@ private static function buildRequestParamsTable(array $array):string
foreach ($item->from as $fromItem) {
$fromStr .= "{$fromItem->toString()},";
}
$fromStr = rtrim($fromStr,',');
}


Expand Down

0 comments on commit e4cc1c1

Please sign in to comment.