Various code fixes.

This commit is contained in:
James Cole 2022-10-31 05:53:36 +01:00
parent 0059ed7bde
commit 249b0c3377
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
88 changed files with 180 additions and 180 deletions

View File

@ -77,7 +77,7 @@ class DeleteEmptyJournals extends Command
// uneven number, delete journal and transactions:
try {
TransactionJournal::find((int)$row->transaction_journal_id)->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::info(sprintf('Could not delete journal: %s', $e->getMessage()));
}
@ -104,7 +104,7 @@ class DeleteEmptyJournals extends Command
foreach ($set as $entry) {
try {
TransactionJournal::find($entry->id)->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::info(sprintf('Could not delete entry: %s', $e->getMessage()));
}

View File

@ -147,7 +147,7 @@ class DeleteOrphanedTransactions extends Command
if ($journal) {
try {
$journal->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::info(sprintf('Could not delete journal %s', $e->getMessage()));
}
}

View File

@ -62,7 +62,7 @@ class DeleteZeroAmount extends Command
$this->info(sprintf('Deleted transaction journal #%d because the amount is zero (0.00).', $journal->id));
try {
$journal->delete();
} catch (Exception $e) {
} catch (Exception $e) {
$this->line($e->getMessage());
}

View File

@ -121,7 +121,7 @@ class ExportData extends Command
$exporter->setExportBills($options['export']['bills']);
$exporter->setExportPiggies($options['export']['piggies']);
$data = $exporter->export();
if (0 === count ($data)) {
if (0 === count($data)) {
$this->error('You must export *something*. Use --export-transactions or another option. See docs.firefly-iii.org');
}
$returnCode = 0;

View File

@ -83,7 +83,7 @@ class MigrateJournalNotes extends Command
Log::debug(sprintf('Migrated meta note #%d to Note #%d', $meta->id, $note->id));
try {
$meta->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::error(sprintf('Could not delete old meta entry #%d: %s', $meta->id, $e->getMessage()));
}

View File

@ -148,10 +148,10 @@ class GracefulNotFoundHandler extends ExceptionHandler
$user = auth()->user();
$route = $request->route();
$param = $route->parameter('account');
if($param instanceof Account) {
if ($param instanceof Account) {
$accountId = (int) $param->id;
}
if(!($param instanceof Account)) {
if (!($param instanceof Account)) {
$accountId = (int) $param;
}
/** @var Account $account */

View File

@ -64,7 +64,7 @@ class AccountMetaFactory
if ('' === $value && null !== $entry) {
try {
$entry->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::debug(sprintf('Could not delete entry: %s', $e->getMessage()));
}

View File

@ -510,7 +510,7 @@ class TransactionJournalFactory
{
try {
$transaction->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
Log::error('Could not delete negative transaction.');

View File

@ -48,7 +48,7 @@ class TransactionJournalMetaFactory
//Log::debug('Value is empty, delete meta value.');
try {
$entry->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage()));
}
@ -66,7 +66,7 @@ class TransactionJournalMetaFactory
Log::debug('Will not store empty strings, delete meta value');
try {
$entry->delete();
} catch (Exception $e) {
} catch (Exception $e) {
Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage()));
}
}

View File

@ -56,7 +56,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
->with('start', $this->start)->with('end', $this->end)
->with('doubles', $this->expense)
->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.double.report: %s', $e->getMessage()));
$result = sprintf('Could not render report view: %s', $e->getMessage());
}

View File

@ -83,7 +83,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
$result = view('reports.audit.report', compact('reportType', 'accountIds', 'auditData', 'hideable', 'defaultShow'))
->with('start', $this->start)->with('end', $this->end)->with('accounts', $this->accounts)
->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.audit.report: %s', $e->getMessage()));
Log::error($e->getTraceAsString());
$result = sprintf('Could not render report view: %s', $e->getMessage());

View File

@ -71,7 +71,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
->with('budgets', $this->budgets)
->with('accounts', $this->accounts)
->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.account.report: %s', $e->getMessage()));
$result = sprintf('Could not render report view: %s', $e->getMessage());
}

View File

@ -80,7 +80,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
->with('categories', $this->categories)
->with('accounts', $this->accounts)
->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.category.month: %s', $e->getMessage()));
$result = sprintf('Could not render report view: %s', $e->getMessage());
}

View File

@ -54,7 +54,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
try {
return view('reports.default.month', compact('accountIds', 'reportType'))->with('start', $this->start)->with('end', $this->end)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.default.month: %s', $e->getMessage()));
$result = 'Could not render report view.';
}

View File

@ -58,7 +58,7 @@ class MultiYearReportGenerator implements ReportGeneratorInterface
'reports.default.multi-year',
compact('accountIds', 'reportType')
)->with('start', $this->start)->with('end', $this->end)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.default.multi-year: %s', $e->getMessage()));
$result = sprintf('Could not render report view: %s', $e->getMessage());
}

View File

@ -58,7 +58,7 @@ class YearReportGenerator implements ReportGeneratorInterface
'reports.default.year',
compact('accountIds', 'reportType')
)->with('start', $this->start)->with('end', $this->end)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.account.report: %s', $e->getMessage()));
$result = 'Could not render report view.';
}

View File

@ -78,7 +78,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
'reports.tag.month',
compact('accountIds', 'reportType', 'tagIds')
)->with('start', $this->start)->with('end', $this->end)->with('tags', $this->tags)->with('accounts', $this->accounts)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.tag.month: %s', $e->getMessage()));
$result = sprintf('Could not render report view: %s', $e->getMessage());
}

View File

@ -89,7 +89,7 @@ class UserEventHandler
$url = route('invite', [$event->invitee->invite_code]);
try {
Mail::to($invitee)->send(new InvitationMail($invitee, $admin, $url));
} catch (Exception $e) {
} catch (Exception $e) {
Log::error($e->getMessage());
}
}
@ -245,7 +245,7 @@ class UserEventHandler
try {
Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $url));
} catch (Exception $e) {
} catch (Exception $e) {
Log::error($e->getMessage());
}
}
@ -268,7 +268,7 @@ class UserEventHandler
$url = route('profile.undo-email-change', [$token->data, $hashed]);
try {
Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $url));
} catch (Exception $e) {
} catch (Exception $e) {
Log::error($e->getMessage());
}
}

View File

@ -572,7 +572,7 @@ class GroupCollector implements GroupCollectorInterface
$result['date']->setTimezone(config('app.timezone'));
$result['created_at']->setTimezone(config('app.timezone'));
$result['updated_at']->setTimezone(config('app.timezone'));
} catch (Exception $e) {
} catch (Exception $e) {
Log::error($e->getMessage());
}

View File

@ -109,7 +109,7 @@ class CategoryController extends Controller
$carbon = null;
try {
$carbon = today(config('app.timezone'));
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}

View File

@ -98,7 +98,7 @@ class DebugController extends Controller
Log::debug('Call twig:clean...');
try {
Artisan::call('twig:clean');
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
@ -188,7 +188,7 @@ class DebugController extends Controller
if (null !== $logFile) {
try {
$logContent = file_get_contents($logFile);
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -70,7 +70,7 @@ class FrontpageController extends Controller
if (!empty($info)) {
try {
$html = view('json.piggy-banks', compact('info'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render json.piggy-banks: %s', $e->getMessage()));
$html = 'Could not render view.';
}

View File

@ -161,7 +161,7 @@ class ReconcileController extends Controller
'selectedIds'
)
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('View error: %s', $e->getMessage()));
$view = sprintf('Could not render accounts.reconcile.overview: %s', $e->getMessage());
}
@ -261,7 +261,7 @@ class ReconcileController extends Controller
'accounts.reconcile.transactions',
compact('account', 'journals', 'currency', 'start', 'end', 'selectionStart', 'selectionEnd')
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render: %s', $e->getMessage()));
$html = sprintf('Could not render accounts.reconcile.transactions: %s', $e->getMessage());
}

View File

@ -51,7 +51,7 @@ class RuleController extends Controller
}
try {
$view = view('rules.partials.action', compact('actions', 'count'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render rules.partials.action: %s', $e->getMessage()));
$view = 'Could not render view.';
}
@ -80,7 +80,7 @@ class RuleController extends Controller
try {
$view = view('rules.partials.trigger', compact('triggers', 'count'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render rules.partials.trigger: %s', $e->getMessage()));
$view = 'Could not render view.';
}

View File

@ -62,7 +62,7 @@ class AccountController extends Controller
$accountReport = $accountTasker->getAccountReport($accounts, $start, $end);
try {
$result = view('reports.partials.accounts', compact('accountReport'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.accounts: %s', $e->getMessage()));
$result = 'Could not render view.';
}

View File

@ -137,7 +137,7 @@ class BalanceController extends Controller
}
try {
$result = view('reports.partials.balance', compact('report'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.balance: %s', $e->getMessage()));
$result = 'Could not render view.';
}

View File

@ -59,7 +59,7 @@ class BillController extends Controller
$report = $helper->getBillReport($accounts, $start, $end);
try {
$result = view('reports.partials.bills', compact('report'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budgets: %s', $e->getMessage()));
$result = 'Could not render view.';
}

View File

@ -198,7 +198,7 @@ class BudgetController extends Controller
try {
$result = view('reports.budget.partials.avg-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -353,7 +353,7 @@ class BudgetController extends Controller
}
try {
$result = view('reports.partials.budget-period', compact('report', 'periods'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = 'Could not render view.';
}
@ -404,7 +404,7 @@ class BudgetController extends Controller
try {
$result = view('reports.budget.partials.top-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}

View File

@ -312,7 +312,7 @@ class CategoryController extends Controller
try {
$result = view('reports.category.partials.avg-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -363,7 +363,7 @@ class CategoryController extends Controller
try {
$result = view('reports.category.partials.avg-income', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -547,7 +547,7 @@ class CategoryController extends Controller
try {
$result = view('reports.partials.category-period', compact('report', 'periods'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render category::expenses: %s', $e->getMessage()));
$result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
}
@ -626,7 +626,7 @@ class CategoryController extends Controller
try {
$result = view('reports.partials.category-period', compact('report', 'periods'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render category::expenses: %s', $e->getMessage()));
$result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
}
@ -670,7 +670,7 @@ class CategoryController extends Controller
try {
$result = (string) view('reports.partials.categories', compact('report'))->render();
$cache->store($result);
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render category::expenses: %s', $e->getMessage()));
$result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
}
@ -719,7 +719,7 @@ class CategoryController extends Controller
try {
$result = view('reports.category.partials.top-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -768,7 +768,7 @@ class CategoryController extends Controller
try {
$result = view('reports.category.partials.top-income', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}

View File

@ -111,7 +111,7 @@ class DoubleController extends Controller
try {
$result = view('reports.double.partials.avg-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -162,7 +162,7 @@ class DoubleController extends Controller
try {
$result = view('reports.double.partials.avg-income', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -455,7 +455,7 @@ class DoubleController extends Controller
try {
$result = view('reports.double.partials.top-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -504,7 +504,7 @@ class DoubleController extends Controller
try {
$result = view('reports.double.partials.top-income', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}

View File

@ -82,7 +82,7 @@ class OperationsController extends Controller
$type = 'expense-entry';
try {
$result = view('reports.partials.income-expenses', compact('report', 'type'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.income-expense: %s', $e->getMessage()));
$result = 'Could not render view.';
}
@ -116,7 +116,7 @@ class OperationsController extends Controller
$type = 'income-entry';
try {
$result = view('reports.partials.income-expenses', compact('report', 'type'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.income-expenses: %s', $e->getMessage()));
$result = 'Could not render view.';
}
@ -170,7 +170,7 @@ class OperationsController extends Controller
try {
$result = view('reports.partials.operations', compact('sums'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.operations: %s', $e->getMessage()));
$result = 'Could not render view.';
}

View File

@ -305,7 +305,7 @@ class TagController extends Controller
try {
$result = view('reports.tag.partials.avg-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -356,7 +356,7 @@ class TagController extends Controller
try {
$result = view('reports.tag.partials.avg-income', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -513,7 +513,7 @@ class TagController extends Controller
try {
$result = view('reports.tag.partials.top-expenses', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}
@ -562,7 +562,7 @@ class TagController extends Controller
try {
$result = view('reports.tag.partials.top-income', compact('result'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));
$result = sprintf('Could not render view: %s', $e->getMessage());
}

View File

@ -168,7 +168,7 @@ class EditController extends Controller
'triggers' => $triggers,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getPreviousTriggers(): %s', $e->getMessage()));
Log::error($e->getTraceAsString());
}

View File

@ -176,7 +176,7 @@ class SelectController extends Controller
$view = 'ERROR, see logs.';
try {
$view = view('list.journals-array-tiny', ['groups' => $collection])->render();
} catch (Throwable $exception) {
} catch (Throwable $exception) {
Log::error(sprintf('Could not render view in testTriggers(): %s', $exception->getMessage()));
Log::error($exception->getTraceAsString());
$view = sprintf('Could not render list.journals-tiny: %s', $exception->getMessage());
@ -218,7 +218,7 @@ class SelectController extends Controller
$view = 'ERROR, see logs.';
try {
$view = view('list.journals-array-tiny', ['groups' => $collection])->render();
} catch (Throwable $exception) {
} catch (Throwable $exception) {
Log::error(sprintf('Could not render view in testTriggersByRule(): %s', $exception->getMessage()));
Log::error($exception->getTraceAsString());
}

View File

@ -119,7 +119,7 @@ class SearchController extends Controller
try {
$html = view('search.search', compact('groups', 'hasPages', 'searchTime'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render search.search: %s', $e->getMessage()));
$html = 'Could not render view.';
}

View File

@ -198,7 +198,7 @@ class InstallController extends Controller
Artisan::call($command, $args);
Log::debug(Artisan::output());
}
} catch (Exception $e) {
} catch (Exception $e) {
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
if (strpos($e->getMessage(), 'open_basedir restriction in effect')) {
@ -211,7 +211,7 @@ class InstallController extends Controller
return false;
}
// clear cache as well.
Cache::clear();
Cache::clear();
Preferences::mark();
return true;

View File

@ -122,7 +122,7 @@ class Authenticate
foreach ($guards as $guard) {
if ($this->auth->guard($guard)->check()) {
return $this->auth->shouldUse($guard);
return $this->auth->shouldUse($guard);
}
}

View File

@ -87,7 +87,7 @@ class MailError extends Job implements ShouldQueue
}
}
);
} catch (Exception $e) {
} catch (Exception $e) {
Log::error('Exception when mailing: ' . $e->getMessage());
}
}

View File

@ -64,7 +64,7 @@ class AccountServiceProvider extends ServiceProvider
/** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -78,7 +78,7 @@ class AccountServiceProvider extends ServiceProvider
/** @var OperationsRepository $repository */
$repository = app(OperationsRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -98,7 +98,7 @@ class AccountServiceProvider extends ServiceProvider
/** @var AccountTaskerInterface $tasker */
$tasker = app(AccountTasker::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$tasker->setUser(auth()->user());
}

View File

@ -58,7 +58,7 @@ class AdminServiceProvider extends ServiceProvider
function (Application $app) {
/** @var LinkTypeRepository $repository */
$repository = app(LinkTypeRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -50,7 +50,7 @@ class AttachmentServiceProvider extends ServiceProvider
function (Application $app) {
/** @var AttachmentRepositoryInterface $repository */
$repository = app(AttachmentRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -51,7 +51,7 @@ class BillServiceProvider extends ServiceProvider
/** @var BillRepositoryInterface $repository */
$repository = app(BillRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -58,7 +58,7 @@ class BudgetServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var BudgetRepositoryInterface $repository */
$repository = app(BudgetRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -72,7 +72,7 @@ class BudgetServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var AvailableBudgetRepositoryInterface $repository */
$repository = app(AvailableBudgetRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -86,7 +86,7 @@ class BudgetServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var BudgetLimitRepositoryInterface $repository */
$repository = app(BudgetLimitRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -100,7 +100,7 @@ class BudgetServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var NoBudgetRepositoryInterface $repository */
$repository = app(NoBudgetRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -114,7 +114,7 @@ class BudgetServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var OperationsRepositoryInterface $repository */
$repository = app(OperationsRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -54,7 +54,7 @@ class CategoryServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var CategoryRepository $repository */
$repository = app(CategoryRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -67,7 +67,7 @@ class CategoryServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var OperationsRepository $repository */
$repository = app(OperationsRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -80,7 +80,7 @@ class CategoryServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var NoCategoryRepository $repository */
$repository = app(NoCategoryRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -50,7 +50,7 @@ class CurrencyServiceProvider extends ServiceProvider
function (Application $app) {
/** @var CurrencyRepository $repository */
$repository = app(CurrencyRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -180,7 +180,7 @@ class FireflyServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var ObjectGroupRepository $repository */
$repository = app(ObjectGroupRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -193,7 +193,7 @@ class FireflyServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var WebhookRepository $repository */
$repository = app(WebhookRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -206,7 +206,7 @@ class FireflyServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var SearchRuleEngine $engine */
$engine = app(SearchRuleEngine::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$engine->setUser(auth()->user());
}

View File

@ -68,7 +68,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -82,7 +82,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var JournalAPIRepositoryInterface $repository */
$repository = app(JournalAPIRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -96,7 +96,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var JournalCLIRepositoryInterface $repository */
$repository = app(JournalCLIRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -115,7 +115,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var TransactionGroupRepositoryInterface $repository */
$repository = app(TransactionGroupRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -134,7 +134,7 @@ class JournalServiceProvider extends ServiceProvider
static function (Application $app) {
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollector::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$collector->setUser(auth()->user());
}

View File

@ -50,7 +50,7 @@ class PiggyBankServiceProvider extends ServiceProvider
function (Application $app) {
/** @var PiggyBankRepository $repository */
$repository = app(PiggyBankRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -51,7 +51,7 @@ class RecurringServiceProvider extends ServiceProvider
/** @var RecurringRepositoryInterface $repository */
$repository = app(RecurringRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -50,7 +50,7 @@ class RuleGroupServiceProvider extends ServiceProvider
function (Application $app) {
/** @var RuleGroupRepository $repository */
$repository = app(RuleGroupRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -50,7 +50,7 @@ class RuleServiceProvider extends ServiceProvider
function (Application $app) {
/** @var RuleRepository $repository */
$repository = app(RuleRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -50,7 +50,7 @@ class SearchServiceProvider extends ServiceProvider
function (Application $app) {
/** @var OperatorQuerySearch $search */
$search = app(OperatorQuerySearch::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$search->setUser(auth()->user());
}

View File

@ -53,7 +53,7 @@ class TagServiceProvider extends ServiceProvider
/** @var TagRepository $repository */
$repository = app(TagRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}
@ -67,7 +67,7 @@ class TagServiceProvider extends ServiceProvider
/** @var OperationsRepository $repository */
$repository = app(OperationsRepository::class);
if ($app->auth->check()) {
if ($app->auth->check()) {
$repository->setUser(auth()->user());
}

View File

@ -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
}
}

View File

@ -54,7 +54,7 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
{
try {
$availableBudget->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -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
}

View File

@ -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
}
}

View File

@ -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
}

View File

@ -311,7 +311,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
if (null !== $dbNote && '' === $text) {
try {
$dbNote->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -366,7 +366,7 @@ trait ModifiesPiggyBanks
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -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']);

View File

@ -70,7 +70,7 @@ class AccountDestroyService
// delete account.
try {
$account->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}
@ -122,7 +122,7 @@ class AccountDestroyService
$collection = Transaction::groupBy('transaction_journal_id', 'account_id')
->where('account_id', $moveTo->id)
->get(['transaction_journal_id', 'account_id', DB::raw('count(*) as the_count')]);
->get(['transaction_journal_id', 'account_id', DB::raw('count(*) as the_count')]);
if (0 === $collection->count()) {
return;
}

View File

@ -39,7 +39,7 @@ class BillDestroyService
{
try {
$bill->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -41,7 +41,7 @@ class BudgetDestroyService
{
try {
$budget->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}

View File

@ -41,7 +41,7 @@ class CategoryDestroyService
{
try {
$category->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}

View File

@ -40,7 +40,7 @@ class CurrencyDestroyService
{
try {
$currency->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -95,7 +95,7 @@ class JournalDestroyService
$group->delete();
}
}
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -58,7 +58,7 @@ class RecurrenceDestroyService
try {
// delete all meta data
$recurrence->recurrenceMeta()->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
// delete all transactions.
@ -67,7 +67,7 @@ class RecurrenceDestroyService
$transaction->recurrenceTransactionMeta()->delete();
try {
$transaction->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}
@ -77,7 +77,7 @@ class RecurrenceDestroyService
// delete recurrence
try {
$recurrence->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -45,7 +45,7 @@ class TransactionGroupDestroyService
}
try {
$transactionGroup->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -174,7 +174,7 @@ trait AccountServiceTrait
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -72,7 +72,7 @@ trait BillServiceTrait
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -397,7 +397,7 @@ trait JournalServiceTrait
// try to delete existing notes.
try {
$note->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -62,7 +62,7 @@ trait RecurringTransactionTrait
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}
@ -377,7 +377,7 @@ trait RecurringTransactionTrait
$transaction->recurrenceTransactionMeta()->delete();
try {
$transaction->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -155,7 +155,7 @@ class CategoryUpdateService
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -640,7 +640,7 @@ class JournalUpdateService
if ($this->hasFields([$field])) {
try {
$value = '' === (string) $this->data[$field] ? null : new Carbon($this->data[$field]);
} catch (Exception $e) {
} catch (Exception $e) {
Log::debug(sprintf('%s is not a valid date value: %s', $this->data[$field], $e->getMessage()));
return;

View File

@ -134,7 +134,7 @@ class RecurrenceUpdateService
if (null !== $dbNote && '' === $text) {
try {
$dbNote->delete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}

View File

@ -73,7 +73,7 @@ class PwndVerifierV2 implements Verifier
}
try {
$strpos = stripos($res->getBody()->getContents(), $rest);
} catch (RuntimeException $e) {
} catch (RuntimeException $e) {
Log::error(sprintf('Could not get body from Pwnd result: %s', $e->getMessage()));
$strpos = false;
}

View File

@ -71,7 +71,7 @@ class Date implements BinderInterface
try {
$result = new Carbon($value);
} catch (Exception $e) {
} catch (Exception $e) {
Log::error(sprintf('Could not parse date "%s" for user #%d: %s', $value, auth()->user()->id, $e->getMessage()));
throw new NotFoundHttpException();
}

View File

@ -63,7 +63,7 @@ class ExpandedForm
//}
try {
$html = view('form.amount-no-currency', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render amountNoCurrency(): %s', $e->getMessage()));
$html = 'Could not render amountNoCurrency.';
}
@ -98,7 +98,7 @@ class ExpandedForm
unset($options['placeholder'], $options['autocomplete'], $options['class']);
try {
$html = view('form.checkbox', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render checkbox(): %s', $e->getMessage()));
$html = 'Could not render checkbox.';
}
@ -122,7 +122,7 @@ class ExpandedForm
unset($options['placeholder']);
try {
$html = view('form.date', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render date(): %s', $e->getMessage()));
$html = 'Could not render date.';
}
@ -144,7 +144,7 @@ class ExpandedForm
$classes = $this->getHolderClasses($name);
try {
$html = view('form.file', compact('classes', 'name', 'label', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render file(): %s', $e->getMessage()));
$html = 'Could not render file.';
}
@ -169,7 +169,7 @@ class ExpandedForm
$options['step'] = '1';
try {
$html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render integer(): %s', $e->getMessage()));
$html = 'Could not render integer.';
}
@ -193,7 +193,7 @@ class ExpandedForm
$value = $this->fillFieldValue($name, $value);
try {
$html = view('form.location', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render location(): %s', $e->getMessage()));
$html = 'Could not render location.';
}
@ -214,12 +214,12 @@ class ExpandedForm
$fields = ['title', 'name', 'description'];
/** @var Eloquent $entry */
foreach ($set as $entry) {
$entryId = (int) $entry->id;
$entryId = (int) $entry->id;
$current = $entry->toArray();
$title = null;
foreach ($fields as $field) {
if (array_key_exists($field, $current) && null === $title) {
$title = $current[$field];
$title = $current[$field];
}
}
$selectList[$entryId] = $title;
@ -251,7 +251,7 @@ class ExpandedForm
}
try {
$html = view('form.non-selectable-amount', compact('selectedCurrency', 'classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render nonSelectableAmount(): %s', $e->getMessage()));
$html = 'Could not render nonSelectableAmount.';
}
@ -276,7 +276,7 @@ class ExpandedForm
unset($options['placeholder']);
try {
$html = view('form.number', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render number(): %s', $e->getMessage()));
$html = 'Could not render number.';
}
@ -305,7 +305,7 @@ class ExpandedForm
try {
$html = view('form.object_group', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render objectGroup(): %s', $e->getMessage()));
$html = 'Could not render objectGroup.';
}
@ -324,7 +324,7 @@ class ExpandedForm
{
try {
$html = view('form.options', compact('type', 'name'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render select(): %s', $e->getMessage()));
$html = 'Could not render optionsList.';
}
@ -345,7 +345,7 @@ class ExpandedForm
$classes = $this->getHolderClasses($name);
try {
$html = view('form.password', compact('classes', 'name', 'label', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render password(): %s', $e->getMessage()));
$html = 'Could not render password.';
}
@ -372,7 +372,7 @@ class ExpandedForm
unset($options['placeholder']);
try {
$html = view('form.percentage', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render percentage(): %s', $e->getMessage()));
$html = 'Could not render percentage.';
}
@ -394,7 +394,7 @@ class ExpandedForm
$classes = $this->getHolderClasses($name);
try {
$html = view('form.static', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render staticText(): %s', $e->getMessage()));
$html = 'Could not render staticText.';
}
@ -417,7 +417,7 @@ class ExpandedForm
$value = $this->fillFieldValue($name, $value);
try {
$html = view('form.text', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render text(): %s', $e->getMessage()));
$html = 'Could not render text.';
}
@ -446,7 +446,7 @@ class ExpandedForm
try {
$html = view('form.textarea', compact('classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render textarea(): %s', $e->getMessage()));
$html = 'Could not render textarea.';
}

View File

@ -46,7 +46,7 @@ class FireflyConfig
}
try {
Configuration::where('name', $name)->forceDelete();
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}
}
@ -68,7 +68,7 @@ class FireflyConfig
try {
/** @var Configuration|null $config */
$config = Configuration::where('name', $name)->first(['id', 'name', 'data']);
} catch (QueryException|Exception $e) {
} catch (QueryException|Exception $e) {
throw new FireflyException(sprintf('Could not poll the database: %s', $e->getMessage()));
}
@ -95,7 +95,7 @@ class FireflyConfig
{
try {
$config = Configuration::whereName($name)->whereNull('deleted_at')->first();
} catch (QueryException|Exception $e) {
} catch (QueryException|Exception $e) {
$item = new Configuration();
$item->name = $name;
$item->data = $value;

View File

@ -137,7 +137,7 @@ class AccountForm
unset($options['class']);
try {
$html = view('form.assetAccountCheckList', compact('classes', 'selected', 'name', 'label', 'options', 'grouped'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render assetAccountCheckList(): %s', $e->getMessage()));
$html = 'Could not render assetAccountCheckList.';
}

View File

@ -96,7 +96,7 @@ class CurrencyForm
}
try {
$html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render currencyField(): %s', $e->getMessage()));
$html = 'Could not render currencyField.';
}
@ -165,7 +165,7 @@ class CurrencyForm
}
try {
$html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render currencyField(): %s', $e->getMessage()));
$html = 'Could not render currencyField.';
}

View File

@ -54,7 +54,7 @@ trait FormSupport
unset($options['autocomplete'], $options['placeholder']);
try {
$html = view('form.select', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Could not render select(): %s', $e->getMessage()));
$html = 'Could not render select.';
}
@ -134,7 +134,7 @@ trait FormSupport
if (null !== request()->old($name)) {
$value = request()->old($name);
}
} catch (RuntimeException $e) {
} catch (RuntimeException $e) {
// don't care about session errors.
Log::debug(sprintf('Run time: %s', $e->getMessage()));
}
@ -163,7 +163,7 @@ trait FormSupport
$date = null;
try {
$date = today(config('app.timezone'));
} catch (Exception $e) {
} catch (Exception $e) {
// @ignoreException
}

View File

@ -57,7 +57,7 @@ trait ModelInformation
'count' => 1,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Throwable was thrown in getActionsForBill(): %s', $e->getMessage()));
Log::error($e->getTraceAsString());
$result = 'Could not render view. See log files.';
@ -144,7 +144,7 @@ trait ModelInformation
'triggers' => $triggers,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getTriggersForBill(): %s', $e->getMessage()));
Log::debug($e->getTraceAsString());
$string = '';
@ -258,7 +258,7 @@ trait ModelInformation
'triggers' => $triggers,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getTriggersForJournal(): %s', $e->getMessage()));
Log::debug($e->getTraceAsString());
$string = '';

View File

@ -67,7 +67,7 @@ trait RenderPartialViews
try {
$view = view('popup.report.balance-amount', compact('journals', 'budget', 'account'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render: %s', $e->getMessage()));
$view = 'Firefly III could not render the view. Please see the log files.';
}
@ -119,7 +119,7 @@ trait RenderPartialViews
try {
$view = view('popup.report.budget-spent-amount', compact('journals', 'budget'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render: %s', $e->getMessage()));
$view = 'Firefly III could not render the view. Please see the log files.';
}
@ -146,7 +146,7 @@ trait RenderPartialViews
try {
$view = view('popup.report.category-entry', compact('journals', 'category'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render: %s', $e->getMessage()));
$view = 'Firefly III could not render the view. Please see the log files.';
}
@ -167,7 +167,7 @@ trait RenderPartialViews
try {
$result = view('reports.options.category', compact('categories'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.options.category: %s', $e->getMessage()));
$result = 'Could not render view.';
}
@ -208,7 +208,7 @@ trait RenderPartialViews
try {
$result = view('reports.options.double', compact('set'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
$result = 'Could not render view.';
}
@ -241,7 +241,7 @@ trait RenderPartialViews
try {
$view = view('popup.report.expense-entry', compact('journals', 'account'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render: %s', $e->getMessage()));
$view = 'Firefly III could not render the view. Please see the log files.';
}
@ -275,7 +275,7 @@ trait RenderPartialViews
'count' => $count,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getCurrentActions(): %s', $e->getMessage()));
Log::error($e->getTraceAsString());
}
@ -329,7 +329,7 @@ trait RenderPartialViews
'triggers' => $triggers,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getCurrentTriggers(): %s', $e->getMessage()));
Log::error($e->getTraceAsString());
}
@ -365,7 +365,7 @@ trait RenderPartialViews
try {
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Could not render: %s', $e->getMessage()));
$view = 'Firefly III could not render the view. Please see the log files.';
}
@ -382,7 +382,7 @@ trait RenderPartialViews
{
try {
$result = view('reports.options.no-options')->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.options.no-options: %s', $e->getMessage()));
$result = 'Could not render view.';
}
@ -404,7 +404,7 @@ trait RenderPartialViews
try {
$result = view('reports.options.tag', compact('tags'))->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage()));
$result = 'Could not render view.';
}

View File

@ -58,7 +58,7 @@ trait RuleManagement
'count' => $index + 1,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getPreviousActions(): %s', $e->getMessage()));
Log::error($e->getTraceAsString());
}
@ -104,7 +104,7 @@ trait RuleManagement
'triggers' => $triggers,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getPreviousTriggers(): %s', $e->getMessage()));
Log::error($e->getTraceAsString());
}
@ -146,7 +146,7 @@ trait RuleManagement
'triggers' => $triggers,
]
)->render();
} catch (Throwable $e) {
} catch (Throwable $e) {
Log::debug(sprintf('Throwable was thrown in getPreviousTriggers(): %s', $e->getMessage()));
Log::error($e->getTraceAsString());
}

View File

@ -189,7 +189,7 @@ class OperatorQuerySearch implements SearchInterface
throw new FireflyException(sprintf('Firefly III search cant handle "%s"-nodes', $class));
case Subquery::class:
// loop all notes in subquery:
foreach ($searchNode->getNodes() as $subNode) {
foreach ($searchNode->getNodes() as $subNode) {
$this->handleSearchNode($subNode); // let's hope it's not too recursive
}
break;

View File

@ -160,7 +160,7 @@ class Steam
->orderBy('transaction_journals.date', 'ASC')
->whereNull('transaction_journals.deleted_at')
->get(
[
[
'transaction_journals.date',
'transactions.transaction_currency_id',
DB::raw('SUM(transactions.amount) AS modified'),
@ -331,7 +331,7 @@ class Steam
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59'))
->groupBy('transactions.transaction_currency_id');
$balances = $query->get(['transactions.transaction_currency_id', DB::raw('SUM(transactions.amount) as sum_for_currency')]);
$balances = $query->get(['transactions.transaction_currency_id', DB::raw('SUM(transactions.amount) as sum_for_currency')]);
$return = [];
/** @var stdClass $entry */
foreach ($balances as $entry) {
@ -416,7 +416,7 @@ class Steam
$set = auth()->user()->transactions()
->whereIn('transactions.account_id', $accounts)
->groupBy(['transactions.account_id', 'transaction_journals.user_id'])
->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) AS max_date')]);
->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) AS max_date')]);
foreach ($set as $entry) {
$date = new Carbon($entry->max_date, config('app.timezone'));