mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
Add weak generics for array type objects (#1621)
This commit is contained in:
@@ -426,7 +426,7 @@ class ModelsCommand extends Command
|
|||||||
break;
|
break;
|
||||||
case 'array':
|
case 'array':
|
||||||
case 'json':
|
case 'json':
|
||||||
$realType = 'array';
|
$realType = 'array<array-key, mixed>';
|
||||||
break;
|
break;
|
||||||
case 'object':
|
case 'object':
|
||||||
$realType = 'object';
|
$realType = 'object';
|
||||||
@@ -450,10 +450,10 @@ class ModelsCommand extends Command
|
|||||||
$realType = '\Carbon\CarbonImmutable';
|
$realType = '\Carbon\CarbonImmutable';
|
||||||
break;
|
break;
|
||||||
case 'collection':
|
case 'collection':
|
||||||
$realType = '\Illuminate\Support\Collection';
|
$realType = '\Illuminate\Support\Collection<array-key, mixed>';
|
||||||
break;
|
break;
|
||||||
case AsArrayObject::class:
|
case AsArrayObject::class:
|
||||||
$realType = '\ArrayObject';
|
$realType = '\ArrayObject<array-key, mixed>';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// In case of an optional custom cast parameter , only evaluate
|
// In case of an optional custom cast parameter , only evaluate
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* @property \Carbon\CarbonImmutable $cast_to_immutable_datetime
|
* @property \Carbon\CarbonImmutable $cast_to_immutable_datetime
|
||||||
* @property int $cast_to_timestamp
|
* @property int $cast_to_timestamp
|
||||||
* @property mixed $cast_to_encrypted
|
* @property mixed $cast_to_encrypted
|
||||||
* @property array $cast_to_encrypted_array
|
* @property array<array-key, mixed> $cast_to_encrypted_array
|
||||||
* @property \Illuminate\Support\Collection $cast_to_encrypted_collection
|
* @property \Illuminate\Support\Collection<array-key, mixed> $cast_to_encrypted_collection
|
||||||
* @property array $cast_to_encrypted_json
|
* @property array<array-key, mixed> $cast_to_encrypted_json
|
||||||
* @property object $cast_to_encrypted_object
|
* @property object $cast_to_encrypted_object
|
||||||
* @property \Illuminate\Support\Collection $cast_to_as_collection
|
* @property \Illuminate\Support\Collection $cast_to_as_collection
|
||||||
* @property \Illuminate\Support\Collection $cast_to_as_enum_collection
|
* @property \Illuminate\Support\Collection $cast_to_as_enum_collection
|
||||||
* @property \ArrayObject $cast_to_as_array_object
|
* @property \ArrayObject<array-key, mixed> $cast_to_as_array_object
|
||||||
* @property AdvancedCastCollection $cast_to_as_collection_using
|
* @property AdvancedCastCollection $cast_to_as_collection_using
|
||||||
* @property \Illuminate\Support\Collection<int, AdvancedCastEnum> $cast_to_as_enum_collection_of
|
* @property \Illuminate\Support\Collection<int, AdvancedCastEnum> $cast_to_as_enum_collection_of
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|AdvancedCast newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|AdvancedCast newModelQuery()
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* @property bool $cast_to_bool
|
* @property bool $cast_to_bool
|
||||||
* @property bool $cast_to_boolean
|
* @property bool $cast_to_boolean
|
||||||
* @property object $cast_to_object
|
* @property object $cast_to_object
|
||||||
* @property array $cast_to_array
|
* @property array<array-key, mixed> $cast_to_array
|
||||||
* @property array $cast_to_json
|
* @property array<array-key, mixed> $cast_to_json
|
||||||
* @property \Illuminate\Support\Collection $cast_to_collection
|
* @property \Illuminate\Support\Collection<array-key, mixed> $cast_to_collection
|
||||||
* @property \Illuminate\Support\Carbon $cast_to_date
|
* @property \Illuminate\Support\Carbon $cast_to_date
|
||||||
* @property \Illuminate\Support\Carbon $cast_to_datetime
|
* @property \Illuminate\Support\Carbon $cast_to_datetime
|
||||||
* @property \Illuminate\Support\Carbon $cast_to_date_serialization
|
* @property \Illuminate\Support\Carbon $cast_to_date_serialization
|
||||||
@@ -34,9 +34,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* @property \Carbon\CarbonImmutable $cast_to_immutable_datetime_serialization
|
* @property \Carbon\CarbonImmutable $cast_to_immutable_datetime_serialization
|
||||||
* @property int $cast_to_timestamp
|
* @property int $cast_to_timestamp
|
||||||
* @property mixed $cast_to_encrypted
|
* @property mixed $cast_to_encrypted
|
||||||
* @property array $cast_to_encrypted_array
|
* @property array<array-key, mixed> $cast_to_encrypted_array
|
||||||
* @property \Illuminate\Support\Collection $cast_to_encrypted_collection
|
* @property \Illuminate\Support\Collection<array-key, mixed> $cast_to_encrypted_collection
|
||||||
* @property array $cast_to_encrypted_json
|
* @property array<array-key, mixed> $cast_to_encrypted_json
|
||||||
* @property object $cast_to_encrypted_object
|
* @property object $cast_to_encrypted_object
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|SimpleCast newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|SimpleCast newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|SimpleCast newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|SimpleCast newQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user