Remove safe methods.

This commit is contained in:
James Cole
2025-05-11 14:08:32 +02:00
parent 145e8d23f0
commit 84779b8d02
65 changed files with 166 additions and 166 deletions

View File

@@ -63,7 +63,7 @@ class IsValidBulkClause implements ValidationRule
private function basicValidation(string $value): bool
{
try {
$array = \Safe\json_decode($value, true, 8, JSON_THROW_ON_ERROR);
$array = json_decode($value, true, 8, JSON_THROW_ON_ERROR);
} catch (\JsonException) {
$this->error = (string) trans('validation.json');

View File

@@ -40,7 +40,7 @@ class IsValidPositiveAmount implements ValidationRule
{
if (is_array($value)) {
$fail('validation.numeric')->translate();
$message = sprintf('IsValidPositiveAmount: "%s" is not a number.', \Safe\json_encode($value));
$message = sprintf('IsValidPositiveAmount: "%s" is not a number.', json_encode($value));
Log::debug($message);
Log::channel('audit')->info($message);

View File

@@ -133,7 +133,7 @@ class UniqueAccountNumber implements ValidationRule
->where('accounts.user_id', auth()->user()->id)
->where('account_types.type', $type)
->where('account_meta.name', '=', 'account_number')
->where('account_meta.data', \Safe\json_encode($accountNumber))
->where('account_meta.data', json_encode($accountNumber))
;
if (null !== $this->account) {