Skip to content

Commit

Permalink
Update ResponseFilter.php
Browse files Browse the repository at this point in the history
  • Loading branch information
netyum authored Feb 6, 2023
1 parent 0e7f846 commit a4c162c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Util/ResponseFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ public static function filterData($data, $mapData, $type)
}
return $newData;
}
if (array_key_exists($key, $data)) {
$newData[$key] = self::processVarType($value['type'], $data[$key], $value['example']);
if (array_key_exists('children', $value)) {
$newData[$key] = self::filterData($newData[$key], $value['children'], $value['type']);
if (is_array($data)) {
if (array_key_exists($key, $data)) {
$newData[$key] = self::processVarType($value['type'], $data[$key], $value['example']);
if (array_key_exists('children', $value)) {
$newData[$key] = self::filterData($newData[$key], $value['children'], $value['type']);
}
}
}
}
Expand Down

0 comments on commit a4c162c

Please sign in to comment.