Add weak generics for array type objects (#1621)

This commit is contained in:
Lau Ernebjerg Josefsen
2024-12-29 11:52:05 +01:00
committed by GitHub
parent 347483be03
commit 4ad74ba241
3 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -426,7 +426,7 @@ class ModelsCommand extends Command
break;
case 'array':
case 'json':
$realType = 'array';
$realType = 'array<array-key, mixed>';
break;
case 'object':
$realType = 'object';
@@ -450,10 +450,10 @@ class ModelsCommand extends Command
$realType = '\Carbon\CarbonImmutable';
break;
case 'collection':
$realType = '\Illuminate\Support\Collection';
$realType = '\Illuminate\Support\Collection<array-key, mixed>';
break;
case AsArrayObject::class:
$realType = '\ArrayObject';
$realType = '\ArrayObject<array-key, mixed>';
break;
default:
// In case of an optional custom cast parameter , only evaluate