mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Various code fixes.
This commit is contained in:
@@ -57,7 +57,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
||||
$path = $helper->getAttachmentLocation($attachment);
|
||||
try {
|
||||
Storage::disk('upload')->delete($path);
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
$attachment->delete();
|
||||
@@ -201,7 +201,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
||||
if (null !== $dbNote) {
|
||||
try {
|
||||
$dbNote->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
|
||||
{
|
||||
try {
|
||||
$availableBudget->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
}
|
||||
|
@@ -126,7 +126,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
{
|
||||
try {
|
||||
$budgetLimit->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
}
|
||||
@@ -426,7 +426,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
Log::debug(sprintf('%s is zero, delete budget limit #%d', $amount, $limit->id));
|
||||
try {
|
||||
$limit->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
|
||||
|
@@ -198,7 +198,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
// delete limits with amount 0:
|
||||
try {
|
||||
BudgetLimit::where('amount', 0)->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
$budgets = $this->getActiveBudgets();
|
||||
@@ -605,7 +605,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
if (null !== $dbNote) {
|
||||
try {
|
||||
$dbNote->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
|
||||
$result = null;
|
||||
try {
|
||||
$result = new Carbon($cache->get());
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
|
||||
$value = null;
|
||||
try {
|
||||
$value = new Carbon($entry->data);
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
if (null !== $value) {
|
||||
@@ -188,7 +188,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface
|
||||
$return = (string) $value;
|
||||
try {
|
||||
$cache->store($return);
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
|
||||
|
@@ -311,7 +311,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
|
||||
if (null !== $dbNote && '' === $text) {
|
||||
try {
|
||||
$dbNote->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
}
|
||||
|
@@ -366,7 +366,7 @@ trait ModifiesPiggyBanks
|
||||
if (null !== $dbNote) {
|
||||
try {
|
||||
$dbNote->delete();
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
}
|
||||
|
@@ -178,7 +178,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
||||
$current = $attachment->toArray();
|
||||
$current['file_exists'] = true;
|
||||
$current['notes'] = $repository->getNoteText($attachment);
|
||||
$current['journal_title'] = $attachment->attachable->description;
|
||||
$current['journal_title'] = $attachment->attachable->description;
|
||||
$result[$journalId][] = $current;
|
||||
}
|
||||
|
||||
@@ -197,11 +197,11 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
||||
$return = [];
|
||||
$journals = $group->transactionJournals->pluck('id')->toArray();
|
||||
$set = TransactionJournalLink::where(
|
||||
static function (Builder $q) use ($journals) {
|
||||
$q->whereIn('source_id', $journals);
|
||||
$q->orWhereIn('destination_id', $journals);
|
||||
}
|
||||
)
|
||||
static function (Builder $q) use ($journals) {
|
||||
$q->whereIn('source_id', $journals);
|
||||
$q->orWhereIn('destination_id', $journals);
|
||||
}
|
||||
)
|
||||
->with(['source', 'destination', 'source.transactions'])
|
||||
->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')
|
||||
->get(['journal_links.*', 'link_types.inward', 'link_types.outward', 'link_types.editable']);
|
||||
|
Reference in New Issue
Block a user