1
0
Fork 0
mirror of https://github.com/archtechx/virtualcolumn.git synced 2025-12-12 17:04:04 +00:00

Delete get() and set() types

This commit is contained in:
lukinovec 2023-08-09 12:39:52 +02:00
parent cd2cd5948a
commit 4414d11203

View file

@ -189,22 +189,12 @@ class FooModel extends Model
class EncryptedCast implements CastsAttributes
{
/**
* Cast the given value.
*
* @param array<string, mixed> $attributes
*/
public function get(Model $model, string $key, mixed $value, array $attributes): mixed
public function get($model, $key, $value, $attributes)
{
return Crypt::decryptString($value);
}
/**
* Prepare the given value for storage.
*
* @param array<string, mixed> $attributes
*/
public function set(Model $model, string $key, mixed $value, array $attributes): mixed
public function set($model, $key, $value, $attributes)
{
return Crypt::encryptString($value);
}