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 4c15c77 commit 05b8012
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ private static function buildExampleParamsTable(array $array):string
}
$root->appendChild($header);

$builder = function (Param $item, $subCount = 0,ParamFrom $parentFrom = null)use($dom,$root,&$builder){
$builder = function (Param $item, $subCount = 0,ParamFrom|array $parentFrom = null)use($dom,$root,&$builder){
if($parentFrom && ($parentFrom != $item->from)){
throw new Annotation("param name: {$item->name} 'from' attribute is different with parent 'from' attribute : {$parentFrom->toString()}");
}
Expand Down Expand Up @@ -585,7 +585,7 @@ private static function buildRequestParamsTable(array $array):string
{
//用模板构建是因为可能存在一些html 实体,不希望被转化

$builder = function (Param $item, $subCount = 0,ParamFrom $parentFrom = null)use(&$builder){
$builder = function (Param $item, $subCount = 0,ParamFrom|array $parentFrom = null)use(&$builder){
if($parentFrom && ($parentFrom != $item->from)){
throw new Annotation("param name: {$item->name} 'from' attribute is different with parent 'from' attribute : {$parentFrom->toString()}");
}
Expand Down

0 comments on commit 05b8012

Please sign in to comment.