Skip to content

Commit 97e3461

Browse files
Update cast.stub
1 parent f72ef24 commit 97e3461

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

src/Core/Commands/stubs/cast.stub

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,26 @@
33
namespace {{ namespace }};
44

55
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
6+
use Illuminate\Database\Eloquent\Model;
67

78
class {{ class }} implements CastsAttributes
89
{
910
/**
1011
* Cast the given value.
1112
*
12-
* @param \Illuminate\Database\Eloquent\Model $model
13-
* @param string $key
14-
* @param mixed $value
15-
* @param array $attributes
16-
* @return mixed
13+
* @param array<string, mixed> $attributes
1714
*/
18-
public function get($model, string $key, $value, array $attributes)
15+
public function get(Model $model, string $key, mixed $value, array $attributes): mixed
1916
{
2017
return $value;
2118
}
2219

2320
/**
2421
* Prepare the given value for storage.
2522
*
26-
* @param \Illuminate\Database\Eloquent\Model $model
27-
* @param string $key
28-
* @param mixed $value
29-
* @param array $attributes
30-
* @return mixed
23+
* @param array<string, mixed> $attributes
3124
*/
32-
public function set($model, string $key, $value, array $attributes)
25+
public function set(Model $model, string $key, mixed $value, array $attributes): mixed
3326
{
3427
return $value;
3528
}

0 commit comments

Comments
 (0)