@@ -50,28 +50,28 @@ trait HasAttributes
50
50
/**
51
51
* The model's attributes.
52
52
*
53
- * @var array
53
+ * @var array<string, mixed>
54
54
*/
55
55
protected $ attributes = [];
56
56
57
57
/**
58
58
* The model attribute's original state.
59
59
*
60
- * @var array
60
+ * @var array<string, mixed>
61
61
*/
62
62
protected $ original = [];
63
63
64
64
/**
65
65
* The changed model attributes.
66
66
*
67
- * @var array
67
+ * @var array<string, mixed>
68
68
*/
69
69
protected $ changes = [];
70
70
71
71
/**
72
72
* The previous state of the changed model attributes.
73
73
*
74
- * @var array
74
+ * @var array<string, mixed>
75
75
*/
76
76
protected $ previous = [];
77
77
@@ -209,7 +209,7 @@ protected function initializeHasAttributes()
209
209
/**
210
210
* Convert the model's attributes to an array.
211
211
*
212
- * @return array
212
+ * @return array<string, mixed>
213
213
*/
214
214
public function attributesToArray ()
215
215
{
@@ -244,8 +244,8 @@ public function attributesToArray()
244
244
/**
245
245
* Add the date attributes to the attributes array.
246
246
*
247
- * @param array $attributes
248
- * @return array
247
+ * @param array<string, mixed> $attributes
248
+ * @return array<string, mixed>
249
249
*/
250
250
protected function addDateAttributesToArray (array $ attributes )
251
251
{
@@ -265,9 +265,9 @@ protected function addDateAttributesToArray(array $attributes)
265
265
/**
266
266
* Add the mutated attributes to the attributes array.
267
267
*
268
- * @param array $attributes
269
- * @param array $mutatedAttributes
270
- * @return array
268
+ * @param array<string, mixed> $attributes
269
+ * @param array<string, mixed> $mutatedAttributes
270
+ * @return array<string, mixed>
271
271
*/
272
272
protected function addMutatedAttributesToArray (array $ attributes , array $ mutatedAttributes )
273
273
{
@@ -293,9 +293,9 @@ protected function addMutatedAttributesToArray(array $attributes, array $mutated
293
293
/**
294
294
* Add the casted attributes to the attributes array.
295
295
*
296
- * @param array $attributes
297
- * @param array $mutatedAttributes
298
- * @return array
296
+ * @param array<string, mixed> $attributes
297
+ * @param array<string, mixed> $mutatedAttributes
298
+ * @return array<string, mixed>
299
299
*/
300
300
protected function addCastAttributesToArray (array $ attributes , array $ mutatedAttributes )
301
301
{
@@ -348,7 +348,7 @@ protected function addCastAttributesToArray(array $attributes, array $mutatedAtt
348
348
/**
349
349
* Get an attribute array of all arrayable attributes.
350
350
*
351
- * @return array
351
+ * @return array<string, mixed>
352
352
*/
353
353
protected function getArrayableAttributes ()
354
354
{
@@ -2032,8 +2032,8 @@ public function getRawOriginal($key = null, $default = null)
2032
2032
/**
2033
2033
* Get a subset of the model's attributes.
2034
2034
*
2035
- * @param array|mixed $attributes
2036
- * @return array
2035
+ * @param array<string> |mixed $attributes
2036
+ * @return array<string, mixed>
2037
2037
*/
2038
2038
public function only ($ attributes )
2039
2039
{
@@ -2049,7 +2049,7 @@ public function only($attributes)
2049
2049
/**
2050
2050
* Get all attributes except the given ones.
2051
2051
*
2052
- * @param array|mixed $attributes
2052
+ * @param array<string> |mixed $attributes
2053
2053
* @return array
2054
2054
*/
2055
2055
public function except ($ attributes )
@@ -2093,7 +2093,7 @@ public function syncOriginalAttribute($attribute)
2093
2093
/**
2094
2094
* Sync multiple original attribute with their current values.
2095
2095
*
2096
- * @param array|string $attributes
2096
+ * @param array<string> |string $attributes
2097
2097
* @return $this
2098
2098
*/
2099
2099
public function syncOriginalAttributes ($ attributes )
@@ -2125,7 +2125,7 @@ public function syncChanges()
2125
2125
/**
2126
2126
* Determine if the model or any of the given attribute(s) have been modified.
2127
2127
*
2128
- * @param array|string|null $attributes
2128
+ * @param array<string> |string|null $attributes
2129
2129
* @return bool
2130
2130
*/
2131
2131
public function isDirty ($ attributes = null )
@@ -2138,7 +2138,7 @@ public function isDirty($attributes = null)
2138
2138
/**
2139
2139
* Determine if the model or all the given attribute(s) have remained the same.
2140
2140
*
2141
- * @param array|string|null $attributes
2141
+ * @param array<string> |string|null $attributes
2142
2142
* @return bool
2143
2143
*/
2144
2144
public function isClean ($ attributes = null )
@@ -2161,7 +2161,7 @@ public function discardChanges()
2161
2161
/**
2162
2162
* Determine if the model or any of the given attribute(s) were changed when the model was last saved.
2163
2163
*
2164
- * @param array|string|null $attributes
2164
+ * @param array<string> |string|null $attributes
2165
2165
* @return bool
2166
2166
*/
2167
2167
public function wasChanged ($ attributes = null )
@@ -2174,8 +2174,8 @@ public function wasChanged($attributes = null)
2174
2174
/**
2175
2175
* Determine if any of the given attributes were changed when the model was last saved.
2176
2176
*
2177
- * @param array $changes
2178
- * @param array|string|null $attributes
2177
+ * @param array<string> $changes
2178
+ * @param array<string> |string|null $attributes
2179
2179
* @return bool
2180
2180
*/
2181
2181
protected function hasChanges ($ changes , $ attributes = null )
@@ -2202,7 +2202,7 @@ protected function hasChanges($changes, $attributes = null)
2202
2202
/**
2203
2203
* Get the attributes that have been changed since the last sync.
2204
2204
*
2205
- * @return array
2205
+ * @return array<string, mixed>
2206
2206
*/
2207
2207
public function getDirty ()
2208
2208
{
@@ -2220,7 +2220,7 @@ public function getDirty()
2220
2220
/**
2221
2221
* Get the attributes that have been changed since the last sync for an update operation.
2222
2222
*
2223
- * @return array
2223
+ * @return array<string, mixed>
2224
2224
*/
2225
2225
protected function getDirtyForUpdate ()
2226
2226
{
@@ -2230,7 +2230,7 @@ protected function getDirtyForUpdate()
2230
2230
/**
2231
2231
* Get the attributes that were changed when the model was last saved.
2232
2232
*
2233
- * @return array
2233
+ * @return array<string, mixed>
2234
2234
*/
2235
2235
public function getChanges ()
2236
2236
{
@@ -2240,7 +2240,7 @@ public function getChanges()
2240
2240
/**
2241
2241
* Get the attributes that were previously original before the model was last saved.
2242
2242
*
2243
- * @return array
2243
+ * @return array<string, mixed>
2244
2244
*/
2245
2245
public function getPrevious ()
2246
2246
{
@@ -2347,7 +2347,7 @@ protected function transformModelValue($key, $value)
2347
2347
/**
2348
2348
* Append attributes to query when building a query.
2349
2349
*
2350
- * @param array|string $attributes
2350
+ * @param array<string> |string $attributes
2351
2351
* @return $this
2352
2352
*/
2353
2353
public function append ($ attributes )
0 commit comments