$model, 'key' => $key, 'value' => $value, 'attributes' => $attributes, ]); return null; } } /** @param ?LicenseInstance $value */ public function set($model, string $key, $value, array $attributes): ?string { try { return $value?->toJson(); } catch (Throwable) { Log::error('Failed to cast-set license instance', [ 'model' => $model, 'key' => $key, 'value' => $value, 'attributes' => $attributes, ]); return null; } } }