1
0
Fork 0
mirror of https://github.com/archtechx/virtualcolumn.git synced 2025-12-12 13:44: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 class EncryptedCast implements CastsAttributes
{ {
/** public function get($model, $key, $value, $attributes)
* Cast the given value.
*
* @param array<string, mixed> $attributes
*/
public function get(Model $model, string $key, mixed $value, array $attributes): mixed
{ {
return Crypt::decryptString($value); return Crypt::decryptString($value);
} }
/** public function set($model, $key, $value, $attributes)
* Prepare the given value for storage.
*
* @param array<string, mixed> $attributes
*/
public function set(Model $model, string $key, mixed $value, array $attributes): mixed
{ {
return Crypt::encryptString($value); return Crypt::encryptString($value);
} }