diff --git a/src/Extracting/ParamHelpers.php b/src/Extracting/ParamHelpers.php index 8474149d..82f25213 100644 --- a/src/Extracting/ParamHelpers.php +++ b/src/Extracting/ParamHelpers.php @@ -180,7 +180,11 @@ protected function normalizeTypeName(?string $typeName, $value = null): string case 'bool': return str_replace($base, 'boolean', $typeName); case 'array': - return is_null($value) || array_keys($value)[0] === 0 ? 'array' : 'object'; + if (empty($value) || array_keys($value)[0] === 0) { + return $this->normalizeTypeName(gettype($value[0] ?? '')).'[]'; + } else { + return 'object'; + } default: return $typeName; }