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

@@ -99,7 +99,7 @@ class UpdateRequest implements UpdateRequestInterface
$body = (string) $res->getBody();
try {
$json = \Safe\json_decode($body, true, 512, JSON_THROW_ON_ERROR);
$json = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException) {
Log::error('Body is not valid JSON');
Log::error($body);

View File

@@ -260,7 +260,7 @@ trait JournalServiceTrait
if (null === $account) {
// final attempt, create it.
if (AccountTypeEnum::ASSET->value === $preferredType) {
throw new FireflyException(sprintf('TransactionFactory: Cannot create asset account with these values: %s', \Safe\json_encode($data)));
throw new FireflyException(sprintf('TransactionFactory: Cannot create asset account with these values: %s', json_encode($data)));
}
// fix name of account if only IBAN is given:
if ('' === (string) $data['name'] && '' !== (string) $data['iban']) {

View File

@@ -307,9 +307,9 @@ trait RecurringTransactionTrait
/** @var null|RecurrenceMeta $entry */
$entry = $transaction->recurrenceTransactionMeta()->where('name', 'tags')->first();
if (null === $entry) {
$entry = RecurrenceTransactionMeta::create(['rt_id' => $transaction->id, 'name' => 'tags', 'value' => \Safe\json_encode($tags)]);
$entry = RecurrenceTransactionMeta::create(['rt_id' => $transaction->id, 'name' => 'tags', 'value' => json_encode($tags)]);
}
$entry->value = \Safe\json_encode($tags);
$entry->value = json_encode($tags);
$entry->save();
}
if (0 === count($tags)) {

View File

@@ -80,7 +80,7 @@ class StandardWebhookSender implements WebhookSenderInterface
app('log')->debug(sprintf('Trying to send webhook message #%d', $this->message->id));
try {
$json = \Safe\json_encode($this->message->message, JSON_THROW_ON_ERROR);
$json = json_encode($this->message->message, JSON_THROW_ON_ERROR);
} catch (\JsonException $e) {
app('log')->error('Did not send message because of a JSON error.');
app('log')->error($e->getMessage());