Skip to content

Firefly III: a personal finances manager

Code clean up.

James Cole649dca77f53d
diff --git a/app/Helpers/Chart/MetaPieChart.php b/app/Helpers/Chart/MetaPieChart.php
index d2ed458bd3..4950e9f855 100644
--- a/app/Helpers/Chart/MetaPieChart.php
+++ b/app/Helpers/Chart/MetaPieChart.php
@@ -133,7 +133,6 @@ class MetaPieChart implements MetaPieChartInterface
}
return $chartData;
-
}
/**
@@ -342,7 +341,6 @@ class MetaPieChart implements MetaPieChartInterface
}
return $chartData;
-
}
/**
diff --git a/app/Helpers/Chart/MetaPieChartInterface.php b/app/Helpers/Chart/MetaPieChartInterface.php
index 0aede8b59f..cc15e17308 100644
--- a/app/Helpers/Chart/MetaPieChartInterface.php
+++ b/app/Helpers/Chart/MetaPieChartInterface.php
@@ -97,5 +97,4 @@ interface MetaPieChartInterface
* @return MetaPieChartInterface
*/
public function setUser(User $user): MetaPieChartInterface;
-
}
diff --git a/app/Helpers/Collection/Balance.php b/app/Helpers/Collection/Balance.php
index 63a4ffa878..aef2709026 100644
--- a/app/Helpers/Collection/Balance.php
+++ b/app/Helpers/Collection/Balance.php
@@ -87,6 +87,4 @@ class Balance
{
$this->balanceLines = $balanceLines;
}
-
-
}
diff --git a/app/Helpers/Collection/BalanceEntry.php b/app/Helpers/Collection/BalanceEntry.php
index a601c2571e..e67a11e7de 100644
--- a/app/Helpers/Collection/BalanceEntry.php
+++ b/app/Helpers/Collection/BalanceEntry.php
@@ -89,6 +89,4 @@ class BalanceEntry
{
$this->spent = $spent;
}
-
-
}
diff --git a/app/Helpers/Collection/BalanceHeader.php b/app/Helpers/Collection/BalanceHeader.php
index 5908343073..7a6746997c 100644
--- a/app/Helpers/Collection/BalanceHeader.php
+++ b/app/Helpers/Collection/BalanceHeader.php
@@ -61,6 +61,4 @@ class BalanceHeader
{
return $this->accounts;
}
-
-
}
diff --git a/app/Helpers/Collection/BalanceLine.php b/app/Helpers/Collection/BalanceLine.php
index f5c456056a..e9673eb680 100644
--- a/app/Helpers/Collection/BalanceLine.php
+++ b/app/Helpers/Collection/BalanceLine.php
@@ -36,7 +36,6 @@ use Illuminate\Support\Collection;
*/
class BalanceLine
{
-
const ROLE_DEFAULTROLE = 1;
const ROLE_TAGROLE = 2;
const ROLE_DIFFROLE = 3;
@@ -57,7 +56,6 @@ class BalanceLine
public function __construct()
{
$this->balanceEntries = new Collection;
-
}
/**
diff --git a/app/Helpers/Collection/Bill.php b/app/Helpers/Collection/Bill.php
index de8eff5c2f..e79ce41076 100644
--- a/app/Helpers/Collection/Bill.php
+++ b/app/Helpers/Collection/Bill.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Collection;
-
use Carbon\Carbon;
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
use Illuminate\Support\Collection;
@@ -132,5 +131,4 @@ class Bill
{
$this->startDate = $startDate;
}
-
}
diff --git a/app/Helpers/Collection/BillLine.php b/app/Helpers/Collection/BillLine.php
index 9359d2db1c..a82f8fb289 100644
--- a/app/Helpers/Collection/BillLine.php
+++ b/app/Helpers/Collection/BillLine.php
@@ -177,6 +177,4 @@ class BillLine
{
$this->hit = $hit;
}
-
-
}
diff --git a/app/Helpers/Collection/Category.php b/app/Helpers/Collection/Category.php
index c9e551cf32..9bb918cb5e 100644
--- a/app/Helpers/Collection/Category.php
+++ b/app/Helpers/Collection/Category.php
@@ -26,7 +26,6 @@ namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Category as CategoryModel;
use Illuminate\Support\Collection;
-
/**
*
* Class Category
@@ -91,6 +90,4 @@ class Category
{
return $this->total;
}
-
-
}
diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php
index 62bc80789f..2a281c1a9b 100644
--- a/app/Helpers/Collector/JournalCollector.php
+++ b/app/Helpers/Collector/JournalCollector.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Collector;
-
use Carbon\Carbon;
use DB;
use FireflyIII\Exceptions\FireflyException;
@@ -265,8 +264,6 @@ class JournalCollector implements JournalCollectorInterface
$transaction->opposing_account_name = app('steam')->tryDecrypt($transaction->opposing_account_name);
$transaction->account_iban = app('steam')->tryDecrypt($transaction->account_iban);
$transaction->opposing_account_iban = app('steam')->tryDecrypt($transaction->opposing_account_iban);
-
-
}
);
@@ -390,7 +387,6 @@ class JournalCollector implements JournalCollectorInterface
}
return $this;
-
}
/**
@@ -630,7 +626,6 @@ class JournalCollector implements JournalCollectorInterface
->orderBy('transactions.amount', 'DESC');
$this->query = $query;
-
}
/**
@@ -648,7 +643,6 @@ class JournalCollector implements JournalCollectorInterface
*/
public function withCategoryInformation(): JournalCollectorInterface
{
-
$this->joinCategoryTables();
return $this;
@@ -760,7 +754,10 @@ class JournalCollector implements JournalCollectorInterface
$this->joinedCategory = true;
$this->query->leftJoin('category_transaction_journal', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id');
$this->query->leftJoin(
- 'categories as transaction_journal_categories', 'transaction_journal_categories.id', '=', 'category_transaction_journal.category_id'
+ 'categories as transaction_journal_categories',
+ 'transaction_journal_categories.id',
+ '=',
+ 'category_transaction_journal.category_id'
);
$this->query->leftJoin('category_transaction', 'category_transaction.transaction_id', '=', 'transactions.id');
@@ -785,11 +782,12 @@ class JournalCollector implements JournalCollectorInterface
Log::debug('joinedOpposing is false');
// join opposing transaction (hard):
$this->query->leftJoin(
- 'transactions as opposing', function (JoinClause $join) {
- $join->on('opposing.transaction_journal_id', '=', 'transactions.transaction_journal_id')
+ 'transactions as opposing',
+ function (JoinClause $join) {
+ $join->on('opposing.transaction_journal_id', '=', 'transactions.transaction_journal_id')
->where('opposing.identifier', '=', DB::raw('transactions.identifier'))
->where('opposing.amount', '=', DB::raw('transactions.amount * -1'));
- }
+ }
);
$this->query->leftJoin('accounts as opposing_accounts', 'opposing.account_id', '=', 'opposing_accounts.id');
$this->query->leftJoin('account_types as opposing_account_types', 'opposing_accounts.account_type_id', '=', 'opposing_account_types.id');
diff --git a/app/Helpers/Filter/FilterInterface.php b/app/Helpers/Filter/FilterInterface.php
index 8ce5290fa8..24e3362a32 100644
--- a/app/Helpers/Filter/FilterInterface.php
+++ b/app/Helpers/Filter/FilterInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Filter;
-
use Illuminate\Support\Collection;
interface FilterInterface
@@ -34,5 +33,4 @@ interface FilterInterface
* @return Collection
*/
public function filter(Collection $set): Collection;
-
}
diff --git a/app/Helpers/Filter/InternalTransferFilter.php b/app/Helpers/Filter/InternalTransferFilter.php
index 8020ec04c9..2f72d22f30 100644
--- a/app/Helpers/Filter/InternalTransferFilter.php
+++ b/app/Helpers/Filter/InternalTransferFilter.php
@@ -68,18 +68,18 @@ class InternalTransferFilter implements FilterInterface
Log::debug(
sprintf(
'Transaction #%d has #%d and #%d in set, so removed',
- $transaction->id, $transaction->account_id, $transaction->opposing_account_id
- ), $this->accounts
+ $transaction->id,
+ $transaction->account_id,
+ $transaction->opposing_account_id
+ ),
+ $this->accounts
);
return false;
}
return $transaction;
-
}
);
-
-
}
}
diff --git a/app/Helpers/Filter/OpposingAccountFilter.php b/app/Helpers/Filter/OpposingAccountFilter.php
index 2829d4ff52..df02f9405a 100644
--- a/app/Helpers/Filter/OpposingAccountFilter.php
+++ b/app/Helpers/Filter/OpposingAccountFilter.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Filter;
-
use FireflyIII\Models\Transaction;
use Illuminate\Support\Collection;
use Log;
diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php
index 9f8a91f3f3..9a27a368c4 100644
--- a/app/Helpers/Help/Help.php
+++ b/app/Helpers/Help/Help.php
@@ -62,7 +62,6 @@ class Help implements HelpInterface
*/
public function getFromGithub(string $route, string $language): string
{
-
$uri = sprintf('https://raw.githubusercontent.com/firefly-iii/help/master/%s/%s.md', $language, $route);
Log::debug(sprintf('Trying to get %s...', $uri));
$opt = ['useragent' => $this->userAgent];
@@ -119,7 +118,6 @@ class Help implements HelpInterface
}
return $result;
-
}
/**
diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php
index 4a9f322968..244ab9be70 100644
--- a/app/Helpers/Report/BalanceReportHelper.php
+++ b/app/Helpers/Report/BalanceReportHelper.php
@@ -114,7 +114,10 @@ class BalanceReportHelper implements BalanceReportHelperInterface
$balanceEntry = new BalanceEntry;
$balanceEntry->setAccount($account);
$spent = $this->budgetRepository->spentInPeriod(
- new Collection([$budgetLimit->budget]), new Collection([$account]), $budgetLimit->start_date, $budgetLimit->end_date
+ new Collection([$budgetLimit->budget]),
+ new Collection([$account]),
+ $budgetLimit->start_date,
+ $budgetLimit->end_date
);
$balanceEntry->setSpent($spent);
$line->addBalanceEntry($balanceEntry);
@@ -142,7 +145,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface
$budgetEntry->setAccount($account);
$budgetEntry->setSpent($spent);
$empty->addBalanceEntry($budgetEntry);
-
}
return $empty;
@@ -176,7 +178,5 @@ class BalanceReportHelper implements BalanceReportHelperInterface
$balance->setBalanceLines($newSet);
return $balance;
-
}
-
}
diff --git a/app/Helpers/Report/BalanceReportHelperInterface.php b/app/Helpers/Report/BalanceReportHelperInterface.php
index 9fd6b5858f..9aa17f589f 100644
--- a/app/Helpers/Report/BalanceReportHelperInterface.php
+++ b/app/Helpers/Report/BalanceReportHelperInterface.php
@@ -27,7 +27,6 @@ use Carbon\Carbon;
use FireflyIII\Helpers\Collection\Balance;
use Illuminate\Support\Collection;
-
/**
* Interface BalanceReportHelperInterface
*
diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php
index 7865f0203e..07d4cda721 100644
--- a/app/Helpers/Report/BudgetReportHelper.php
+++ b/app/Helpers/Report/BudgetReportHelper.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Report;
-
use Carbon\Carbon;
use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
@@ -163,6 +162,5 @@ class BudgetReportHelper implements BudgetReportHelperInterface
$array['expenses'] = $expenses;
return $array;
-
}
}
diff --git a/app/Helpers/Report/BudgetReportHelperInterface.php b/app/Helpers/Report/BudgetReportHelperInterface.php
index 3ba574bd5d..3c86a0fd12 100644
--- a/app/Helpers/Report/BudgetReportHelperInterface.php
+++ b/app/Helpers/Report/BudgetReportHelperInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Report;
-
use Carbon\Carbon;
use Illuminate\Support\Collection;
@@ -52,5 +51,4 @@ interface BudgetReportHelperInterface
* @return Collection
*/
public function getBudgetsWithExpenses(Carbon $start, Carbon $end, Collection $accounts): Collection;
-
}
diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php
index 18d1558e6d..c355f65821 100644
--- a/app/Helpers/Report/ReportHelper.php
+++ b/app/Helpers/Report/ReportHelper.php
@@ -153,5 +153,4 @@ class ReportHelper implements ReportHelperInterface
return $months;
}
-
}
diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php
index a12950234a..98e26667ad 100644
--- a/app/Helpers/Report/ReportHelperInterface.php
+++ b/app/Helpers/Report/ReportHelperInterface.php
@@ -57,5 +57,4 @@ interface ReportHelperInterface
* @return array
*/
public function listOfMonths(Carbon $date): array;
-
}
diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php
index 2ef5905eeb..0d5f9a58cb 100644
--- a/app/Http/Controllers/Account/ReconcileController.php
+++ b/app/Http/Controllers/Account/ReconcileController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account;
-
use Carbon\Carbon;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
use FireflyIII\Http\Controllers\Controller;
@@ -84,7 +83,6 @@ class ReconcileController extends Controller
$return['html'] = view('accounts.reconcile.overview', compact('account', 'start', 'end'))->render();
return Response::json($return);
-
}
/**
@@ -132,9 +130,21 @@ class ReconcileController extends Controller
$indexUri = route('accounts.reconcile', [$account->id, '%start%', '%end%']);
return view(
- 'accounts.reconcile.index', compact(
- 'account', 'currency', 'subTitleIcon', 'start', 'end', 'subTitle', 'startBalance', 'endBalance', 'transactionsUri',
- 'selectionStart', 'selectionEnd', 'overviewUri', 'indexUri'
+ 'accounts.reconcile.index',
+ compact(
+ 'account',
+ 'currency',
+ 'subTitleIcon',
+ 'start',
+ 'end',
+ 'subTitle',
+ 'startBalance',
+ 'endBalance',
+ 'transactionsUri',
+ 'selectionStart',
+ 'selectionEnd',
+ 'overviewUri',
+ 'indexUri'
)
);
}
@@ -169,5 +179,4 @@ class ReconcileController extends Controller
return Response::json(['html' => $html]);
}
-
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php
index ecd68c0b91..0162b01c55 100644
--- a/app/Http/Controllers/AccountController.php
+++ b/app/Http/Controllers/AccountController.php
@@ -103,7 +103,6 @@ class AccountController extends Controller
$request->session()->flash('gaEventAction', 'create-' . $what);
return view('accounts.create', compact('subTitleIcon', 'what', 'subTitle', 'currencySelectList', 'allCurrencies', 'roles'));
-
}
/**
@@ -208,8 +207,17 @@ class AccountController extends Controller
$request->session()->flash('gaEventAction', 'edit-' . $what);
return view(
- 'accounts.edit', compact(
- 'allCurrencies', 'currencySelectList', 'account', 'currency', 'subTitle', 'subTitleIcon', 'what', 'roles', 'preFilled'
+ 'accounts.edit',
+ compact(
+ 'allCurrencies',
+ 'currencySelectList',
+ 'account',
+ 'currency',
+ 'subTitle',
+ 'subTitleIcon',
+ 'what',
+ 'roles',
+ 'preFilled'
)
);
}
@@ -386,7 +394,6 @@ class AccountController extends Controller
// redirect to previous URL.
return redirect($this->getPreviousUri('accounts.edit.uri'));
-
}
diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php
index 3948ecbe01..1be473766c 100644
--- a/app/Http/Controllers/Admin/ConfigurationController.php
+++ b/app/Http/Controllers/Admin/ConfigurationController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin;
-
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\ConfigurationRequest;
use FireflyIII\Support\Facades\FireflyConfig;
@@ -55,7 +54,6 @@ class ConfigurationController extends Controller
return $next($request);
}
);
-
}
/**
@@ -76,7 +74,6 @@ class ConfigurationController extends Controller
'admin.configuration.index',
compact('subTitle', 'subTitleIcon', 'singleUserMode', 'isDemoSite', 'siteOwner')
);
-
}
/**
@@ -99,5 +96,4 @@ class ConfigurationController extends Controller
return Redirect::route('admin.configuration.index');
}
-
}
diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php
index a801448374..1c25ae67d1 100644
--- a/app/Http/Controllers/Admin/HomeController.php
+++ b/app/Http/Controllers/Admin/HomeController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin;
-
use FireflyIII\Events\AdminRequestedTestMessage;
use FireflyIII\Http\Controllers\Controller;
use Illuminate\Http\Request;
@@ -62,5 +61,4 @@ class HomeController extends Controller
return redirect(route('admin.index'));
}
-
}
diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php
index 4b11b5a7be..ee25cab6a7 100644
--- a/app/Http/Controllers/Admin/LinkController.php
+++ b/app/Http/Controllers/Admin/LinkController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin;
-
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\LinkTypeFormRequest;
use FireflyIII\Models\LinkType;
@@ -236,5 +235,4 @@ class LinkController extends Controller
// redirect to previous URL.
return redirect($this->getPreviousUri('link_types.edit.uri'));
}
-
}
diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php
index f152582b52..e8cf8288cf 100644
--- a/app/Http/Controllers/Admin/UserController.php
+++ b/app/Http/Controllers/Admin/UserController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin;
-
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\UserFormRequest;
use FireflyIII\Repositories\User\UserRepositoryInterface;
@@ -107,7 +106,6 @@ class UserController extends Controller
];
return view('admin.users.edit', compact('user', 'subTitle', 'subTitleIcon', 'codes'));
-
}
/**
@@ -136,7 +134,6 @@ class UserController extends Controller
return view('admin.users.index', compact('subTitle', 'subTitleIcon', 'users'));
-
}
/**
@@ -156,7 +153,12 @@ class UserController extends Controller
return view(
'admin.users.show',
compact(
- 'title', 'mainTitleIcon', 'subTitle', 'subTitleIcon', 'information', 'user'
+ 'title',
+ 'mainTitleIcon',
+ 'subTitle',
+ 'subTitleIcon',
+ 'information',
+ 'user'
)
);
}
@@ -195,8 +197,5 @@ class UserController extends Controller
// redirect to previous URL.
return redirect($this->getPreviousUri('users.edit.uri'));
-
}
-
-
}
diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php
index 57cdd8be55..e09f8cb8d5 100644
--- a/app/Http/Controllers/AttachmentController.php
+++ b/app/Http/Controllers/AttachmentController.php
@@ -108,7 +108,6 @@ class AttachmentController extends Controller
*/
public function download(AttachmentRepositoryInterface $repository, Attachment $attachment)
{
-
if ($repository->exists($attachment)) {
$content = $repository->getContent($attachment);
$quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\'));
@@ -198,7 +197,5 @@ class AttachmentController extends Controller
// redirect to previous URL.
return redirect($this->getPreviousUri('attachments.edit.uri'));
-
}
-
}
diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php
index be79510661..82f1f40c44 100644
--- a/app/Http/Controllers/Auth/ForgotPasswordController.php
+++ b/app/Http/Controllers/Auth/ForgotPasswordController.php
@@ -59,6 +59,5 @@ class ForgotPasswordController extends Controller
{
parent::__construct();
$this->middleware('guest');
-
}
}
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index caa33aa923..f6f1a986a5 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -42,7 +42,6 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Schema;
-
class LoginController extends Controller
{
/*
@@ -85,16 +84,16 @@ class LoginController extends Controller
// check for presence of tables:
$hasTable = Schema::hasTable('users');
- if(!$hasTable) {
+ if (!$hasTable) {
$message = 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?';
- return view('error',compact('message'));
+ return view('error', compact('message'));
}
// check for presence of currency:
- $currency = TransactionCurrency::where('code','EUR')->first();
- if(is_null($currency)) {
+ $currency = TransactionCurrency::where('code', 'EUR')->first();
+ if (is_null($currency)) {
$message = 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?';
- return view('error',compact('message'));
+ return view('error', compact('message'));
}
// forget 2fa cookie:
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php
index 0a4df46b9d..8bea5e15da 100644
--- a/app/Http/Controllers/Auth/RegisterController.php
+++ b/app/Http/Controllers/Auth/RegisterController.php
@@ -158,7 +158,8 @@ class RegisterController extends Controller
protected function validator(array $data)
{
return Validator::make(
- $data, [
+ $data,
+ [
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|secure_password|confirmed',
]
diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php
index 573104a91c..2a9fd275c3 100644
--- a/app/Http/Controllers/Auth/TwoFactorController.php
+++ b/app/Http/Controllers/Auth/TwoFactorController.php
@@ -49,7 +49,6 @@ class TwoFactorController extends Controller
*/
public function index(Request $request)
{
-
$user = auth()->user();
// to make sure the validator in the next step gets the secret, we push it in session
@@ -105,5 +104,4 @@ class TwoFactorController extends Controller
return redirect(route('home'))->withCookie($cookie);
}
-
}
diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php
index 98ce6dcc98..55bbbaba06 100644
--- a/app/Http/Controllers/BillController.php
+++ b/app/Http/Controllers/BillController.php
@@ -264,7 +264,6 @@ class BillController extends Controller
// redirect to previous URL.
return redirect($this->getPreviousUri('bills.create.uri'));
-
}
/**
@@ -291,7 +290,5 @@ class BillController extends Controller
}
return redirect($this->getPreviousUri('bills.edit.uri'));
-
}
-
}
diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php
index c9c27fd605..fdcfc77ec6 100644
--- a/app/Http/Controllers/BudgetController.php
+++ b/app/Http/Controllers/BudgetController.php
@@ -94,7 +94,6 @@ class BudgetController extends Controller
Preferences::mark();
return Response::json(['name' => $budget->name, 'limit' => $budgetLimit ? $budgetLimit->id : 0, 'amount' => $amount]);
-
}
/**
@@ -142,7 +141,6 @@ class BudgetController extends Controller
*/
public function destroy(Request $request, Budget $budget)
{
-
$name = $budget->name;
$this->repository->destroy($budget);
$request->session()->flash('success', strval(trans('firefly.deleted_budget', ['name' => $name])));
@@ -170,7 +168,6 @@ class BudgetController extends Controller
$request->session()->flash('gaEventAction', 'edit');
return view('budgets.edit', compact('budget', 'subTitle'));
-
}
/**
@@ -246,9 +243,23 @@ class BudgetController extends Controller
return view(
'budgets.index',
compact(
- 'available', 'currentMonth', 'next', 'nextText', 'prev', 'prevText',
- 'periodStart', 'periodEnd', 'budgetInformation', 'inactive', 'budgets',
- 'spent', 'budgeted', 'previousLoop', 'nextLoop', 'start', 'end'
+ 'available',
+ 'currentMonth',
+ 'next',
+ 'nextText',
+ 'prev',
+ 'prevText',
+ 'periodStart',
+ 'periodEnd',
+ 'budgetInformation',
+ 'inactive',
+ 'budgets',
+ 'spent',
+ 'budgeted',
+ 'previousLoop',
+ 'nextLoop',
+ 'start',
+ 'end'
)
);
}
@@ -442,7 +453,8 @@ class BudgetController extends Controller
$page = intval($request->get('page'));
$pageSize = intval(Preferences::get('transactionPageSize', 50)->data);
$subTitle = trans(
- 'firefly.budget_in_period', [
+ 'firefly.budget_in_period',
+ [
'name' => $budget->name,
'start' => $budgetLimit->start_date->formatLocalized($this->monthAndDayFormat),
'end' => $budgetLimit->end_date->formatLocalized($this->monthAndDayFormat),
@@ -461,7 +473,6 @@ class BudgetController extends Controller
$limits = $this->getLimits($budget, $start, $end);
return view('budgets.show', compact('limits', 'budget', 'budgetLimit', 'transactions', 'subTitle'));
-
}
/**
@@ -601,5 +612,4 @@ class BudgetController extends Controller
return $entries;
}
-
}
diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php
index 8b0d41fa10..2ebd43efa6 100644
--- a/app/Http/Controllers/CategoryController.php
+++ b/app/Http/Controllers/CategoryController.php
@@ -114,7 +114,6 @@ class CategoryController extends Controller
*/
public function destroy(Request $request, CategoryRepositoryInterface $repository, Category $category)
{
-
$name = $category->name;
$repository->destroy($category);
@@ -143,7 +142,6 @@ class CategoryController extends Controller
$request->session()->flash('gaEventAction', 'edit');
return view('categories.edit', compact('category', 'subTitle'));
-
}
/**
@@ -487,5 +485,4 @@ class CategoryController extends Controller
return $entries;
}
-
}
diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php
index 182d472fa3..04981b69cb 100644
--- a/app/Http/Controllers/Chart/AccountController.php
+++ b/app/Http/Controllers/Chart/AccountController.php
@@ -243,7 +243,6 @@ class AccountController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
@@ -326,7 +325,6 @@ class AccountController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
@@ -580,5 +578,4 @@ class AccountController extends Controller
return $return;
}
-
}
diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php
index 58f650150b..6ebb6222bb 100644
--- a/app/Http/Controllers/Chart/BudgetController.php
+++ b/app/Http/Controllers/Chart/BudgetController.php
@@ -208,7 +208,6 @@ class BudgetController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
@@ -255,7 +254,6 @@ class BudgetController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
@@ -301,7 +299,6 @@ class BudgetController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
diff --git a/app/Http/Controllers/Chart/BudgetReportController.php b/app/Http/Controllers/Chart/BudgetReportController.php
index 517ec450ef..62b3b07f3a 100644
--- a/app/Http/Controllers/Chart/BudgetReportController.php
+++ b/app/Http/Controllers/Chart/BudgetReportController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Chart;
-
use Carbon\Carbon;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Helpers\Chart\MetaPieChartInterface;
@@ -95,7 +94,6 @@ class BudgetReportController extends Controller
$data = $this->generator->pieChart($chartData);
return Response::json($data);
-
}
/**
@@ -277,5 +275,4 @@ class BudgetReportController extends Controller
return $grouped;
}
-
}
diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php
index 44a6a439f2..83b5cbd656 100644
--- a/app/Http/Controllers/Chart/CategoryController.php
+++ b/app/Http/Controllers/Chart/CategoryController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Chart;
-
use Carbon\Carbon;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Http\Controllers\Controller;
@@ -120,7 +119,6 @@ class CategoryController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
@@ -269,7 +267,6 @@ class CategoryController extends Controller
$chartData[0]['entries'][$label] = bcmul($spent, '-1');
$chartData[1]['entries'][$label] = $earned;
$chartData[2]['entries'][$label] = $sum;
-
}
$data = $this->generator->multiSet($chartData);
$cache->store($data);
@@ -358,7 +355,5 @@ class CategoryController extends Controller
$cache->store($data);
return $data;
-
}
-
}
diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php
index 92e5e5e756..1fea301d5a 100644
--- a/app/Http/Controllers/Chart/CategoryReportController.php
+++ b/app/Http/Controllers/Chart/CategoryReportController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Chart;
-
use Carbon\Carbon;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Helpers\Chart\MetaPieChartInterface;
@@ -41,7 +40,6 @@ use Illuminate\Support\Collection;
use Navigation;
use Response;
-
/**
* Separate controller because many helper functions are shared.
*
diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php
index b5f8ffdbd0..275fab7f68 100644
--- a/app/Http/Controllers/Chart/PiggyBankController.php
+++ b/app/Http/Controllers/Chart/PiggyBankController.php
@@ -31,7 +31,6 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
use FireflyIII\Support\CacheProperties;
use Response;
-
/**
* Class PiggyBankController
*
@@ -86,6 +85,5 @@ class PiggyBankController extends Controller
$cache->store($data);
return Response::json($data);
-
}
}
diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php
index 29d84f6a91..5ffe130df5 100644
--- a/app/Http/Controllers/Chart/ReportController.php
+++ b/app/Http/Controllers/Chart/ReportController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Chart;
-
use Carbon\Carbon;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Http\Controllers\Controller;
@@ -149,7 +148,6 @@ class ReportController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
@@ -224,7 +222,6 @@ class ReportController extends Controller
$cache->store($data);
return Response::json($data);
-
}
/**
@@ -270,14 +267,14 @@ class ReportController extends Controller
$tasker = app(AccountTaskerInterface::class);
while ($currentStart <= $end) {
-
$currentEnd = Navigation::endOfPeriod($currentStart, '1M');
$earned = strval(
array_sum(
array_map(
function ($item) {
return $item['sum'];
- }, $tasker->getIncomeReport($currentStart, $currentEnd, $accounts)
+ },
+ $tasker->getIncomeReport($currentStart, $currentEnd, $accounts)
)
)
);
@@ -287,7 +284,8 @@ class ReportController extends Controller
array_map(
function ($item) {
return $item['sum'];
- }, $tasker->getExpenseReport($currentStart, $currentEnd, $accounts)
+ },
+ $tasker->getExpenseReport($currentStart, $currentEnd, $accounts)
)
)
);
diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php
index 3299d1aa22..6aead89388 100644
--- a/app/Http/Controllers/Chart/TagReportController.php
+++ b/app/Http/Controllers/Chart/TagReportController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Chart;
-
use Carbon\Carbon;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Helpers\Chart\MetaPieChartInterface;
@@ -375,5 +374,4 @@ class TagReportController extends Controller
return $grouped;
}
-
}
diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php
index 89a9293a35..3d7e3e0999 100644
--- a/app/Http/Controllers/Controller.php
+++ b/app/Http/Controllers/Controller.php
@@ -110,7 +110,6 @@ class Controller extends BaseController
return $next($request);
}
);
-
}
/**
@@ -162,7 +161,6 @@ class Controller extends BaseController
if (in_array($account->accountType->type, $valid)) {
return redirect(route('accounts.show', [$account->id]));
}
-
}
// @codeCoverageIgnoreStart
Session::flash('error', strval(trans('firefly.cannot_redirect_to_account')));
@@ -178,5 +176,4 @@ class Controller extends BaseController
{
Session::put($identifier, URL::previous());
}
-
}
diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php
index f06a710c71..62c8e519f9 100644
--- a/app/Http/Controllers/CurrencyController.php
+++ b/app/Http/Controllers/CurrencyController.php
@@ -102,7 +102,6 @@ class CurrencyController extends Controller
*/
public function defaultCurrency(Request $request, TransactionCurrency $currency)
{
-
Preferences::set('currencyPreference', $currency->code);
Preferences::mark();
@@ -111,7 +110,6 @@ class CurrencyController extends Controller
Cache::forget('FFCURRENCYCODE');
return redirect(route('currencies.index'));
-
}
@@ -205,7 +203,6 @@ class CurrencyController extends Controller
$request->session()->flash('gaEventAction', 'edit');
return view('currencies.edit', compact('currency', 'subTitle', 'subTitleIcon'));
-
}
/**
diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php
index 9e1ec777b7..025de96265 100644
--- a/app/Http/Controllers/ExportController.php
+++ b/app/Http/Controllers/ExportController.php
@@ -98,7 +98,6 @@ class ExportController extends Controller
->header('Content-Length', strlen($content));
return $response;
-
}
/**
@@ -134,7 +133,6 @@ class ExportController extends Controller
$today = Carbon::create()->format('Y-m-d');
return view('export.index', compact('job', 'checked', 'accountList', 'formats', 'defaultFormat', 'first', 'today'));
-
}
/**
diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php
index 000b8cb17d..05d3d256f1 100644
--- a/app/Http/Controllers/HelpController.php
+++ b/app/Http/Controllers/HelpController.php
@@ -66,7 +66,6 @@ class HelpController extends Controller
$html = $this->getHelpText($route, $language);
return Response::json(['html' => $html]);
-
}
/**
@@ -112,7 +111,6 @@ class HelpController extends Controller
}
$content = $this->help->getFromGithub($route, $language);
-
}
// help still empty?
@@ -120,11 +118,8 @@ class HelpController extends Controller
$this->help->putInCache($route, $language, $content);
return $content;
-
}
return '<p>' . strval(trans('firefly.route_has_no_help')) . '</p>';
}
-
-
}
diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index 9d7ba8ff45..e6f754dc3e 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -63,7 +63,6 @@ class HomeController extends Controller
*/
public function dateRange(Request $request)
{
-
$start = new Carbon($request->get('start'));
$end = new Carbon($request->get('end'));
$label = $request->get('label');
@@ -122,11 +121,23 @@ class HomeController extends Controller
$logContent = 'Truncated from this point <----|' . substr($logContent, -4096);
return view(
- 'debug', compact(
- 'phpVersion', 'extensions', 'carbon', 'now', 'drivers', 'currentDriver', 'userAgent', 'phpOs', 'interface', 'logContent', 'isDocker', 'isSandstorm','trustedProxies'
+ 'debug',
+ compact(
+ 'phpVersion',
+ 'extensions',
+ 'carbon',
+ 'now',
+ 'drivers',
+ 'currentDriver',
+ 'userAgent',
+ 'phpOs',
+ 'interface',
+ 'logContent',
+ 'isDocker',
+ 'isSandstorm',
+ 'trustedProxies'
)
);
-
}
/**
@@ -176,7 +187,8 @@ class HomeController extends Controller
$subTitle = trans('firefly.welcomeBack');
$transactions = [];
$frontPage = Preferences::get(
- 'frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray()
+ 'frontPageAccounts',
+ $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray()
);
/** @var Carbon $start */
$start = session('start', Carbon::now()->startOfMonth());
@@ -199,7 +211,8 @@ class HomeController extends Controller
}
return view(
- 'index', compact('count', 'subTitle', 'transactions', 'showDeps', 'billCount')
+ 'index',
+ compact('count', 'subTitle', 'transactions', 'showDeps', 'billCount')
);
}
@@ -228,7 +241,6 @@ class HomeController extends Controller
if (!$found) {
echo 'touch ' . $route->getName() . '.md;';
}
-
}
}
@@ -247,5 +259,4 @@ class HomeController extends Controller
return redirect(route('home'));
}
-
}
diff --git a/app/Http/Controllers/Import/BankController.php b/app/Http/Controllers/Import/BankController.php
index d42cc8e6a6..0018673cac 100644
--- a/app/Http/Controllers/Import/BankController.php
+++ b/app/Http/Controllers/Import/BankController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Import;
-
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Support\Import\Information\InformationInterface;
use FireflyIII\Support\Import\Prerequisites\PrerequisitesInterface;
@@ -60,7 +59,6 @@ class BankController extends Controller
$remoteAccounts = $object->getAccounts();
return view('import.bank.form', compact('remoteAccounts', 'bank'));
-
}
/**
@@ -75,7 +73,6 @@ class BankController extends Controller
*/
public function postForm(Request $request, string $bank)
{
-
$class = config(sprintf('firefly.import_pre.%s', $bank));
/** @var PrerequisitesInterface $object */
$object = app($class);
@@ -95,8 +92,6 @@ class BankController extends Controller
// get import file
// get import config
-
-
}
/**
@@ -161,5 +156,4 @@ class BankController extends Controller
return redirect(route('import.bank.form', [$bank]));
}
-
}
diff --git a/app/Http/Controllers/Import/FileController.php b/app/Http/Controllers/Import/FileController.php
index c32a34345a..93950180d3 100644
--- a/app/Http/Controllers/Import/FileController.php
+++ b/app/Http/Controllers/Import/FileController.php
@@ -39,7 +39,6 @@ use Response;
use Session;
use View;
-
/**
* Class FileController.
*
@@ -128,8 +127,6 @@ class FileController extends Controller
->header('Content-Length', strlen($result));
return $response;
-
-
}
/**
diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php
index 4188dfbfcb..aa1720146a 100644
--- a/app/Http/Controllers/ImportController.php
+++ b/app/Http/Controllers/ImportController.php
@@ -72,5 +72,4 @@ class ImportController extends Controller
return view('import.index', compact('subTitle', 'subTitleIcon', 'importFileTypes', 'defaultImportType'));
}
-
}
diff --git a/app/Http/Controllers/JavascriptController.php b/app/Http/Controllers/JavascriptController.php
index 565330c229..5cff2e72f3 100644
--- a/app/Http/Controllers/JavascriptController.php
+++ b/app/Http/Controllers/JavascriptController.php
@@ -182,6 +182,5 @@ class JavascriptController extends Controller
return $return;
-
}
}
diff --git a/app/Http/Controllers/Json/AutoCompleteController.php b/app/Http/Controllers/Json/AutoCompleteController.php
index 35c82ca35d..bdb54ce2b0 100644
--- a/app/Http/Controllers/Json/AutoCompleteController.php
+++ b/app/Http/Controllers/Json/AutoCompleteController.php
@@ -58,7 +58,6 @@ class AutoCompleteController extends Controller
sort($return);
return Response::json($return);
-
}
/**
@@ -111,7 +110,6 @@ class AutoCompleteController extends Controller
*/
public function journalsWithId(JournalCollectorInterface $collector, TransactionJournal $except)
{
-
$cache = new CacheProperties;
$cache->addProperty('recent-journals-id');
@@ -178,5 +176,4 @@ class AutoCompleteController extends Controller
return Response::json($return);
}
-
}
diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php
index 545ba93955..c971426085 100644
--- a/app/Http/Controllers/Json/BoxController.php
+++ b/app/Http/Controllers/Json/BoxController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Json;
-
use Carbon\Carbon;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
use FireflyIII\Http\Controllers\Controller;
@@ -214,5 +213,4 @@ class BoxController extends Controller
return Response::json($return);
}
-
}
diff --git a/app/Http/Controllers/Json/ExchangeController.php b/app/Http/Controllers/Json/ExchangeController.php
index 7d633266b5..38c8a696dd 100644
--- a/app/Http/Controllers/Json/ExchangeController.php
+++ b/app/Http/Controllers/Json/ExchangeController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Json;
-
use Carbon\Carbon;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\TransactionCurrency;
@@ -73,5 +72,4 @@ class ExchangeController extends Controller
return Response::json($return);
}
-
}
diff --git a/app/Http/Controllers/Json/FrontpageController.php b/app/Http/Controllers/Json/FrontpageController.php
index a062b5d394..00af0970ea 100644
--- a/app/Http/Controllers/Json/FrontpageController.php
+++ b/app/Http/Controllers/Json/FrontpageController.php
@@ -61,7 +61,6 @@ class FrontpageController extends Controller
$info[] = $entry;
}
-
}
$html = '';
if (count($info) > 0) {
@@ -70,5 +69,4 @@ class FrontpageController extends Controller
return Response::json(['html' => $html]);
}
-
}
diff --git a/app/Http/Controllers/Json/IntroController.php b/app/Http/Controllers/Json/IntroController.php
index 3a693b500c..df89f71a19 100644
--- a/app/Http/Controllers/Json/IntroController.php
+++ b/app/Http/Controllers/Json/IntroController.php
@@ -56,7 +56,6 @@ class IntroController
// merge arrays and add last step again
$steps = array_merge($steps, $specificSteps);
$steps[] = $lastStep;
-
}
if (!$this->hasOutroStep($route)) {
$steps = array_merge($steps, $specificSteps);
@@ -174,5 +173,4 @@ class IntroController
return $steps;
}
-
}
diff --git a/app/Http/Controllers/Json/TransactionController.php b/app/Http/Controllers/Json/TransactionController.php
index efa08e43d0..5de85266ab 100644
--- a/app/Http/Controllers/Json/TransactionController.php
+++ b/app/Http/Controllers/Json/TransactionController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Json;
-
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
@@ -89,5 +88,4 @@ class TransactionController extends Controller
return Response::json($result);
}
-
}
diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.php
index e3646e111c..1194d4d599 100644
--- a/app/Http/Controllers/JsonController.php
+++ b/app/Http/Controllers/JsonController.php
@@ -105,7 +105,6 @@ class JsonController extends Controller
sort($return);
return Response::json($return);
-
}
/**
@@ -143,5 +142,4 @@ class JsonController extends Controller
return Response::json(['html' => $view]);
}
-
}
diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php
index cc41dd4273..cc7a1f8838 100644
--- a/app/Http/Controllers/NewUserController.php
+++ b/app/Http/Controllers/NewUserController.php
@@ -47,7 +47,6 @@ class NewUserController extends Controller
$this->middleware(
function ($request, $next) {
-
return $next($request);
}
);
@@ -61,7 +60,6 @@ class NewUserController extends Controller
*/
public function index(AccountRepositoryInterface $repository)
{
-
View::share('title', trans('firefly.welcome'));
View::share('mainTitleIcon', 'fa-fire');
@@ -70,7 +68,6 @@ class NewUserController extends Controller
if ($count > 0) {
return redirect(route('index'));
-
}
return view('new-user.index');
@@ -154,5 +151,4 @@ class NewUserController extends Controller
return true;
}
-
}
diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php
index f017f9c0c9..1d092b25b5 100644
--- a/app/Http/Controllers/PiggyBankController.php
+++ b/app/Http/Controllers/PiggyBankController.php
@@ -174,7 +174,6 @@ class PiggyBankController extends Controller
*/
public function edit(AccountRepositoryInterface $repository, PiggyBank $piggyBank)
{
-
$accounts = ExpandedForm::makeSelectList($repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]));
$subTitle = trans('firefly.update_piggy_title', ['name' => $piggyBank->name]);
$subTitleIcon = 'fa-pencil';
@@ -290,7 +289,8 @@ class PiggyBankController extends Controller
if ($repository->canAddAmount($piggyBank, $amount)) {
$repository->addAmount($piggyBank, $amount);
Session::flash(
- 'success', strval(
+ 'success',
+ strval(
trans(
'firefly.added_amount_to_piggy',
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
@@ -304,7 +304,8 @@ class PiggyBankController extends Controller
Log::error('Cannot add ' . $amount . ' because canAddAmount returned false.');
Session::flash(
- 'error', strval(
+ 'error',
+ strval(
trans(
'firefly.cannot_add_amount_piggy',
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
@@ -332,7 +333,8 @@ class PiggyBankController extends Controller
'success',
strval(
trans(
- 'firefly.removed_amount_from_piggy', ['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
+ 'firefly.removed_amount_from_piggy',
+ ['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
)
)
);
@@ -344,7 +346,8 @@ class PiggyBankController extends Controller
$amount = strval(round($request->get('amount'), 12));
Session::flash(
- 'error', strval(
+ 'error',
+ strval(
trans(
'firefly.cannot_remove_from_piggy',
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
@@ -391,7 +394,6 @@ class PiggyBankController extends Controller
$subTitle = e($piggyBank->name);
return view('piggy-banks.show', compact('piggyBank', 'events', 'subTitle', 'note'));
-
}
/**
diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php
index 276f42dcc8..4eeafb197a 100644
--- a/app/Http/Controllers/Popup/ReportController.php
+++ b/app/Http/Controllers/Popup/ReportController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Popup;
-
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collection\BalanceLine;
@@ -80,7 +79,6 @@ class ReportController extends Controller
return $next($request);
}
);
-
}
@@ -119,8 +117,6 @@ class ReportController extends Controller
}
return Response::json(['html' => $html]);
-
-
}
/**
@@ -251,5 +247,4 @@ class ReportController extends Controller
return $attributes;
}
-
}
diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php
index 0b605feb42..30b0a6135a 100644
--- a/app/Http/Controllers/PreferencesController.php
+++ b/app/Http/Controllers/PreferencesController.php
@@ -113,9 +113,18 @@ class PreferencesController extends Controller
return view(
'preferences.index',
compact(
- 'language', 'accounts', 'frontPageAccounts', 'tjOptionalFields',
- 'viewRange', 'customFiscalYear', 'transactionPageSize', 'fiscalYearStart', 'is2faEnabled',
- 'has2faSecret', 'showIncomplete', 'showDeps'
+ 'language',
+ 'accounts',
+ 'frontPageAccounts',
+ 'tjOptionalFields',
+ 'viewRange',
+ 'customFiscalYear',
+ 'transactionPageSize',
+ 'fiscalYearStart',
+ 'is2faEnabled',
+ 'has2faSecret',
+ 'showIncomplete',
+ 'showDeps'
)
);
}
@@ -236,5 +245,4 @@ class PreferencesController extends Controller
return $parts['host'];
}
-
}
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php
index 2a9e37caf4..9c4a398968 100644
--- a/app/Http/Controllers/ProfileController.php
+++ b/app/Http/Controllers/ProfileController.php
@@ -64,7 +64,6 @@ class ProfileController extends Controller
}
);
$this->middleware(IsLimitedUser::class)->except(['confirmEmailChange', 'undoEmailChange']);
-
}
/**
@@ -253,7 +252,7 @@ class ProfileController extends Controller
/**
*
*/
- function regenerate()
+ public function regenerate()
{
$token = auth()->user()->generateAccessToken();
Preferences::set('access_token', $token);
@@ -328,8 +327,5 @@ class ProfileController extends Controller
}
return true;
-
}
-
-
}
diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php
index b2c0edeb8f..1ab913d8df 100644
--- a/app/Http/Controllers/Report/AccountController.php
+++ b/app/Http/Controllers/Report/AccountController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Report;
-
use Carbon\Carbon;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Repositories\Account\AccountTaskerInterface;
diff --git a/app/Http/Controllers/Report/BalanceController.php b/app/Http/Controllers/Report/BalanceController.php
index 5700d1e640..7cb28859fa 100644
--- a/app/Http/Controllers/Report/BalanceController.php
+++ b/app/Http/Controllers/Report/BalanceController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Report;
-
use Carbon\Carbon;
use FireflyIII\Helpers\Report\BalanceReportHelperInterface;
use FireflyIII\Http\Controllers\Controller;
diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php
index 6ebe2a1928..0f82aa54f0 100644
--- a/app/Http/Controllers/Report/BudgetController.php
+++ b/app/Http/Controllers/Report/BudgetController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Report;
-
use Carbon\Carbon;
use FireflyIII\Helpers\Report\BudgetReportHelperInterface;
use FireflyIII\Http\Controllers\Controller;
@@ -68,7 +67,6 @@ class BudgetController extends Controller
$cache->store($result);
return $result;
-
}
/**
diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php
index 5256c9a881..9f681fc7c9 100644
--- a/app/Http/Controllers/Report/CategoryController.php
+++ b/app/Http/Controllers/Report/CategoryController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Report;
-
use Carbon\Carbon;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Category;
@@ -172,6 +171,4 @@ class CategoryController extends Controller
return $data;
}
-
-
}
diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php
index 6397ee6f16..3e33e3c28b 100644
--- a/app/Http/Controllers/Report/OperationsController.php
+++ b/app/Http/Controllers/Report/OperationsController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Report;
-
use Carbon\Carbon;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Repositories\Account\AccountTaskerInterface;
@@ -63,7 +62,6 @@ class OperationsController extends Controller
$cache->store($result);
return $result;
-
}
/**
@@ -92,7 +90,6 @@ class OperationsController extends Controller
$cache->store($result);
return $result;
-
}
/**
@@ -121,7 +118,8 @@ class OperationsController extends Controller
array_map(
function ($item) {
return $item['sum'];
- }, $incomes
+ },
+ $incomes
)
);
@@ -129,7 +127,8 @@ class OperationsController extends Controller
array_map(
function ($item) {
return $item['sum'];
- }, $expenses
+ },
+ $expenses
)
);
@@ -137,7 +136,5 @@ class OperationsController extends Controller
$cache->store($result);
return $result;
-
}
-
}
diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php
index 3b7a33b5d6..1b5a9fb89f 100644
--- a/app/Http/Controllers/ReportController.php
+++ b/app/Http/Controllers/ReportController.php
@@ -69,7 +69,6 @@ class ReportController extends Controller
return $next($request);
}
);
-
}
/**
@@ -89,7 +88,8 @@ class ReportController extends Controller
}
View::share(
- 'subTitle', trans(
+ 'subTitle',
+ trans(
'firefly.report_audit',
[
'start' => $start->formatLocalized($this->monthFormat),
@@ -104,7 +104,6 @@ class ReportController extends Controller
$result = $generator->generate();
return $result;
-
}
/**
@@ -125,7 +124,8 @@ class ReportController extends Controller
}
View::share(
- 'subTitle', trans(
+ 'subTitle',
+ trans(
'firefly.report_budget',
[
'start' => $start->formatLocalized($this->monthFormat),
@@ -140,7 +140,6 @@ class ReportController extends Controller
$result = $generator->generate();
return $result;
-
}
/**
@@ -161,7 +160,8 @@ class ReportController extends Controller
}
View::share(
- 'subTitle', trans(
+ 'subTitle',
+ trans(
'firefly.report_category',
[
'start' => $start->formatLocalized($this->monthFormat),
@@ -176,7 +176,6 @@ class ReportController extends Controller
$result = $generator->generate();
return $result;
-
}
/**
@@ -197,7 +196,8 @@ class ReportController extends Controller
}
View::share(
- 'subTitle', trans(
+ 'subTitle',
+ trans(
'firefly.report_default',
[
'start' => $start->formatLocalized($this->monthFormat),
@@ -211,7 +211,6 @@ class ReportController extends Controller
$result = $generator->generate();
return $result;
-
}
/**
@@ -343,7 +342,8 @@ class ReportController extends Controller
}
View::share(
- 'subTitle', trans(
+ 'subTitle',
+ trans(
'firefly.report_tag',
[
'start' => $start->formatLocalized($this->monthFormat),
@@ -358,7 +358,6 @@ class ReportController extends Controller
$result = $generator->generate();
return $result;
-
}
/**
@@ -372,7 +371,6 @@ class ReportController extends Controller
$result = view('reports.options.budget', compact('budgets'))->render();
return $result;
-
}
/**
@@ -386,7 +384,6 @@ class ReportController extends Controller
$result = view('reports.options.category', compact('categories'))->render();
return $result;
-
}
/**
@@ -412,6 +409,5 @@ class ReportController extends Controller
$result = view('reports.options.tag', compact('tags'))->render();
return $result;
-
}
}
diff --git a/app/Http/Controllers/RuleController.php b/app/Http/Controllers/RuleController.php
index d96c883d66..12a30e77ed 100644
--- a/app/Http/Controllers/RuleController.php
+++ b/app/Http/Controllers/RuleController.php
@@ -110,7 +110,8 @@ class RuleController extends Controller
Session::flash('gaEventAction', 'create-rule');
return view(
- 'rules.rule.create', compact('subTitleIcon', 'oldTriggers', 'oldActions', 'triggerCount', 'actionCount', 'ruleGroup', 'subTitle')
+ 'rules.rule.create',
+ compact('subTitleIcon', 'oldTriggers', 'oldActions', 'triggerCount', 'actionCount', 'ruleGroup', 'subTitle')
);
}
@@ -143,7 +144,6 @@ class RuleController extends Controller
*/
public function destroy(RuleRepositoryInterface $repository, Rule $rule)
{
-
$title = $rule->title;
$repository->destroy($rule);
@@ -164,7 +164,6 @@ class RuleController extends Controller
$repository->moveDown($rule);
return redirect(route('rules.index'));
-
}
/**
@@ -212,9 +211,16 @@ class RuleController extends Controller
Session::flash('gaEventAction', 'edit-rule');
return view(
- 'rules.rule.edit', compact(
- 'rule', 'subTitle',
- 'primaryTrigger', 'oldTriggers', 'oldActions', 'triggerCount', 'actionCount', 'ruleGroups'
+ 'rules.rule.edit',
+ compact(
+ 'rule',
+ 'subTitle',
+ 'primaryTrigger',
+ 'oldTriggers',
+ 'oldActions',
+ 'triggerCount',
+ 'actionCount',
+ 'ruleGroups'
)
);
}
@@ -283,7 +289,6 @@ class RuleController extends Controller
}
return Response::json('true');
-
}
/**
@@ -301,7 +306,6 @@ class RuleController extends Controller
}
return Response::json('true');
-
}
/**
@@ -411,7 +415,6 @@ class RuleController extends Controller
*/
public function testTriggersByRule(Rule $rule)
{
-
$triggers = $rule->ruleTriggers;
if (count($triggers) === 0) {
@@ -454,7 +457,6 @@ class RuleController extends Controller
$repository->moveUp($rule);
return redirect(route('rules.index'));
-
}
/**
@@ -510,7 +512,6 @@ class RuleController extends Controller
$repository->store($data);
}
-
}
/**
@@ -655,7 +656,6 @@ class RuleController extends Controller
*/
private function getValidTriggerList(TestRuleFormRequest $request): array
{
-
$triggers = [];
$data = [
'rule-triggers' => $request->get('rule-trigger'),
@@ -675,6 +675,4 @@ class RuleController extends Controller
return $triggers;
}
-
-
}
diff --git a/app/Http/Controllers/RuleGroupController.php b/app/Http/Controllers/RuleGroupController.php
index 6e0d16f0fd..ff7859cbdb 100644
--- a/app/Http/Controllers/RuleGroupController.php
+++ b/app/Http/Controllers/RuleGroupController.php
@@ -111,7 +111,6 @@ class RuleGroupController extends Controller
*/
public function destroy(Request $request, RuleGroupRepositoryInterface $repository, RuleGroup $ruleGroup)
{
-
$title = $ruleGroup->title;
$moveTo = auth()->user()->ruleGroups()->find(intval($request->get('move_rules_before_delete')));
@@ -135,7 +134,6 @@ class RuleGroupController extends Controller
$repository->moveDown($ruleGroup);
return redirect(route('rules.index'));
-
}
/**
@@ -156,7 +154,6 @@ class RuleGroupController extends Controller
Session::flash('gaEventAction', 'edit-rule-group');
return view('rules.rule-group.edit', compact('ruleGroup', 'subTitle'));
-
}
/**
@@ -248,7 +245,6 @@ class RuleGroupController extends Controller
$repository->moveUp($ruleGroup);
return redirect(route('rules.index'));
-
}
/**
@@ -281,6 +277,5 @@ class RuleGroupController extends Controller
// redirect to previous URL.
return redirect($this->getPreviousUri('rule-groups.edit.uri'));
-
}
}
diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php
index b276c7b94e..f6c1d62ba6 100644
--- a/app/Http/Controllers/SearchController.php
+++ b/app/Http/Controllers/SearchController.php
@@ -51,7 +51,6 @@ class SearchController extends Controller
return $next($request);
}
);
-
}
/**
@@ -96,8 +95,5 @@ class SearchController extends Controller
$html = view('search.search', compact('transactions'))->render();
return Response::json(['count' => $transactions->count(), 'html' => $html]);
-
-
}
-
}
diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php
index 49c40a3904..c3f7a310cb 100644
--- a/app/Http/Controllers/TagController.php
+++ b/app/Http/Controllers/TagController.php
@@ -124,7 +124,6 @@ class TagController extends Controller
*/
public function destroy(Tag $tag)
{
-
$tagName = $tag->tag;
$this->repository->destroy($tag);
@@ -284,7 +283,6 @@ class TagController extends Controller
}
return redirect($this->getPreviousUri('tags.create.uri'));
-
}
/**
@@ -356,8 +354,5 @@ class TagController extends Controller
$cache->store($collection);
return $collection;
-
}
-
-
}
diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php
index 9bb9c222e4..aea7f98d97 100644
--- a/app/Http/Controllers/Transaction/ConvertController.php
+++ b/app/Http/Controllers/Transaction/ConvertController.php
@@ -107,9 +107,16 @@ class ConvertController extends Controller
return view(
'transactions.convert',
compact(
- 'sourceType', 'destinationType', 'journal', 'assetAccounts',
- 'positiveAmount', 'sourceAccount', 'destinationAccount', 'sourceType',
- 'subTitle', 'subTitleIcon'
+ 'sourceType',
+ 'destinationType',
+ 'journal',
+ 'assetAccounts',
+ 'positiveAmount',
+ 'sourceAccount',
+ 'destinationAccount',
+ 'sourceType',
+ 'subTitle',
+ 'subTitleIcon'
)
);
@@ -271,7 +278,5 @@ class ConvertController extends Controller
}
return $source;
-
}
-
}
diff --git a/app/Http/Controllers/Transaction/LinkController.php b/app/Http/Controllers/Transaction/LinkController.php
index cf86c8c639..42cc68786b 100644
--- a/app/Http/Controllers/Transaction/LinkController.php
+++ b/app/Http/Controllers/Transaction/LinkController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Transaction;
-
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\JournalLinkRequest;
use FireflyIII\Models\TransactionJournal;
@@ -60,7 +59,6 @@ class LinkController extends Controller
return $next($request);
}
);
-
}
@@ -103,7 +101,10 @@ class LinkController extends Controller
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function store(
- JournalLinkRequest $request, LinkTypeRepositoryInterface $repository, JournalRepositoryInterface $journalRepository, TransactionJournal $journal
+ JournalLinkRequest $request,
+ LinkTypeRepositoryInterface $repository,
+ JournalRepositoryInterface $journalRepository,
+ TransactionJournal $journal
) {
$linkInfo = $request->getLinkInfo();
if ($linkInfo['transaction_journal_id'] === 0) {
@@ -150,10 +151,8 @@ class LinkController extends Controller
*/
public function switch(LinkTypeRepositoryInterface $repository, TransactionJournalLink $link)
{
-
$repository->switchLink($link);
return redirect(URL::previous());
}
-
}
diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php
index a88b9620ca..1add0b245e 100644
--- a/app/Http/Controllers/Transaction/MassController.php
+++ b/app/Http/Controllers/Transaction/MassController.php
@@ -78,7 +78,6 @@ class MassController extends Controller
Session::flash('gaEventAction', 'mass-delete');
return view('transactions.mass-delete', compact('journals', 'subTitle'));
-
}
/**
@@ -115,7 +114,6 @@ class MassController extends Controller
// redirect to previous URL:
return redirect($this->getPreviousUri('transactions.mass-delete.uri'));
-
}
@@ -161,7 +159,7 @@ class MassController extends Controller
}
// cannot edit reconciled transactions / journals:
- if($journal->transactions->first()->reconciled) {
+ if ($journal->transactions->first()->reconciled) {
$messages[] = trans('firefly.cannot_edit_reconciled', ['description' => $journal->description, 'id' => $journal->id]);
continue;
}
@@ -270,13 +268,11 @@ class MassController extends Controller
$count++;
}
}
-
}
Preferences::mark();
Session::flash('success', trans('firefly.mass_edited_transactions_success', ['amount' => $count]));
// redirect to previous URL:
return redirect($this->getPreviousUri('transactions.mass-edit.uri'));
-
}
}
diff --git a/app/Http/Controllers/Transaction/SingleController.php b/app/Http/Controllers/Transaction/SingleController.php
index 1d774223e3..ba260c7e1c 100644
--- a/app/Http/Controllers/Transaction/SingleController.php
+++ b/app/Http/Controllers/Transaction/SingleController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Transaction;
-
use Carbon\Carbon;
use ExpandedForm;
use FireflyIII\Events\StoredTransactionJournal;
@@ -99,7 +98,6 @@ class SingleController extends Controller
return $next($request);
}
);
-
}
public function cloneTransaction(TransactionJournal $journal)
@@ -214,8 +212,6 @@ class SingleController extends Controller
Session::flash('gaEventAction', 'delete-' . $what);
return view('transactions.single.delete', compact('journal', 'subTitle', 'what'));
-
-
}
/**
diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php
index 256e15c9eb..1a0e994b9c 100644
--- a/app/Http/Controllers/Transaction/SplitController.php
+++ b/app/Http/Controllers/Transaction/SplitController.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Transaction;
-
use ExpandedForm;
use FireflyIII\Events\UpdatedTransactionJournal;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
@@ -136,9 +135,17 @@ class SplitController extends Controller
return view(
'transactions.split.edit',
compact(
- 'subTitleIcon', 'currencies', 'optionalFields',
- 'preFilled', 'subTitle', 'uploadSize', 'assetAccounts',
- 'budgets', 'journal', 'accountArray', 'previous'
+ 'subTitleIcon',
+ 'currencies',
+ 'optionalFields',
+ 'preFilled',
+ 'subTitle',
+ 'uploadSize',
+ 'assetAccounts',
+ 'budgets',
+ 'journal',
+ 'accountArray',
+ 'previous'
)
);
}
@@ -306,7 +313,6 @@ class SplitController extends Controller
}
$return[] = $set;
-
}
return $return;
@@ -322,7 +328,6 @@ class SplitController extends Controller
$return = [];
$transactions = $request->get('transactions');
foreach ($transactions as $transaction) {
-
$return[] = [
'description' => $transaction['description'],
'source_account_id' => $transaction['source_account_id'] ?? 0,
@@ -373,6 +378,4 @@ class SplitController extends Controller
return $array;
}
-
-
}
diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php
index 7b9393909e..9e64cb5c10 100644
--- a/app/Http/Controllers/TransactionController.php
+++ b/app/Http/Controllers/TransactionController.php
@@ -64,7 +64,6 @@ class TransactionController extends Controller
return $next($request);
}
);
-
}
/**
@@ -130,7 +129,6 @@ class TransactionController extends Controller
return view('transactions.index', compact('subTitle', 'what', 'subTitleIcon', 'transactions', 'periods', 'start', 'end', 'moment'));
-
}
/**
@@ -146,7 +144,6 @@ class TransactionController extends Controller
$repository->reconcile($transaction);
}
-
}
/**
@@ -173,7 +170,6 @@ class TransactionController extends Controller
Preferences::mark();
return Response::json([true]);
-
}
/**
@@ -300,5 +296,4 @@ class TransactionController extends Controller
return $return;
}
-
}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 02130a9c93..8f2808c3d8 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -57,7 +57,6 @@ use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Routing\Middleware\ThrottleRequests;
use Illuminate\View\Middleware\ShareErrorsFromSession;
-
class Kernel extends HttpKernel
{
/**
diff --git a/app/Http/Middleware/Binder.php b/app/Http/Middleware/Binder.php
index f635600c36..35b14b4fe1 100644
--- a/app/Http/Middleware/Binder.php
+++ b/app/Http/Middleware/Binder.php
@@ -27,7 +27,6 @@ use Closure;
use FireflyIII\Support\Domain;
use Illuminate\Http\Request;
-
/**
* Class Binder
*
diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php
index 673775747a..6e55ff3c56 100644
--- a/app/Http/Middleware/Range.php
+++ b/app/Http/Middleware/Range.php
@@ -35,7 +35,6 @@ use Preferences;
use Session;
use View;
-
/**
* Class SessionFilter
*
@@ -85,7 +84,6 @@ class Range
}
return $next($request);
-
}
/**
@@ -132,7 +130,6 @@ class Range
{
// ignore preference. set the range to be the current month:
if (!Session::has('start') && !Session::has('end')) {
-
$viewRange = Preferences::get('viewRange', '1M')->data;
$start = new Carbon;
$start = Navigation::updateStartDate($viewRange, $start);
@@ -153,5 +150,4 @@ class Range
Session::put('first', $first);
}
}
-
}
diff --git a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php
index 1a60c762fb..31fc050329 100644
--- a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php
+++ b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php
@@ -28,7 +28,6 @@ use Cookie;
use Illuminate\Support\Facades\Auth;
use Preferences;
-
/**
* Class RedirectIfTwoFactorAuthenticated
*
@@ -48,7 +47,6 @@ class RedirectIfTwoFactorAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
-
$is2faEnabled = Preferences::get('twoFactorAuthEnabled', false)->data;
$has2faSecret = !is_null(Preferences::get('twoFactorAuthSecret'));
diff --git a/app/Http/Middleware/Sandstorm.php b/app/Http/Middleware/Sandstorm.php
index c67298e711..b714853bd4 100644
--- a/app/Http/Middleware/Sandstorm.php
+++ b/app/Http/Middleware/Sandstorm.php
@@ -117,7 +117,6 @@ class Sandstorm
if ($count > 1) {
throw new FireflyException('Your Firefly III installation has more than one user, which is weird.');
}
-
}
return $next($request);
diff --git a/app/Http/Middleware/StartFireflySession.php b/app/Http/Middleware/StartFireflySession.php
index 3183e0a035..a4e8604482 100644
--- a/app/Http/Middleware/StartFireflySession.php
+++ b/app/Http/Middleware/StartFireflySession.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Middleware;
-
use Closure;
use Illuminate\Http\Request;
use Illuminate\Session\Middleware\StartSession;
diff --git a/app/Http/Requests/ImportUploadRequest.php b/app/Http/Requests/ImportUploadRequest.php
index 3fa5782bc6..813ad6bbd7 100644
--- a/app/Http/Requests/ImportUploadRequest.php
+++ b/app/Http/Requests/ImportUploadRequest.php
@@ -53,6 +53,5 @@ class ImportUploadRequest extends Request
'import_file_type' => 'required|in:' . join(',', $types),
'configuration_file' => 'file',
];
-
}
}
diff --git a/app/Http/Requests/PiggyBankFormRequest.php b/app/Http/Requests/PiggyBankFormRequest.php
index 3e126a2715..d4525faf88 100644
--- a/app/Http/Requests/PiggyBankFormRequest.php
+++ b/app/Http/Requests/PiggyBankFormRequest.php
@@ -62,7 +62,6 @@ class PiggyBankFormRequest extends Request
*/
public function rules()
{
-
$nameRule = 'required|between:1,255|uniquePiggyBankForUser';
if (intval($this->get('id'))) {
$nameRule = 'required|between:1,255|uniquePiggyBankForUser:' . intval($this->get('id'));
diff --git a/app/Http/Requests/ReportFormRequest.php b/app/Http/Requests/ReportFormRequest.php
index 76761deb3c..fa05499a90 100644
--- a/app/Http/Requests/ReportFormRequest.php
+++ b/app/Http/Requests/ReportFormRequest.php
@@ -183,5 +183,4 @@ class ReportFormRequest extends Request
'report_type' => 'in:audit,default,category,budget,tag',
];
}
-
}
diff --git a/app/Http/Requests/TagFormRequest.php b/app/Http/Requests/TagFormRequest.php
index 2280099ed0..00ae83beed 100644
--- a/app/Http/Requests/TagFormRequest.php
+++ b/app/Http/Requests/TagFormRequest.php
@@ -67,8 +67,6 @@ class TagFormRequest extends Request
];
return $data;
-
-
}
/**
diff --git a/app/Http/breadcrumbs.php b/app/Http/breadcrumbs.php
index aababe0719..3dac647c08 100644
--- a/app/Http/breadcrumbs.php
+++ b/app/Http/breadcrumbs.php
@@ -49,7 +49,6 @@ use Illuminate\Support\Collection;
Breadcrumbs::register(
'home',
function (BreadCrumbGenerator $breadcrumbs) {
-
$breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
}
);
@@ -57,7 +56,6 @@ Breadcrumbs::register(
Breadcrumbs::register(
'index',
function (BreadCrumbGenerator $breadcrumbs) {
-
$breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
}
);
@@ -66,218 +64,237 @@ Breadcrumbs::register(
* ACCOUNTS
*/
Breadcrumbs::register(
- 'accounts.index', function (BreadCrumbGenerator $breadcrumbs, string $what) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.' . strtolower(e($what)) . '_accounts'), route('accounts.index', [$what]));
-}
+ 'accounts.index',
+ function (BreadCrumbGenerator $breadcrumbs, string $what) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.' . strtolower(e($what)) . '_accounts'), route('accounts.index', [$what]));
+ }
);
Breadcrumbs::register(
- 'accounts.create', function (BreadCrumbGenerator $breadcrumbs, string $what) {
- $breadcrumbs->parent('accounts.index', $what);
- $breadcrumbs->push(trans('firefly.new_' . strtolower(e($what)) . '_account'), route('accounts.create', [$what]));
-}
+ 'accounts.create',
+ function (BreadCrumbGenerator $breadcrumbs, string $what) {
+ $breadcrumbs->parent('accounts.index', $what);
+ $breadcrumbs->push(trans('firefly.new_' . strtolower(e($what)) . '_account'), route('accounts.create', [$what]));
+ }
);
Breadcrumbs::register(
- 'accounts.show', function (BreadCrumbGenerator $breadcrumbs, Account $account, string $moment, Carbon $start, Carbon $end) {
- $what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
+ 'accounts.show',
+ function (BreadCrumbGenerator $breadcrumbs, Account $account, string $moment, Carbon $start, Carbon $end) {
+ $what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
- $breadcrumbs->parent('accounts.index', $what);
- $breadcrumbs->push($account->name, route('accounts.show', [$account->id]));
+ $breadcrumbs->parent('accounts.index', $what);
+ $breadcrumbs->push($account->name, route('accounts.show', [$account->id]));
- // push when is all:
- if ($moment === 'all') {
- $breadcrumbs->push(trans('firefly.everything'), route('accounts.show', [$account->id, 'all']));
- }
- // when is specific period or when empty:
- if ($moment !== 'all' && $moment !== '(nothing)') {
- $title = trans(
- 'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
+ // push when is all:
+ if ($moment === 'all') {
+ $breadcrumbs->push(trans('firefly.everything'), route('accounts.show', [$account->id, 'all']));
+ }
+ // when is specific period or when empty:
+ if ($moment !== 'all' && $moment !== '(nothing)') {
+ $title = trans(
+ 'firefly.between_dates_breadcrumb',
+ ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
);
- $breadcrumbs->push($title, route('accounts.show', [$account->id, $moment, $start, $end]));
+ $breadcrumbs->push($title, route('accounts.show', [$account->id, $moment, $start, $end]));
+ }
}
-
-}
);
Breadcrumbs::register(
- 'accounts.delete', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
- $breadcrumbs->parent('accounts.show', $account, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('firefly.delete_account', ['name' => e($account->name)]), route('accounts.delete', [$account->id]));
-}
+ 'accounts.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Account $account) {
+ $breadcrumbs->parent('accounts.show', $account, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('firefly.delete_account', ['name' => e($account->name)]), route('accounts.delete', [$account->id]));
+ }
);
Breadcrumbs::register(
- 'accounts.edit', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
- $breadcrumbs->parent('accounts.show', $account, '(nothing)', new Carbon, new Carbon);
- $what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
+ 'accounts.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Account $account) {
+ $breadcrumbs->parent('accounts.show', $account, '(nothing)', new Carbon, new Carbon);
+ $what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
- $breadcrumbs->push(trans('firefly.edit_' . $what . '_account', ['name' => e($account->name)]), route('accounts.edit', [$account->id]));
-}
+ $breadcrumbs->push(trans('firefly.edit_' . $what . '_account', ['name' => e($account->name)]), route('accounts.edit', [$account->id]));
+ }
);
/**
* ADMIN
*/
Breadcrumbs::register(
- 'admin.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.administration'), route('admin.index'));
-}
+ 'admin.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.administration'), route('admin.index'));
+ }
);
Breadcrumbs::register(
- 'admin.users', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('admin.index');
- $breadcrumbs->push(trans('firefly.list_all_users'), route('admin.users'));
-}
+ 'admin.users',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('admin.index');
+ $breadcrumbs->push(trans('firefly.list_all_users'), route('admin.users'));
+ }
);
Breadcrumbs::register(
- 'admin.users.show', function (BreadCrumbGenerator $breadcrumbs, User $user) {
- $breadcrumbs->parent('admin.users');
- $breadcrumbs->push(trans('firefly.single_user_administration', ['email' => $user->email]), route('admin.users.show', [$user->id]));
-}
+ 'admin.users.show',
+ function (BreadCrumbGenerator $breadcrumbs, User $user) {
+ $breadcrumbs->parent('admin.users');
+ $breadcrumbs->push(trans('firefly.single_user_administration', ['email' => $user->email]), route('admin.users.show', [$user->id]));
+ }
);
Breadcrumbs::register(
- 'admin.users.edit', function (BreadCrumbGenerator $breadcrumbs, User $user) {
- $breadcrumbs->parent('admin.users');
- $breadcrumbs->push(trans('firefly.edit_user', ['email' => $user->email]), route('admin.users.edit', [$user->id]));
-}
+ 'admin.users.edit',
+ function (BreadCrumbGenerator $breadcrumbs, User $user) {
+ $breadcrumbs->parent('admin.users');
+ $breadcrumbs->push(trans('firefly.edit_user', ['email' => $user->email]), route('admin.users.edit', [$user->id]));
+ }
);
Breadcrumbs::register(
- 'admin.users.delete', function (BreadCrumbGenerator $breadcrumbs, User $user) {
- $breadcrumbs->parent('admin.users');
- $breadcrumbs->push(trans('firefly.delete_user', ['email' => $user->email]), route('admin.users.delete', [$user->id]));
-}
+ 'admin.users.delete',
+ function (BreadCrumbGenerator $breadcrumbs, User $user) {
+ $breadcrumbs->parent('admin.users');
+ $breadcrumbs->push(trans('firefly.delete_user', ['email' => $user->email]), route('admin.users.delete', [$user->id]));
+ }
);
Breadcrumbs::register(
- 'admin.users.domains', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('admin.index');
- $breadcrumbs->push(trans('firefly.blocked_domains'), route('admin.users.domains'));
-}
+ 'admin.users.domains',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('admin.index');
+ $breadcrumbs->push(trans('firefly.blocked_domains'), route('admin.users.domains'));
+ }
);
Breadcrumbs::register(
- 'admin.configuration.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('admin.index');
- $breadcrumbs->push(trans('firefly.instance_configuration'), route('admin.configuration.index'));
-}
+ 'admin.configuration.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('admin.index');
+ $breadcrumbs->push(trans('firefly.instance_configuration'), route('admin.configuration.index'));
+ }
);
Breadcrumbs::register(
- 'admin.links.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('admin.index');
- $breadcrumbs->push(trans('firefly.journal_link_configuration'), route('admin.links.index'));
-}
+ 'admin.links.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('admin.index');
+ $breadcrumbs->push(trans('firefly.journal_link_configuration'), route('admin.links.index'));
+ }
);
Breadcrumbs::register(
- 'admin.links.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('admin.links.index');
- $breadcrumbs->push(trans('firefly.create_new_link_type'), route('admin.links.create'));
-}
+ 'admin.links.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('admin.links.index');
+ $breadcrumbs->push(trans('firefly.create_new_link_type'), route('admin.links.create'));
+ }
);
Breadcrumbs::register(
- 'admin.links.show', function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) {
- $breadcrumbs->parent('admin.links.index');
- $breadcrumbs->push(trans('firefly.overview_for_link', [$linkType->name]), route('admin.links.show', [$linkType->id]));
-}
+ 'admin.links.show',
+ function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) {
+ $breadcrumbs->parent('admin.links.index');
+ $breadcrumbs->push(trans('firefly.overview_for_link', [$linkType->name]), route('admin.links.show', [$linkType->id]));
+ }
);
Breadcrumbs::register(
- 'admin.links.edit', function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) {
- $breadcrumbs->parent('admin.links.index');
- $breadcrumbs->push(trans('firefly.edit_link_type', ['name' => $linkType->name]), route('admin.links.edit', [$linkType->id]));
-}
+ 'admin.links.edit',
+ function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) {
+ $breadcrumbs->parent('admin.links.index');
+ $breadcrumbs->push(trans('firefly.edit_link_type', ['name' => $linkType->name]), route('admin.links.edit', [$linkType->id]));
+ }
);
Breadcrumbs::register(
- 'admin.links.delete', function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) {
- $breadcrumbs->parent('admin.links.index');
- $breadcrumbs->push(trans('firefly.delete_link_type', ['name' => $linkType->name]), route('admin.links.delete', [$linkType->id]));
-}
+ 'admin.links.delete',
+ function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) {
+ $breadcrumbs->parent('admin.links.index');
+ $breadcrumbs->push(trans('firefly.delete_link_type', ['name' => $linkType->name]), route('admin.links.delete', [$linkType->id]));
+ }
);
Breadcrumbs::register(
- 'transactions.link.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionJournalLink $link) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.delete_journal_link'), route('transactions.link.delete', $link->id));
-
-}
+ 'transactions.link.delete',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionJournalLink $link) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.delete_journal_link'), route('transactions.link.delete', $link->id));
+ }
);
/**
* ATTACHMENTS
*/
Breadcrumbs::register(
- 'attachments.edit', function (BreadCrumbGenerator $breadcrumbs, Attachment $attachment) {
- $object = $attachment->attachable;
- if ($object instanceof TransactionJournal) {
- $breadcrumbs->parent('transactions.show', $object);
- $breadcrumbs->push($attachment->filename, route('attachments.edit', [$attachment]));
-
- } else {
- throw new FireflyException('Cannot make breadcrumb for attachment connected to object of type ' . get_class($object));
+ 'attachments.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Attachment $attachment) {
+ $object = $attachment->attachable;
+ if ($object instanceof TransactionJournal) {
+ $breadcrumbs->parent('transactions.show', $object);
+ $breadcrumbs->push($attachment->filename, route('attachments.edit', [$attachment]));
+ } else {
+ throw new FireflyException('Cannot make breadcrumb for attachment connected to object of type ' . get_class($object));
+ }
}
-
-}
);
Breadcrumbs::register(
- 'attachments.delete', function (BreadCrumbGenerator $breadcrumbs, Attachment $attachment) {
-
- $object = $attachment->attachable;
- if ($object instanceof TransactionJournal) {
- $breadcrumbs->parent('transactions.show', $object);
- $breadcrumbs->push(trans('firefly.delete_attachment', ['name' => $attachment->filename]), route('attachments.edit', [$attachment]));
-
- } else {
- throw new FireflyException('Cannot make breadcrumb for attachment connected to object of type ' . get_class($object));
+ 'attachments.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Attachment $attachment) {
+ $object = $attachment->attachable;
+ if ($object instanceof TransactionJournal) {
+ $breadcrumbs->parent('transactions.show', $object);
+ $breadcrumbs->push(trans('firefly.delete_attachment', ['name' => $attachment->filename]), route('attachments.edit', [$attachment]));
+ } else {
+ throw new FireflyException('Cannot make breadcrumb for attachment connected to object of type ' . get_class($object));
+ }
}
-}
);
/**
* BILLS
*/
Breadcrumbs::register(
- 'bills.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.bills'), route('bills.index'));
-}
+ 'bills.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.bills'), route('bills.index'));
+ }
);
Breadcrumbs::register(
- 'bills.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('bills.index');
- $breadcrumbs->push(trans('breadcrumbs.newBill'), route('bills.create'));
-}
+ 'bills.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('bills.index');
+ $breadcrumbs->push(trans('breadcrumbs.newBill'), route('bills.create'));
+ }
);
Breadcrumbs::register(
- 'bills.edit', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
- $breadcrumbs->parent('bills.show', $bill);
- $breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => e($bill->name)]), route('bills.edit', [$bill->id]));
-}
+ 'bills.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
+ $breadcrumbs->parent('bills.show', $bill);
+ $breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => e($bill->name)]), route('bills.edit', [$bill->id]));
+ }
);
Breadcrumbs::register(
- 'bills.delete', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
- $breadcrumbs->parent('bills.show', $bill);
- $breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => e($bill->name)]), route('bills.delete', [$bill->id]));
-}
+ 'bills.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
+ $breadcrumbs->parent('bills.show', $bill);
+ $breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => e($bill->name)]), route('bills.delete', [$bill->id]));
+ }
);
Breadcrumbs::register(
- 'bills.show', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
- $breadcrumbs->parent('bills.index');
- $breadcrumbs->push(e($bill->name), route('bills.show', [$bill->id]));
-
-}
+ 'bills.show',
+ function (BreadCrumbGenerator $breadcrumbs, Bill $bill) {
+ $breadcrumbs->parent('bills.index');
+ $breadcrumbs->push(e($bill->name), route('bills.show', [$bill->id]));
+ }
);
@@ -285,148 +302,161 @@ Breadcrumbs::register(
* BUDGETS
*/
Breadcrumbs::register(
- 'budgets.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.budgets'), route('budgets.index'));
-}
+ 'budgets.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.budgets'), route('budgets.index'));
+ }
);
Breadcrumbs::register(
- 'budgets.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('budgets.index');
- $breadcrumbs->push(trans('firefly.create_new_budget'), route('budgets.create'));
-}
+ 'budgets.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('budgets.index');
+ $breadcrumbs->push(trans('firefly.create_new_budget'), route('budgets.create'));
+ }
);
Breadcrumbs::register(
- 'budgets.edit', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
- $breadcrumbs->parent('budgets.show', $budget);
- $breadcrumbs->push(trans('firefly.edit_budget', ['name' => e($budget->name)]), route('budgets.edit', [$budget->id]));
-}
+ 'budgets.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
+ $breadcrumbs->parent('budgets.show', $budget);
+ $breadcrumbs->push(trans('firefly.edit_budget', ['name' => e($budget->name)]), route('budgets.edit', [$budget->id]));
+ }
);
Breadcrumbs::register(
- 'budgets.delete', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
- $breadcrumbs->parent('budgets.show', $budget);
- $breadcrumbs->push(trans('firefly.delete_budget', ['name' => e($budget->name)]), route('budgets.delete', [$budget->id]));
-}
+ 'budgets.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
+ $breadcrumbs->parent('budgets.show', $budget);
+ $breadcrumbs->push(trans('firefly.delete_budget', ['name' => e($budget->name)]), route('budgets.delete', [$budget->id]));
+ }
);
Breadcrumbs::register(
- 'budgets.no-budget', function (BreadCrumbGenerator $breadcrumbs, string $moment, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('budgets.index');
- $breadcrumbs->push(trans('firefly.journals_without_budget'), route('budgets.no-budget'));
+ 'budgets.no-budget',
+ function (BreadCrumbGenerator $breadcrumbs, string $moment, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('budgets.index');
+ $breadcrumbs->push(trans('firefly.journals_without_budget'), route('budgets.no-budget'));
- // push when is all:
- if ($moment === 'all') {
- $breadcrumbs->push(trans('firefly.everything'), route('budgets.no-budget', ['all']));
- }
- // when is specific period or when empty:
- if ($moment !== 'all' && $moment !== '(nothing)') {
- $title = trans(
- 'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
+ // push when is all:
+ if ($moment === 'all') {
+ $breadcrumbs->push(trans('firefly.everything'), route('budgets.no-budget', ['all']));
+ }
+ // when is specific period or when empty:
+ if ($moment !== 'all' && $moment !== '(nothing)') {
+ $title = trans(
+ 'firefly.between_dates_breadcrumb',
+ ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
);
- $breadcrumbs->push($title, route('budgets.no-budget', [$moment]));
+ $breadcrumbs->push($title, route('budgets.no-budget', [$moment]));
+ }
}
-
-
-}
);
Breadcrumbs::register(
- 'budgets.show', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
- $breadcrumbs->parent('budgets.index');
- $breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
- $breadcrumbs->push(trans('firefly.everything'), route('budgets.show', [$budget->id]));
-}
+ 'budgets.show',
+ function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
+ $breadcrumbs->parent('budgets.index');
+ $breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
+ $breadcrumbs->push(trans('firefly.everything'), route('budgets.show', [$budget->id]));
+ }
);
Breadcrumbs::register(
- 'budgets.show.limit', function (BreadCrumbGenerator $breadcrumbs, Budget $budget, BudgetLimit $budgetLimit) {
- $breadcrumbs->parent('budgets.index');
- $breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
+ 'budgets.show.limit',
+ function (BreadCrumbGenerator $breadcrumbs, Budget $budget, BudgetLimit $budgetLimit) {
+ $breadcrumbs->parent('budgets.index');
+ $breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
- $title = trans(
- 'firefly.between_dates_breadcrumb', ['start' => $budgetLimit->start_date->formatLocalized(strval(trans('config.month_and_day'))),
+ $title = trans(
+ 'firefly.between_dates_breadcrumb',
+ ['start' => $budgetLimit->start_date->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $budgetLimit->end_date->formatLocalized(strval(trans('config.month_and_day'))),]
);
- $breadcrumbs->push(
- $title, route('budgets.show.limit', [$budget->id, $budgetLimit->id])
+ $breadcrumbs->push(
+ $title,
+ route('budgets.show.limit', [$budget->id, $budgetLimit->id])
);
-}
+ }
);
/**
* CATEGORIES
*/
Breadcrumbs::register(
- 'categories.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.categories'), route('categories.index'));
-}
+ 'categories.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.categories'), route('categories.index'));
+ }
);
Breadcrumbs::register(
- 'categories.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('categories.index');
- $breadcrumbs->push(trans('firefly.new_category'), route('categories.create'));
-}
+ 'categories.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('categories.index');
+ $breadcrumbs->push(trans('firefly.new_category'), route('categories.create'));
+ }
);
Breadcrumbs::register(
- 'categories.edit', function (BreadCrumbGenerator $breadcrumbs, Category $category) {
- $breadcrumbs->parent('categories.show', $category, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('firefly.edit_category', ['name' => e($category->name)]), route('categories.edit', [$category->id]));
-}
+ 'categories.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Category $category) {
+ $breadcrumbs->parent('categories.show', $category, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('firefly.edit_category', ['name' => e($category->name)]), route('categories.edit', [$category->id]));
+ }
);
Breadcrumbs::register(
- 'categories.delete', function (BreadCrumbGenerator $breadcrumbs, Category $category) {
- $breadcrumbs->parent('categories.show', $category, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('firefly.delete_category', ['name' => e($category->name)]), route('categories.delete', [$category->id]));
-}
+ 'categories.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Category $category) {
+ $breadcrumbs->parent('categories.show', $category, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('firefly.delete_category', ['name' => e($category->name)]), route('categories.delete', [$category->id]));
+ }
);
Breadcrumbs::register(
- 'categories.show', function (BreadCrumbGenerator $breadcrumbs, Category $category, string $moment, Carbon $start, Carbon $end) {
+ 'categories.show',
+ function (BreadCrumbGenerator $breadcrumbs, Category $category, string $moment, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('categories.index');
+ $breadcrumbs->push($category->name, route('categories.show', [$category->id]));
- $breadcrumbs->parent('categories.index');
- $breadcrumbs->push($category->name, route('categories.show', [$category->id]));
-
- // push when is all:
- if ($moment === 'all') {
- $breadcrumbs->push(trans('firefly.everything'), route('categories.show', [$category->id, 'all']));
- }
- // when is specific period or when empty:
- if ($moment !== 'all' && $moment !== '(nothing)') {
- $title = trans(
- 'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
+ // push when is all:
+ if ($moment === 'all') {
+ $breadcrumbs->push(trans('firefly.everything'), route('categories.show', [$category->id, 'all']));
+ }
+ // when is specific period or when empty:
+ if ($moment !== 'all' && $moment !== '(nothing)') {
+ $title = trans(
+ 'firefly.between_dates_breadcrumb',
+ ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
);
- $breadcrumbs->push($title, route('categories.show', [$category->id, $moment]));
+ $breadcrumbs->push($title, route('categories.show', [$category->id, $moment]));
+ }
}
-}
);
Breadcrumbs::register(
- 'categories.no-category', function (BreadCrumbGenerator $breadcrumbs, string $moment, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('categories.index');
- $breadcrumbs->push(trans('firefly.journals_without_category'), route('categories.no-category'));
+ 'categories.no-category',
+ function (BreadCrumbGenerator $breadcrumbs, string $moment, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('categories.index');
+ $breadcrumbs->push(trans('firefly.journals_without_category'), route('categories.no-category'));
- // push when is all:
- if ($moment === 'all') {
- $breadcrumbs->push(trans('firefly.everything'), route('categories.no-category', ['all']));
- }
- // when is specific period or when empty:
- if ($moment !== 'all' && $moment !== '(nothing)') {
- $title = trans(
- 'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
+ // push when is all:
+ if ($moment === 'all') {
+ $breadcrumbs->push(trans('firefly.everything'), route('categories.no-category', ['all']));
+ }
+ // when is specific period or when empty:
+ if ($moment !== 'all' && $moment !== '(nothing)') {
+ $title = trans(
+ 'firefly.between_dates_breadcrumb',
+ ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
);
- $breadcrumbs->push($title, route('categories.no-category', [$moment]));
+ $breadcrumbs->push($title, route('categories.no-category', [$moment]));
+ }
}
-
-
-}
);
@@ -434,315 +464,350 @@ Breadcrumbs::register(
* CURRENCIES
*/
Breadcrumbs::register(
- 'currencies.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.currencies'), route('currencies.index'));
-}
+ 'currencies.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.currencies'), route('currencies.index'));
+ }
);
Breadcrumbs::register(
- 'currencies.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('currencies.index');
- $breadcrumbs->push(trans('firefly.create_currency'), route('currencies.create'));
-}
+ 'currencies.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('currencies.index');
+ $breadcrumbs->push(trans('firefly.create_currency'), route('currencies.create'));
+ }
);
Breadcrumbs::register(
- 'currencies.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) {
- $breadcrumbs->parent('currencies.index');
- $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currencies.edit', [$currency->id]));
-}
+ 'currencies.edit',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) {
+ $breadcrumbs->parent('currencies.index');
+ $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currencies.edit', [$currency->id]));
+ }
);
Breadcrumbs::register(
- 'currencies.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) {
- $breadcrumbs->parent('currencies.index');
- $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currencies.delete', [$currency->id]));
-}
+ 'currencies.delete',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) {
+ $breadcrumbs->parent('currencies.index');
+ $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currencies.delete', [$currency->id]));
+ }
);
/**
* EXPORT
*/
Breadcrumbs::register(
- 'export.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.export_data'), route('export.index'));
-}
+ 'export.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.export_data'), route('export.index'));
+ }
);
/**
* PIGGY BANKS
*/
Breadcrumbs::register(
- 'piggy-banks.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.piggyBanks'), route('piggy-banks.index'));
-}
+ 'piggy-banks.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.piggyBanks'), route('piggy-banks.index'));
+ }
);
Breadcrumbs::register(
- 'piggy-banks.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('piggy-banks.index');
- $breadcrumbs->push(trans('breadcrumbs.newPiggyBank'), route('piggy-banks.create'));
-}
+ 'piggy-banks.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('piggy-banks.index');
+ $breadcrumbs->push(trans('breadcrumbs.newPiggyBank'), route('piggy-banks.create'));
+ }
);
Breadcrumbs::register(
- 'piggy-banks.edit', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
- $breadcrumbs->parent('piggy-banks.show', $piggyBank);
- $breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => e($piggyBank->name)]), route('piggy-banks.edit', [$piggyBank->id]));
-}
+ 'piggy-banks.edit',
+ function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
+ $breadcrumbs->parent('piggy-banks.show', $piggyBank);
+ $breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => e($piggyBank->name)]), route('piggy-banks.edit', [$piggyBank->id]));
+ }
);
Breadcrumbs::register(
- 'piggy-banks.delete', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
- $breadcrumbs->parent('piggy-banks.show', $piggyBank);
- $breadcrumbs->push(trans('firefly.delete_piggy_bank', ['name' => e($piggyBank->name)]), route('piggy-banks.delete', [$piggyBank->id]));
-}
+ 'piggy-banks.delete',
+ function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
+ $breadcrumbs->parent('piggy-banks.show', $piggyBank);
+ $breadcrumbs->push(trans('firefly.delete_piggy_bank', ['name' => e($piggyBank->name)]), route('piggy-banks.delete', [$piggyBank->id]));
+ }
);
Breadcrumbs::register(
- 'piggy-banks.show', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
- $breadcrumbs->parent('piggy-banks.index');
- $breadcrumbs->push(e($piggyBank->name), route('piggy-banks.show', [$piggyBank->id]));
-}
+ 'piggy-banks.show',
+ function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
+ $breadcrumbs->parent('piggy-banks.index');
+ $breadcrumbs->push(e($piggyBank->name), route('piggy-banks.show', [$piggyBank->id]));
+ }
);
Breadcrumbs::register(
- 'piggy-banks.add-money-mobile', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
- $breadcrumbs->parent('piggy-banks.show', $piggyBank);
- $breadcrumbs->push(trans('firefly.add_money_to_piggy', ['name' => $piggyBank->name]), route('piggy-banks.add-money-mobile', [$piggyBank->id]));
-}
+ 'piggy-banks.add-money-mobile',
+ function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
+ $breadcrumbs->parent('piggy-banks.show', $piggyBank);
+ $breadcrumbs->push(trans('firefly.add_money_to_piggy', ['name' => $piggyBank->name]), route('piggy-banks.add-money-mobile', [$piggyBank->id]));
+ }
);
Breadcrumbs::register(
- 'piggy-banks.remove-money-mobile', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
- $breadcrumbs->parent('piggy-banks.show', $piggyBank);
- $breadcrumbs->push(
- trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]), route('piggy-banks.remove-money-mobile', [$piggyBank->id])
+ 'piggy-banks.remove-money-mobile',
+ function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
+ $breadcrumbs->parent('piggy-banks.show', $piggyBank);
+ $breadcrumbs->push(
+ trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]),
+ route('piggy-banks.remove-money-mobile', [$piggyBank->id])
);
-}
+ }
);
/**
* IMPORT
*/
Breadcrumbs::register(
- 'import.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.import'), route('import.index'));
-}
+ 'import.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.import'), route('import.index'));
+ }
);
/**
* FILE IMPORT
*/
Breadcrumbs::register(
- 'import.file.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('import.index');
- $breadcrumbs->push(trans('firefly.import_file'), route('import.file.index'));
-}
+ 'import.file.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('import.index');
+ $breadcrumbs->push(trans('firefly.import_file'), route('import.file.index'));
+ }
);
Breadcrumbs::register(
- 'import.file.configure', function (BreadCrumbGenerator $breadcrumbs, ImportJob $job) {
- $breadcrumbs->parent('import.file.index');
- $breadcrumbs->push(trans('firefly.import_config_sub_title', ['key' => $job->key]), route('import.file.configure', [$job->key]));
-}
+ 'import.file.configure',
+ function (BreadCrumbGenerator $breadcrumbs, ImportJob $job) {
+ $breadcrumbs->parent('import.file.index');
+ $breadcrumbs->push(trans('firefly.import_config_sub_title', ['key' => $job->key]), route('import.file.configure', [$job->key]));
+ }
);
Breadcrumbs::register(
- 'import.file.status', function (BreadCrumbGenerator $breadcrumbs, ImportJob $job) {
- $breadcrumbs->parent('import.file.index');
- $breadcrumbs->push(trans('firefly.import_status_bread_crumb', ['key' => $job->key]), route('import.file.status', [$job->key]));
-}
+ 'import.file.status',
+ function (BreadCrumbGenerator $breadcrumbs, ImportJob $job) {
+ $breadcrumbs->parent('import.file.index');
+ $breadcrumbs->push(trans('firefly.import_status_bread_crumb', ['key' => $job->key]), route('import.file.status', [$job->key]));
+ }
);
/**
* PREFERENCES
*/
Breadcrumbs::register(
- 'preferences.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index'));
-}
+ 'preferences.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index'));
+ }
);
Breadcrumbs::register(
- 'preferences.code', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index'));
-
-}
+ 'preferences.code',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index'));
+ }
);
/**
* PROFILE
*/
Breadcrumbs::register(
- 'profile.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index'));
-
-}
+ 'profile.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index'));
+ }
);
Breadcrumbs::register(
- 'profile.change-password', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('profile.index');
- $breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password'));
-
-}
+ 'profile.change-password',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('profile.index');
+ $breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password'));
+ }
);
Breadcrumbs::register(
- 'profile.delete-account', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('profile.index');
- $breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account'));
-
-}
+ 'profile.delete-account',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('profile.index');
+ $breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account'));
+ }
);
/**
* REPORTS
*/
Breadcrumbs::register(
- 'reports.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.reports'), route('reports.index'));
-}
+ 'reports.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.reports'), route('reports.index'));
+ }
);
Breadcrumbs::register(
- 'reports.report.audit', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('reports.index');
+ 'reports.report.audit',
+ function (BreadCrumbGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('reports.index');
- $monthFormat = (string)trans('config.month_and_day');
- $startString = $start->formatLocalized($monthFormat);
- $endString = $end->formatLocalized($monthFormat);
- $title = (string)trans('firefly.report_audit', ['start' => $startString, 'end' => $endString]);
+ $monthFormat = (string)trans('config.month_and_day');
+ $startString = $start->formatLocalized($monthFormat);
+ $endString = $end->formatLocalized($monthFormat);
+ $title = (string)trans('firefly.report_audit', ['start' => $startString, 'end' => $endString]);
- $breadcrumbs->push($title, route('reports.report.audit', [$accountIds, $start->format('Ymd'), $end->format('Ymd')]));
-}
+ $breadcrumbs->push($title, route('reports.report.audit', [$accountIds, $start->format('Ymd'), $end->format('Ymd')]));
+ }
);
Breadcrumbs::register(
- 'reports.report.budget', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $budgetIds, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('reports.index');
+ 'reports.report.budget',
+ function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $budgetIds, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('reports.index');
- $monthFormat = (string)trans('config.month_and_day');
- $startString = $start->formatLocalized($monthFormat);
- $endString = $end->formatLocalized($monthFormat);
- $title = (string)trans('firefly.report_budget', ['start' => $startString, 'end' => $endString]);
+ $monthFormat = (string)trans('config.month_and_day');
+ $startString = $start->formatLocalized($monthFormat);
+ $endString = $end->formatLocalized($monthFormat);
+ $title = (string)trans('firefly.report_budget', ['start' => $startString, 'end' => $endString]);
- $breadcrumbs->push($title, route('reports.report.budget', [$accountIds, $budgetIds, $start->format('Ymd'), $end->format('Ymd')]));
-}
+ $breadcrumbs->push($title, route('reports.report.budget', [$accountIds, $budgetIds, $start->format('Ymd'), $end->format('Ymd')]));
+ }
);
Breadcrumbs::register(
- 'reports.report.tag', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $tagTags, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('reports.index');
+ 'reports.report.tag',
+ function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $tagTags, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('reports.index');
- $monthFormat = (string)trans('config.month_and_day');
- $startString = $start->formatLocalized($monthFormat);
- $endString = $end->formatLocalized($monthFormat);
- $title = (string)trans('firefly.report_tag', ['start' => $startString, 'end' => $endString]);
+ $monthFormat = (string)trans('config.month_and_day');
+ $startString = $start->formatLocalized($monthFormat);
+ $endString = $end->formatLocalized($monthFormat);
+ $title = (string)trans('firefly.report_tag', ['start' => $startString, 'end' => $endString]);
- $breadcrumbs->push($title, route('reports.report.tag', [$accountIds, $tagTags, $start->format('Ymd'), $end->format('Ymd')]));
-}
+ $breadcrumbs->push($title, route('reports.report.tag', [$accountIds, $tagTags, $start->format('Ymd'), $end->format('Ymd')]));
+ }
);
Breadcrumbs::register(
- 'reports.report.category', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $categoryIds, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('reports.index');
+ 'reports.report.category',
+ function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $categoryIds, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('reports.index');
- $monthFormat = (string)trans('config.month_and_day');
- $startString = $start->formatLocalized($monthFormat);
- $endString = $end->formatLocalized($monthFormat);
- $title = (string)trans('firefly.report_category', ['start' => $startString, 'end' => $endString]);
+ $monthFormat = (string)trans('config.month_and_day');
+ $startString = $start->formatLocalized($monthFormat);
+ $endString = $end->formatLocalized($monthFormat);
+ $title = (string)trans('firefly.report_category', ['start' => $startString, 'end' => $endString]);
- $breadcrumbs->push($title, route('reports.report.category', [$accountIds, $categoryIds, $start->format('Ymd'), $end->format('Ymd')]));
-}
+ $breadcrumbs->push($title, route('reports.report.category', [$accountIds, $categoryIds, $start->format('Ymd'), $end->format('Ymd')]));
+ }
);
Breadcrumbs::register(
- 'reports.report.default', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('reports.index');
+ 'reports.report.default',
+ function (BreadCrumbGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('reports.index');
- $monthFormat = (string)trans('config.month_and_day');
- $startString = $start->formatLocalized($monthFormat);
- $endString = $end->formatLocalized($monthFormat);
- $title = (string)trans('firefly.report_default', ['start' => $startString, 'end' => $endString]);
+ $monthFormat = (string)trans('config.month_and_day');
+ $startString = $start->formatLocalized($monthFormat);
+ $endString = $end->formatLocalized($monthFormat);
+ $title = (string)trans('firefly.report_default', ['start' => $startString, 'end' => $endString]);
- $breadcrumbs->push($title, route('reports.report.default', [$accountIds, $start->format('Ymd'), $end->format('Ymd')]));
-}
+ $breadcrumbs->push($title, route('reports.report.default', [$accountIds, $start->format('Ymd'), $end->format('Ymd')]));
+ }
);
/**
* New user Controller
*/
Breadcrumbs::register(
- 'new-user.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.getting_started'), route('new-user.index'));
-}
+ 'new-user.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.getting_started'), route('new-user.index'));
+ }
);
/**
* Rules
*/
Breadcrumbs::register(
- 'rules.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('firefly.rules'), route('rules.index'));
-}
+ 'rules.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('firefly.rules'), route('rules.index'));
+ }
);
Breadcrumbs::register(
- 'rules.create', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(trans('firefly.make_new_rule', ['title' => $ruleGroup->title]), route('rules.create', [$ruleGroup]));
-}
+ 'rules.create',
+ function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(trans('firefly.make_new_rule', ['title' => $ruleGroup->title]), route('rules.create', [$ruleGroup]));
+ }
);
Breadcrumbs::register(
- 'rules.edit', function (BreadCrumbGenerator $breadcrumbs, Rule $rule) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(trans('firefly.edit_rule', ['title' => $rule->title]), route('rules.edit', [$rule]));
-}
+ 'rules.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Rule $rule) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(trans('firefly.edit_rule', ['title' => $rule->title]), route('rules.edit', [$rule]));
+ }
);
Breadcrumbs::register(
- 'rules.delete', function (BreadCrumbGenerator $breadcrumbs, Rule $rule) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(trans('firefly.delete_rule', ['title' => $rule->title]), route('rules.delete', [$rule]));
-}
+ 'rules.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Rule $rule) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(trans('firefly.delete_rule', ['title' => $rule->title]), route('rules.delete', [$rule]));
+ }
);
Breadcrumbs::register(
- 'rule-groups.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(trans('firefly.make_new_rule_group'), route('rule-groups.create'));
-}
+ 'rule-groups.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(trans('firefly.make_new_rule_group'), route('rule-groups.create'));
+ }
);
Breadcrumbs::register(
- 'rule-groups.edit', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(trans('firefly.edit_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.edit', [$ruleGroup]));
-}
+ 'rule-groups.edit',
+ function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(trans('firefly.edit_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.edit', [$ruleGroup]));
+ }
);
Breadcrumbs::register(
- 'rule-groups.delete', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.delete', [$ruleGroup]));
-}
+ 'rule-groups.delete',
+ function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.delete', [$ruleGroup]));
+ }
);
Breadcrumbs::register(
- 'rule-groups.select-transactions', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup]));
-}
+ 'rule-groups.select-transactions',
+ function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup]));
+ }
);
Breadcrumbs::register(
- 'rule-groups.select_transactions', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
- $breadcrumbs->parent('rules.index');
- $breadcrumbs->push(
- trans('firefly.execute_group_on_existing_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select_transactions', [$ruleGroup])
+ 'rule-groups.select_transactions',
+ function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
+ $breadcrumbs->parent('rules.index');
+ $breadcrumbs->push(
+ trans('firefly.execute_group_on_existing_transactions', ['title' => $ruleGroup->title]),
+ route('rule-groups.select_transactions', [$ruleGroup])
);
-}
+ }
);
@@ -750,10 +815,11 @@ Breadcrumbs::register(
* SEARCH
*/
Breadcrumbs::register(
- 'search.index', function (BreadCrumbGenerator $breadcrumbs, $query) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.search_result', ['query' => e($query)]), route('search.index'));
-}
+ 'search.index',
+ function (BreadCrumbGenerator $breadcrumbs, $query) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.search_result', ['query' => e($query)]), route('search.index'));
+ }
);
@@ -761,146 +827,154 @@ Breadcrumbs::register(
* TAGS
*/
Breadcrumbs::register(
- 'tags.index', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.tags'), route('tags.index'));
-}
+ 'tags.index',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.tags'), route('tags.index'));
+ }
);
Breadcrumbs::register(
- 'tags.create', function (BreadCrumbGenerator $breadcrumbs) {
- $breadcrumbs->parent('tags.index');
- $breadcrumbs->push(trans('breadcrumbs.createTag'), route('tags.create'));
-}
+ 'tags.create',
+ function (BreadCrumbGenerator $breadcrumbs) {
+ $breadcrumbs->parent('tags.index');
+ $breadcrumbs->push(trans('breadcrumbs.createTag'), route('tags.create'));
+ }
);
Breadcrumbs::register(
- 'tags.edit', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
- $breadcrumbs->parent('tags.show', $tag, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => e($tag->tag)]), route('tags.edit', [$tag->id]));
-}
+ 'tags.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
+ $breadcrumbs->parent('tags.show', $tag, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => e($tag->tag)]), route('tags.edit', [$tag->id]));
+ }
);
Breadcrumbs::register(
- 'tags.delete', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
- $breadcrumbs->parent('tags.show', $tag, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => e($tag->tag)]), route('tags.delete', [$tag->id]));
-}
+ 'tags.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
+ $breadcrumbs->parent('tags.show', $tag, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => e($tag->tag)]), route('tags.delete', [$tag->id]));
+ }
);
Breadcrumbs::register(
- 'tags.show', function (BreadCrumbGenerator $breadcrumbs, Tag $tag, string $moment, Carbon $start, Carbon $end) {
- $breadcrumbs->parent('tags.index');
- $breadcrumbs->push(e($tag->tag), route('tags.show', [$tag->id, $moment]));
- if ($moment === 'all') {
- $breadcrumbs->push(trans('firefly.everything'), route('tags.show', [$tag->id, $moment]));
- }
- // when is specific period or when empty:
- if ($moment !== 'all' && $moment !== '(nothing)') {
- $title = trans(
- 'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
+ 'tags.show',
+ function (BreadCrumbGenerator $breadcrumbs, Tag $tag, string $moment, Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('tags.index');
+ $breadcrumbs->push(e($tag->tag), route('tags.show', [$tag->id, $moment]));
+ if ($moment === 'all') {
+ $breadcrumbs->push(trans('firefly.everything'), route('tags.show', [$tag->id, $moment]));
+ }
+ // when is specific period or when empty:
+ if ($moment !== 'all' && $moment !== '(nothing)') {
+ $title = trans(
+ 'firefly.between_dates_breadcrumb',
+ ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
);
- $breadcrumbs->push($title, route('tags.show', [$tag->id, $moment]));
+ $breadcrumbs->push($title, route('tags.show', [$tag->id, $moment]));
+ }
}
-}
);
/**
* TRANSACTIONS
*/
Breadcrumbs::register(
- 'transactions.index', function (BreadCrumbGenerator $breadcrumbs, string $what, string $moment = '', Carbon $start, Carbon $end) {
-
-
- $breadcrumbs->parent('home');
- $breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what]));
- if ($moment === 'all') {
- $breadcrumbs->push(trans('firefly.everything'), route('transactions.index', [$what, 'all']));
- }
-
- // when is specific period or when empty:
- if ($moment !== 'all' && $moment !== '(nothing)') {
- $title = trans(
- 'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
+ 'transactions.index',
+ function (BreadCrumbGenerator $breadcrumbs, string $what, string $moment = '', Carbon $start, Carbon $end) {
+ $breadcrumbs->parent('home');
+ $breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what]));
+ if ($moment === 'all') {
+ $breadcrumbs->push(trans('firefly.everything'), route('transactions.index', [$what, 'all']));
+ }
+
+ // when is specific period or when empty:
+ if ($moment !== 'all' && $moment !== '(nothing)') {
+ $title = trans(
+ 'firefly.between_dates_breadcrumb',
+ ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
);
- $breadcrumbs->push($title, route('transactions.index', [$what, $moment]));
+ $breadcrumbs->push($title, route('transactions.index', [$what, $moment]));
+ }
}
-
-}
);
Breadcrumbs::register(
- 'transactions.create', function (BreadCrumbGenerator $breadcrumbs, string $what) {
- $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('breadcrumbs.create_' . e($what)), route('transactions.create', [$what]));
-}
+ 'transactions.create',
+ function (BreadCrumbGenerator $breadcrumbs, string $what) {
+ $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('breadcrumbs.create_' . e($what)), route('transactions.create', [$what]));
+ }
);
Breadcrumbs::register(
- 'transactions.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
- $breadcrumbs->parent('transactions.show', $journal);
- $breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.edit', [$journal->id]));
-}
+ 'transactions.edit',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
+ $breadcrumbs->parent('transactions.show', $journal);
+ $breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.edit', [$journal->id]));
+ }
);
Breadcrumbs::register(
- 'transactions.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
- $breadcrumbs->parent('transactions.show', $journal);
- $breadcrumbs->push(trans('breadcrumbs.delete_journal', ['description' => e($journal->description)]), route('transactions.delete', [$journal->id]));
-}
+ 'transactions.delete',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
+ $breadcrumbs->parent('transactions.show', $journal);
+ $breadcrumbs->push(trans('breadcrumbs.delete_journal', ['description' => e($journal->description)]), route('transactions.delete', [$journal->id]));
+ }
);
Breadcrumbs::register(
- 'transactions.show', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
-
- $what = strtolower($journal->transactionType->type);
- $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push($journal->description, route('transactions.show', [$journal->id]));
-}
+ 'transactions.show',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
+ $what = strtolower($journal->transactionType->type);
+ $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push($journal->description, route('transactions.show', [$journal->id]));
+ }
);
Breadcrumbs::register(
- 'transactions.convert', function (BreadCrumbGenerator $breadcrumbs, TransactionType $destinationType, TransactionJournal $journal) {
-
- $breadcrumbs->parent('transactions.show', $journal);
- $breadcrumbs->push(
+ 'transactions.convert',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionType $destinationType, TransactionJournal $journal) {
+ $breadcrumbs->parent('transactions.show', $journal);
+ $breadcrumbs->push(
trans('firefly.convert_to_' . $destinationType->type, ['description' => $journal->description]),
route('transactions.convert.index', [strtolower($destinationType->type), $journal->id])
);
-}
+ }
);
/**
* MASS TRANSACTION EDIT / DELETE
*/
Breadcrumbs::register(
- 'transactions.mass.edit', function (BreadCrumbGenerator $breadcrumbs, Collection $journals): void {
+ 'transactions.mass.edit',
+ function (BreadCrumbGenerator $breadcrumbs, Collection $journals): void {
+ if ($journals->count() > 0) {
+ $journalIds = $journals->pluck('id')->toArray();
+ $what = strtolower($journals->first()->transactionType->type);
+ $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.edit', $journalIds));
- if ($journals->count() > 0) {
- $journalIds = $journals->pluck('id')->toArray();
- $what = strtolower($journals->first()->transactionType->type);
- $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.edit', $journalIds));
+ return;
+ }
+
+ $breadcrumbs->parent('index');
return;
}
-
- $breadcrumbs->parent('index');
-
- return;
-}
);
Breadcrumbs::register(
- 'transactions.mass.delete', function (BreadCrumbGenerator $breadcrumbs, Collection $journals) {
-
- $journalIds = $journals->pluck('id')->toArray();
- $what = strtolower($journals->first()->transactionType->type);
- $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
- $breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.delete', $journalIds));
-}
+ 'transactions.mass.delete',
+ function (BreadCrumbGenerator $breadcrumbs, Collection $journals) {
+ $journalIds = $journals->pluck('id')->toArray();
+ $what = strtolower($journals->first()->transactionType->type);
+ $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
+ $breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.delete', $journalIds));
+ }
);
@@ -908,8 +982,9 @@ Breadcrumbs::register(
* SPLIT
*/
Breadcrumbs::register(
- 'transactions.split.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
- $breadcrumbs->parent('transactions.show', $journal);
- $breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.split.edit', [$journal->id]));
-}
+ 'transactions.split.edit',
+ function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) {
+ $breadcrumbs->parent('transactions.show', $journal);
+ $breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.split.edit', [$journal->id]));
+ }
);
diff --git a/app/Import/Configurator/ConfiguratorInterface.php b/app/Import/Configurator/ConfiguratorInterface.php
index 70a98e55e1..64230bc552 100644
--- a/app/Import/Configurator/ConfiguratorInterface.php
+++ b/app/Import/Configurator/ConfiguratorInterface.php
@@ -80,5 +80,4 @@ interface ConfiguratorInterface
* @return void
*/
public function setJob(ImportJob $job);
-
}
diff --git a/app/Import/Configurator/CsvConfigurator.php b/app/Import/Configurator/CsvConfigurator.php
index 24440ebfa1..217b72b332 100644
--- a/app/Import/Configurator/CsvConfigurator.php
+++ b/app/Import/Configurator/CsvConfigurator.php
@@ -87,7 +87,6 @@ class CsvConfigurator implements ConfiguratorInterface
$object->setJob($job);
return $object->getData();
-
}
/**
diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.php
index 9ed5b426d3..d9e98f73d8 100644
--- a/app/Import/Converter/Amount.php
+++ b/app/Import/Converter/Amount.php
@@ -93,6 +93,5 @@ class Amount implements ConverterInterface
}
return strval(round(floatval($value), 12));
-
}
}
diff --git a/app/Import/Converter/INGDebetCredit.php b/app/Import/Converter/INGDebetCredit.php
index 2ce63b66b5..04eb26cfa3 100644
--- a/app/Import/Converter/INGDebetCredit.php
+++ b/app/Import/Converter/INGDebetCredit.php
@@ -51,6 +51,5 @@ class INGDebetCredit implements ConverterInterface
Log::debug('Return 1');
return 1;
-
}
}
diff --git a/app/Import/FileProcessor/CsvProcessor.php b/app/Import/FileProcessor/CsvProcessor.php
index 956a2da617..7dd6e83da2 100644
--- a/app/Import/FileProcessor/CsvProcessor.php
+++ b/app/Import/FileProcessor/CsvProcessor.php
@@ -285,7 +285,6 @@ class CsvProcessor implements FileProcessorInterface
}
return false;
-
}
/**
@@ -301,7 +300,6 @@ class CsvProcessor implements FileProcessorInterface
$config = $this->job->configuration;
$names = array_keys($config['specifics']);
foreach ($names as $name) {
-
if (!in_array($name, $this->validSpecifics)) {
throw new FireflyException(sprintf('"%s" is not a valid class name', $name));
}
@@ -314,6 +312,5 @@ class CsvProcessor implements FileProcessorInterface
}
return $row;
-
}
}
diff --git a/app/Import/Mapper/AssetAccountIbans.php b/app/Import/Mapper/AssetAccountIbans.php
index 0bcc9407d0..b5d5699529 100644
--- a/app/Import/Mapper/AssetAccountIbans.php
+++ b/app/Import/Mapper/AssetAccountIbans.php
@@ -63,6 +63,5 @@ class AssetAccountIbans implements MapperInterface
$list = [0 => trans('csv.map_do_not_map')] + $list;
return $list;
-
}
}
diff --git a/app/Import/Mapper/AssetAccounts.php b/app/Import/Mapper/AssetAccounts.php
index 936c496ef2..e12b33340d 100644
--- a/app/Import/Mapper/AssetAccounts.php
+++ b/app/Import/Mapper/AssetAccounts.php
@@ -60,6 +60,5 @@ class AssetAccounts implements MapperInterface
$list = [0 => trans('csv.map_do_not_map')] + $list;
return $list;
-
}
}
diff --git a/app/Import/Mapper/Bills.php b/app/Import/Mapper/Bills.php
index 505c9dccd0..8770f8c988 100644
--- a/app/Import/Mapper/Bills.php
+++ b/app/Import/Mapper/Bills.php
@@ -53,6 +53,5 @@ class Bills implements MapperInterface
$list = [0 => trans('csv.map_do_not_map')] + $list;
return $list;
-
}
}
diff --git a/app/Import/Mapper/Budgets.php b/app/Import/Mapper/Budgets.php
index 662b38c815..ab1b8bc151 100644
--- a/app/Import/Mapper/Budgets.php
+++ b/app/Import/Mapper/Budgets.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Mapper;
-
use FireflyIII\Models\Budget;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
@@ -54,6 +53,5 @@ class Budgets implements MapperInterface
$list = [0 => trans('csv.map_do_not_map')] + $list;
return $list;
-
}
}
diff --git a/app/Import/Mapper/Categories.php b/app/Import/Mapper/Categories.php
index 0204012fae..76b3b60f55 100644
--- a/app/Import/Mapper/Categories.php
+++ b/app/Import/Mapper/Categories.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Mapper;
-
use FireflyIII\Models\Category;
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
@@ -54,6 +53,5 @@ class Categories implements MapperInterface
$list = [0 => trans('csv.map_do_not_map')] + $list;
return $list;
-
}
}
diff --git a/app/Import/Mapper/Tags.php b/app/Import/Mapper/Tags.php
index 6294e42cc9..a09a64c260 100644
--- a/app/Import/Mapper/Tags.php
+++ b/app/Import/Mapper/Tags.php
@@ -53,6 +53,5 @@ class Tags implements MapperInterface
$list = [0 => trans('csv.map_do_not_map')] + $list;
return $list;
-
}
}
diff --git a/app/Import/Mapper/TransactionCurrencies.php b/app/Import/Mapper/TransactionCurrencies.php
index ac8a969a58..2ba0703bd1 100644
--- a/app/Import/Mapper/TransactionCurrencies.php
+++ b/app/Import/Mapper/TransactionCurrencies.php
@@ -49,6 +49,5 @@ class TransactionCurrencies implements MapperInterface
$list = [0 => trans('csv.map_do_not_map')] + $list;
return $list;
-
}
}
diff --git a/app/Import/MapperPreProcess/PreProcessorInterface.php b/app/Import/MapperPreProcess/PreProcessorInterface.php
index 5de7418756..5c302557df 100644
--- a/app/Import/MapperPreProcess/PreProcessorInterface.php
+++ b/app/Import/MapperPreProcess/PreProcessorInterface.php
@@ -36,5 +36,4 @@ interface PreProcessorInterface
* @return array
*/
public function run(string $value): array;
-
}
diff --git a/app/Import/Object/ImportAccount.php b/app/Import/Object/ImportAccount.php
index d48d4a3ea1..7a26cf9f29 100644
--- a/app/Import/Object/ImportAccount.php
+++ b/app/Import/Object/ImportAccount.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Object;
-
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
@@ -179,7 +178,8 @@ class ImportAccount
Log::debug(sprintf('Finding account of type %d and ID %d', $accountType->id, $this->accountId['value']));
/** @var Account $account */
$account = $this->user->accounts()->where('id', '!=', $this->forbiddenAccountId)->where('account_type_id', $accountType->id)->where(
- 'id', $this->accountId['value']
+ 'id',
+ $this->accountId['value']
)->first();
if (!is_null($account)) {
Log::debug(sprintf('Found unmapped %s account by ID (#%d): %s', $this->expectedType, $account->id, $account->name));
@@ -239,7 +239,6 @@ class ImportAccount
Log::debug('Found NO existing accounts.');
return new Account;
-
}
/**
@@ -259,7 +258,6 @@ class ImportAccount
return $mapped;
}
-
}
Log::debug('Found no account on mapped data or no map present.');
@@ -302,7 +300,9 @@ class ImportAccount
if ($account->accountType->type !== $this->expectedType && $account->accountType->type !== AccountType::ASSET) {
Log::error(
sprintf(
- 'Mapped account #%d is of type "%s" but we expect a "%s"-account. Mapping will be ignored.', $account->id, $account->accountType->type,
+ 'Mapped account #%d is of type "%s" but we expect a "%s"-account. Mapping will be ignored.',
+ $account->id,
+ $account->accountType->type,
$this->expectedType
)
);
@@ -372,6 +372,4 @@ class ImportAccount
return true;
}
-
-
}
diff --git a/app/Import/Object/ImportBill.php b/app/Import/Object/ImportBill.php
index 769b8241d1..5a17423b6c 100644
--- a/app/Import/Object/ImportBill.php
+++ b/app/Import/Object/ImportBill.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Object;
-
use FireflyIII\Models\Bill;
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
use FireflyIII\User;
@@ -154,7 +153,6 @@ class ImportBill
Log::debug('Found NO existing bills.');
return new Bill;
-
}
/**
@@ -174,7 +172,6 @@ class ImportBill
return $mapped;
}
-
}
Log::debug('Found no bill on mapped data or no map present.');
@@ -264,5 +261,4 @@ class ImportBill
return true;
}
-
}
diff --git a/app/Import/Object/ImportBudget.php b/app/Import/Object/ImportBudget.php
index cef49e677d..456eb466ce 100644
--- a/app/Import/Object/ImportBudget.php
+++ b/app/Import/Object/ImportBudget.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Object;
-
use FireflyIII\Models\Budget;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use FireflyIII\User;
@@ -143,7 +142,6 @@ class ImportBudget
Log::debug('Found NO existing budgets.');
return new Budget;
-
}
/**
@@ -163,7 +161,6 @@ class ImportBudget
return $mapped;
}
-
}
Log::debug('Found no budget on mapped data or no map present.');
@@ -242,6 +239,4 @@ class ImportBudget
return true;
}
-
-
}
diff --git a/app/Import/Object/ImportCategory.php b/app/Import/Object/ImportCategory.php
index bd986623bf..e49c38acc4 100644
--- a/app/Import/Object/ImportCategory.php
+++ b/app/Import/Object/ImportCategory.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Object;
-
use FireflyIII\Models\Category;
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
use FireflyIII\User;
@@ -137,7 +136,6 @@ class ImportCategory
Log::debug('Found NO existing categories.');
return new Category;
-
}
/**
@@ -157,7 +155,6 @@ class ImportCategory
return $mapped;
}
-
}
Log::debug('Found no category on mapped data or no map present.');
@@ -236,6 +233,4 @@ class ImportCategory
return true;
}
-
-
}
diff --git a/app/Import/Object/ImportCurrency.php b/app/Import/Object/ImportCurrency.php
index a8daca201a..e826d65b8d 100644
--- a/app/Import/Object/ImportCurrency.php
+++ b/app/Import/Object/ImportCurrency.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Object;
-
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\User;
@@ -68,7 +67,6 @@ class ImportCurrency
$mapped = $this->findMappedObject();
if (!is_null($mapped->id)) {
-
Log::debug('Mapped existing currency.', ['new' => $mapped->toArray()]);
$this->currency = $mapped;
@@ -101,7 +99,6 @@ class ImportCurrency
return $currency;
-
}
/**
@@ -189,7 +186,6 @@ class ImportCurrency
return $mapped;
}
-
}
Log::debug('Found no currency on mapped data or no map present.');
@@ -232,6 +228,4 @@ class ImportCurrency
return $currency;
}
-
-
}
diff --git a/app/Import/Object/ImportJournal.php b/app/Import/Object/ImportJournal.php
index 028086cd34..2d51098c4f 100644
--- a/app/Import/Object/ImportJournal.php
+++ b/app/Import/Object/ImportJournal.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Object;
-
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Import\Converter\Amount;
diff --git a/app/Import/Routine/ImportRoutine.php b/app/Import/Routine/ImportRoutine.php
index fecfd24df4..304fd3a09e 100644
--- a/app/Import/Routine/ImportRoutine.php
+++ b/app/Import/Routine/ImportRoutine.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Routine;
-
use Carbon\Carbon;
use DB;
use FireflyIII\Import\FileProcessor\FileProcessorInterface;
@@ -139,7 +138,7 @@ class ImportRoutine
{
Log::debug('Now in createImportTag()');
- if($this->journals->count() < 1) {
+ if ($this->journals->count() < 1) {
Log::info(sprintf('Will not create tag, %d journals imported.', $this->journals->count()));
return new Tag;
}
diff --git a/app/Import/Specifics/AbnAmroDescription.php b/app/Import/Specifics/AbnAmroDescription.php
index 0472179b51..6a754c50cc 100644
--- a/app/Import/Specifics/AbnAmroDescription.php
+++ b/app/Import/Specifics/AbnAmroDescription.php
@@ -89,7 +89,6 @@ class AbnAmroDescription implements SpecificInterface
{
// See if the current description is formatted in ABN AMRO format
if (preg_match('/ABN AMRO.{24} (.*)/', $this->row[7], $matches)) {
-
$this->row[8] = 'ABN AMRO'; // this one is new (opposing account name)
$this->row[7] = $matches[1]; // this is the description
@@ -133,7 +132,6 @@ class AbnAmroDescription implements SpecificInterface
{
// See if the current description is formatted as a SEPA plain description
if (preg_match('/^SEPA(.{28})/', $this->row[7], $matches)) {
-
$type = $matches[1];
$reference = '';
$name = '';
@@ -188,7 +186,6 @@ class AbnAmroDescription implements SpecificInterface
{
// See if the current description is formatted in TRTP format
if (preg_match_all('!\/([A-Z]{3,4})\/([^/]*)!', $this->row[7], $matches, PREG_SET_ORDER)) {
-
$type = '';
$name = '';
$reference = '';
@@ -235,6 +232,4 @@ class AbnAmroDescription implements SpecificInterface
return false;
}
-
-
}
diff --git a/app/Import/Specifics/IngDescription.php b/app/Import/Specifics/IngDescription.php
index cb14ee71e2..781f7e3395 100644
--- a/app/Import/Specifics/IngDescription.php
+++ b/app/Import/Specifics/IngDescription.php
@@ -121,5 +121,4 @@ class IngDescription implements SpecificInterface
return true;
}
-
}
diff --git a/app/Import/Specifics/PresidentsChoice.php b/app/Import/Specifics/PresidentsChoice.php
index 11203ba03c..7a0331a475 100644
--- a/app/Import/Specifics/PresidentsChoice.php
+++ b/app/Import/Specifics/PresidentsChoice.php
@@ -65,7 +65,5 @@ class PresidentsChoice implements SpecificInterface
}
return $row;
-
-
}
}
diff --git a/app/Import/Specifics/RabobankDescription.php b/app/Import/Specifics/RabobankDescription.php
index 420b5d8e26..cebaa8aaec 100644
--- a/app/Import/Specifics/RabobankDescription.php
+++ b/app/Import/Specifics/RabobankDescription.php
@@ -64,7 +64,8 @@ class RabobankDescription implements SpecificInterface
Log::debug(
sprintf(
'Rabobank specific: Opposite account and opposite name are' .
- ' both empty. Will use "%s" (from description) instead', $alternateName
+ ' both empty. Will use "%s" (from description) instead',
+ $alternateName
)
);
$row[6] = $alternateName;
diff --git a/app/Import/Specifics/SpecificInterface.php b/app/Import/Specifics/SpecificInterface.php
index 148aed45aa..c6c1f0a444 100644
--- a/app/Import/Specifics/SpecificInterface.php
+++ b/app/Import/Specifics/SpecificInterface.php
@@ -46,5 +46,4 @@ interface SpecificInterface
* @return array
*/
public function run(array $row): array;
-
}
diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php
index 2761a6881f..02e3ab90cc 100644
--- a/app/Import/Storage/ImportStorage.php
+++ b/app/Import/Storage/ImportStorage.php
@@ -159,7 +159,6 @@ class ImportStorage
$message = sprintf('Detected a possible duplicate, skip this one (hash: %s).', $importJournal->hash);
Log::error($message, $parameters);
throw new FireflyException($message);
-
}
unset($parameters);
@@ -258,7 +257,8 @@ class ImportStorage
// number of hits is 4? Then it's a match
if ($hits === 4) {
Log::error(
- 'There already is a transfer imported with these properties. Compare existing with new. ', ['existing' => $transfer, 'new' => $parameters]
+ 'There already is a transfer imported with these properties. Compare existing with new. ',
+ ['existing' => $transfer, 'new' => $parameters]
);
return true;
diff --git a/app/Import/Storage/ImportSupport.php b/app/Import/Storage/ImportSupport.php
index 93019b3689..99ed36614a 100644
--- a/app/Import/Storage/ImportSupport.php
+++ b/app/Import/Storage/ImportSupport.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Import\Storage;
-
use Carbon\Carbon;
use Exception;
use FireflyIII\Exceptions\FireflyException;
@@ -138,7 +137,6 @@ trait ImportSupport
$currency = $this->defaultCurrencyId;
return $currency;
-
}
/**
@@ -197,7 +195,6 @@ trait ImportSupport
$databaseAccount = $account->getAccount();
return $databaseAccount;
-
}
/**
@@ -219,7 +216,6 @@ trait ImportSupport
Log::debug(sprintf('Found %d user rules.', $set->count()));
return $set;
-
}
/**
@@ -272,16 +268,20 @@ trait ImportSupport
{
$set = TransactionJournal::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->leftJoin(
- 'transactions AS source', function (JoinClause $join) {
- $join->on('transaction_journals.id', '=', 'source.transaction_journal_id')->where('source.amount', '<', 0);
- }
+ 'transactions AS source',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.id', '=', 'source.transaction_journal_id')->where('source.amount', '<', 0);
+ }
)
->leftJoin(
- 'transactions AS destination', function (JoinClause $join) {
- $join->on('transaction_journals.id', '=', 'destination.transaction_journal_id')->where(
- 'destination.amount', '>', 0
+ 'transactions AS destination',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.id', '=', 'destination.transaction_journal_id')->where(
+ 'destination.amount',
+ '>',
+ 0
);
- }
+ }
)
->leftJoin('accounts as source_accounts', 'source.account_id', '=', 'source_accounts.id')
->leftJoin('accounts as destination_accounts', 'destination.account_id', '=', 'destination_accounts.id')
@@ -330,7 +330,6 @@ trait ImportSupport
}
return false;
-
}
/**
@@ -364,12 +363,10 @@ trait ImportSupport
*/
private function storeCategory(TransactionJournal $journal, Category $category)
{
-
if (!is_null($category->id)) {
Log::debug(sprintf('Linked category #%d to journal #%d', $category->id, $journal->id));
$journal->categories()->save($category);
}
-
}
private function storeJournal(array $parameters): TransactionJournal
@@ -464,5 +461,4 @@ trait ImportSupport
return;
}
-
}
diff --git a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php
index af3769eae9..629a03992c 100644
--- a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php
+++ b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php
@@ -192,8 +192,8 @@ class ExecuteRuleGroupOnExistingTransactions extends Job implements ShouldQueue
return array_map(
function ($rule) {
return Processor::make($rule);
- }, $rules->all()
+ },
+ $rules->all()
);
}
-
}
diff --git a/app/Jobs/ExecuteRuleOnExistingTransactions.php b/app/Jobs/ExecuteRuleOnExistingTransactions.php
index 9dba6dde22..b331e3a300 100644
--- a/app/Jobs/ExecuteRuleOnExistingTransactions.php
+++ b/app/Jobs/ExecuteRuleOnExistingTransactions.php
@@ -162,7 +162,6 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
}
}
Log::info(sprintf('Total transactions: %d. Hits: %d, misses: %d', $total, $hits, $misses));
-
}
/**
@@ -179,5 +178,4 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
return $collector->getJournals();
}
-
}
diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php
index 34ec0ec156..51dc805c71 100644
--- a/app/Jobs/Job.php
+++ b/app/Jobs/Job.php
@@ -32,6 +32,5 @@ use Illuminate\Bus\Queueable;
*/
abstract class Job
{
-
use Queueable;
}
diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php
index 5c8482d80e..a7d6d47e41 100644
--- a/app/Jobs/MailError.php
+++ b/app/Jobs/MailError.php
@@ -87,7 +87,8 @@ class MailError extends Job implements ShouldQueue
$args['ip'] = $this->ipAddress;
Mail::send(
- ['emails.error-html', 'emails.error-text'], $args,
+ ['emails.error-html', 'emails.error-text'],
+ $args,
function (Message $message) use ($email) {
if ($email !== '[email protected]') {
$message->to($email, $email)->subject('Caught an error in Firely III');
diff --git a/app/Mail/ConfirmEmailChangeMail.php b/app/Mail/ConfirmEmailChangeMail.php
index 2a98ddb814..cac7ae1d6c 100644
--- a/app/Mail/ConfirmEmailChangeMail.php
+++ b/app/Mail/ConfirmEmailChangeMail.php
@@ -50,7 +50,6 @@ class ConfirmEmailChangeMail extends Mailable
*/
public function __construct(string $newEmail, string $oldEmail, string $uri, string $ipAddress)
{
-
$this->newEmail = $newEmail;
$this->oldEmail = $oldEmail;
$this->uri = $uri;
diff --git a/app/Mail/UndoEmailChangeMail.php b/app/Mail/UndoEmailChangeMail.php
index 1ee5771624..13d61426aa 100644
--- a/app/Mail/UndoEmailChangeMail.php
+++ b/app/Mail/UndoEmailChangeMail.php
@@ -50,7 +50,6 @@ class UndoEmailChangeMail extends Mailable
*/
public function __construct(string $newEmail, string $oldEmail, string $uri, string $ipAddress)
{
-
$this->newEmail = $newEmail;
$this->oldEmail = $oldEmail;
$this->uri = $uri;
diff --git a/app/Models/Account.php b/app/Models/Account.php
index a4bd0ddb8a..09f4499b0e 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -36,7 +36,6 @@ use Illuminate\Database\Query\JoinClause;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
-
/**
* Class Account
*
@@ -112,7 +111,6 @@ class Account extends Model
$account = self::create($fields);
return $account;
-
}
/**
@@ -122,7 +120,6 @@ class Account extends Model
*/
public static function routeBinder(Account $value)
{
-
if (auth()->check()) {
if (intval($value->user_id) === auth()->user()->id) {
return $value;
@@ -211,7 +208,6 @@ class Account extends Model
*/
public function getNameAttribute($value): string
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -321,9 +317,10 @@ class Account extends Model
{
$joinName = str_replace('.', '_', $name);
$query->leftJoin(
- 'account_meta as ' . $joinName, function (JoinClause $join) use ($joinName, $name) {
- $join->on($joinName . '.account_id', '=', 'accounts.id')->where($joinName . '.name', '=', $name);
- }
+ 'account_meta as ' . $joinName,
+ function (JoinClause $join) use ($joinName, $name) {
+ $join->on($joinName . '.account_id', '=', 'accounts.id')->where($joinName . '.name', '=', $name);
+ }
);
$query->where($joinName . '.data', json_encode($value));
}
diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.php
index 02dfedbe3d..9eb33eae71 100644
--- a/app/Models/AccountMeta.php
+++ b/app/Models/AccountMeta.php
@@ -75,5 +75,4 @@ class AccountMeta extends Model
{
$this->attributes['data'] = json_encode($value);
}
-
}
diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php
index e11a7cb3df..268d16fb18 100644
--- a/app/Models/Attachment.php
+++ b/app/Models/Attachment.php
@@ -62,7 +62,6 @@ class Attachment extends Model
public static function routeBinder(Attachment $value)
{
if (auth()->check()) {
-
if (intval($value->user_id) === auth()->user()->id) {
return $value;
}
@@ -209,5 +208,4 @@ class Attachment extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php
index b8c26bae47..bbb342f40e 100644
--- a/app/Models/AvailableBudget.php
+++ b/app/Models/AvailableBudget.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Models;
-
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
diff --git a/app/Models/Bill.php b/app/Models/Bill.php
index 2f399fbbb5..a4e4655133 100644
--- a/app/Models/Bill.php
+++ b/app/Models/Bill.php
@@ -38,7 +38,6 @@ use Watson\Validating\ValidatingTrait;
*/
class Bill extends Model
{
-
use SoftDeletes, ValidatingTrait;
/**
* The attributes that should be casted to native types.
@@ -85,7 +84,6 @@ class Bill extends Model
*/
public function getMatchAttribute($value)
{
-
if (intval($this->match_encrypted) === 1) {
return Crypt::decrypt($value);
}
@@ -100,7 +98,6 @@ class Bill extends Model
*/
public function getNameAttribute($value)
{
-
if (intval($this->name_encrypted) === 1) {
return Crypt::decrypt($value);
}
@@ -159,6 +156,4 @@ class Bill extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
-
}
diff --git a/app/Models/Budget.php b/app/Models/Budget.php
index b1aae74667..5ce779ad83 100644
--- a/app/Models/Budget.php
+++ b/app/Models/Budget.php
@@ -37,7 +37,6 @@ use Watson\Validating\ValidatingTrait;
*/
class Budget extends Model
{
-
use SoftDeletes, ValidatingTrait;
/**
@@ -85,7 +84,6 @@ class Budget extends Model
$budget = self::create($fields);
return $budget;
-
}
/**
@@ -119,7 +117,6 @@ class Budget extends Model
*/
public function getNameAttribute($value)
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -160,6 +157,4 @@ class Budget extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
-
}
diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php
index 71eb68378e..f120cd5a5b 100644
--- a/app/Models/BudgetLimit.php
+++ b/app/Models/BudgetLimit.php
@@ -93,5 +93,4 @@ class BudgetLimit extends Model
{
$this->attributes['amount'] = strval(round($value, 12));
}
-
}
diff --git a/app/Models/Category.php b/app/Models/Category.php
index a52fc76532..a6760c5d8f 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -83,7 +83,6 @@ class Category extends Model
$category = self::create($fields);
return $category;
-
}
/**
@@ -109,7 +108,6 @@ class Category extends Model
*/
public function getNameAttribute($value)
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -151,5 +149,4 @@ class Category extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index 16492e0762..d399ffee55 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -64,6 +64,4 @@ class Configuration extends Model
{
$this->attributes['data'] = json_encode($value);
}
-
-
}
diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.php
index 15d34a06b9..27c44b51ba 100644
--- a/app/Models/CurrencyExchangeRate.php
+++ b/app/Models/CurrencyExchangeRate.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Models;
-
use FireflyIII\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -62,5 +61,4 @@ class CurrencyExchangeRate extends Model
{
return $this->belongsTo(User::class);
}
-
}
diff --git a/app/Models/ImportJob.php b/app/Models/ImportJob.php
index c8c5c7079a..781ea2f27c 100644
--- a/app/Models/ImportJob.php
+++ b/app/Models/ImportJob.php
@@ -98,7 +98,6 @@ class ImportJob extends Model
$status['done'] += $count;
$this->extended_status = $status;
$this->save();
-
}
/**
@@ -110,7 +109,6 @@ class ImportJob extends Model
$status['steps'] += $count;
$this->extended_status = $status;
$this->save();
-
}
/**
diff --git a/app/Models/LimitRepetition.php b/app/Models/LimitRepetition.php
index ab2fb1cf61..5b049fdb33 100644
--- a/app/Models/LimitRepetition.php
+++ b/app/Models/LimitRepetition.php
@@ -90,5 +90,4 @@ class LimitRepetition extends Model
{
$this->attributes['amount'] = strval(round($value, 2));
}
-
}
diff --git a/app/Models/LinkType.php b/app/Models/LinkType.php
index 7fe9faef47..25c64ee0af 100644
--- a/app/Models/LinkType.php
+++ b/app/Models/LinkType.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Models;
-
use Illuminate\Database\Eloquent\Model;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -72,5 +71,4 @@ class LinkType extends Model
{
return $this->hasMany(TransactionJournalLink::class);
}
-
}
diff --git a/app/Models/Note.php b/app/Models/Note.php
index c55efef879..9f8a1b410b 100644
--- a/app/Models/Note.php
+++ b/app/Models/Note.php
@@ -65,5 +65,4 @@ class Note extends Model
{
return $this->morphTo();
}
-
}
diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php
index 44426cd6a2..1bb4dd2952 100644
--- a/app/Models/PiggyBank.php
+++ b/app/Models/PiggyBank.php
@@ -115,7 +115,6 @@ class PiggyBank extends Model
*/
public function getNameAttribute($value)
{
-
if ($this->encrypted) {
return Crypt::decrypt($value);
}
@@ -156,7 +155,6 @@ class PiggyBank extends Model
*/
public function leftOnAccount(Carbon $date): string
{
-
$balance = Steam::balanceIgnoreVirtual($this->account, $date);
/** @var PiggyBank $p */
foreach ($this->account->piggyBanks as $piggyBank) {
@@ -166,7 +164,6 @@ class PiggyBank extends Model
}
return $balance;
-
}
/**
diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php
index 69bcd531a8..389c8607a7 100644
--- a/app/Models/PiggyBankEvent.php
+++ b/app/Models/PiggyBankEvent.php
@@ -72,5 +72,4 @@ class PiggyBankEvent extends Model
{
return $this->belongsTo('FireflyIII\Models\TransactionJournal');
}
-
}
diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php
index 7970cfaf3a..801eb44ad0 100644
--- a/app/Models/PiggyBankRepetition.php
+++ b/app/Models/PiggyBankRepetition.php
@@ -89,7 +89,6 @@ class PiggyBankRepetition extends Model
)
->where(
function (EloquentBuilder $q) use ($date) {
-
$q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00'));
$q->orWhereNull('targetdate');
}
@@ -103,5 +102,4 @@ class PiggyBankRepetition extends Model
{
$this->attributes['currentamount'] = strval(round($value, 12));
}
-
}
diff --git a/app/Models/Preference.php b/app/Models/Preference.php
index 16f9dbaeb6..5aee3161ab 100644
--- a/app/Models/Preference.php
+++ b/app/Models/Preference.php
@@ -96,5 +96,4 @@ class Preference extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/Role.php b/app/Models/Role.php
index 97e03192a2..6b3eb96012 100644
--- a/app/Models/Role.php
+++ b/app/Models/Role.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Models;
-
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
@@ -53,5 +52,4 @@ class Role extends Model
{
return $this->belongsToMany('FireflyIII\User');
}
-
}
diff --git a/app/Models/Rule.php b/app/Models/Rule.php
index 8a777698b7..d327b3c6b9 100644
--- a/app/Models/Rule.php
+++ b/app/Models/Rule.php
@@ -97,5 +97,4 @@ class Rule extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/Tag.php b/app/Models/Tag.php
index 93b31b4d75..060003a0d7 100644
--- a/app/Models/Tag.php
+++ b/app/Models/Tag.php
@@ -89,7 +89,6 @@ class Tag extends Model
$tag = self::create($fields);
return $tag;
-
}
/**
@@ -204,6 +203,4 @@ class Tag extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
-
}
diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php
index 43b43deb1f..545890814b 100644
--- a/app/Models/TransactionJournal.php
+++ b/app/Models/TransactionJournal.php
@@ -333,7 +333,6 @@ class TransactionJournal extends Model
$query->orderBy('transaction_journals.date', 'DESC');
$query->orderBy('transaction_journals.order', 'ASC');
$query->orderBy('transaction_journals.id', 'DESC');
-
}
/**
@@ -343,7 +342,6 @@ class TransactionJournal extends Model
*/
public function scopeTransactionTypes(EloquentBuilder $query, array $types)
{
-
if (!self::isJoined($query, 'transaction_types')) {
$query->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');
}
@@ -453,5 +451,4 @@ class TransactionJournal extends Model
{
return $this->belongsTo('FireflyIII\User');
}
-
}
diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.php
index 1289e82b3a..45036b5d29 100644
--- a/app/Models/TransactionJournalLink.php
+++ b/app/Models/TransactionJournalLink.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Models;
-
use Crypt;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -111,6 +110,4 @@ class TransactionJournalLink extends Model
{
return $this->belongsTo(TransactionJournal::class, 'source_id');
}
-
-
}
diff --git a/app/Models/TransactionJournalMeta.php b/app/Models/TransactionJournalMeta.php
index e23cf76edb..f673fbb8cc 100644
--- a/app/Models/TransactionJournalMeta.php
+++ b/app/Models/TransactionJournalMeta.php
@@ -34,7 +34,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
*/
class TransactionJournalMeta extends Model
{
-
use SoftDeletes;
/**
* The attributes that should be casted to native types.
diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.php
index 1df75796aa..ea09c65b9f 100644
--- a/app/Models/TransactionType.php
+++ b/app/Models/TransactionType.php
@@ -68,7 +68,6 @@ class TransactionType extends Model
return $transactionType;
}
throw new NotFoundHttpException;
-
}
diff --git a/app/Providers/AdminServiceProvider.php b/app/Providers/AdminServiceProvider.php
index 8bfc96491d..f75b40bc25 100644
--- a/app/Providers/AdminServiceProvider.php
+++ b/app/Providers/AdminServiceProvider.php
@@ -28,7 +28,6 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
class AdminServiceProvider extends ServiceProvider
{
/**
@@ -38,8 +37,6 @@ class AdminServiceProvider extends ServiceProvider
*/
public function boot()
{
-
-
}
/**
@@ -70,5 +67,4 @@ class AdminServiceProvider extends ServiceProvider
}
);
}
-
}
diff --git a/app/Providers/CategoryServiceProvider.php b/app/Providers/CategoryServiceProvider.php
index b945f3dd56..f39ef1c44c 100644
--- a/app/Providers/CategoryServiceProvider.php
+++ b/app/Providers/CategoryServiceProvider.php
@@ -65,6 +65,5 @@ class CategoryServiceProvider extends ServiceProvider
return $repository;
}
);
-
}
}
diff --git a/app/Providers/CurrencyServiceProvider.php b/app/Providers/CurrencyServiceProvider.php
index 2f63de16b5..e00c5013b6 100644
--- a/app/Providers/CurrencyServiceProvider.php
+++ b/app/Providers/CurrencyServiceProvider.php
@@ -66,5 +66,4 @@ class CurrencyServiceProvider extends ServiceProvider
}
);
}
-
}
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index 110ba077af..fccd71f715 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -152,7 +152,5 @@ class EventServiceProvider extends ServiceProvider
}
}
);
-
}
-
}
diff --git a/app/Providers/ExportJobServiceProvider.php b/app/Providers/ExportJobServiceProvider.php
index c7f6b38a6d..5072d617a4 100644
--- a/app/Providers/ExportJobServiceProvider.php
+++ b/app/Providers/ExportJobServiceProvider.php
@@ -31,7 +31,6 @@ use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
/**
* Class ExportJobServiceProvider
*
@@ -46,8 +45,6 @@ class ExportJobServiceProvider extends ServiceProvider
*/
public function boot()
{
-
-
}
/**
diff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.php
index aa1b81bd6d..771f3a1ae7 100644
--- a/app/Providers/FireflyServiceProvider.php
+++ b/app/Providers/FireflyServiceProvider.php
@@ -102,36 +102,42 @@ class FireflyServiceProvider extends ServiceProvider
public function register()
{
$this->app->bind(
- 'preferences', function () {
- return new Preferences;
- }
+ 'preferences',
+ function () {
+ return new Preferences;
+ }
);
$this->app->bind(
- 'fireflyconfig', function () {
- return new FireflyConfig;
- }
+ 'fireflyconfig',
+ function () {
+ return new FireflyConfig;
+ }
);
$this->app->bind(
- 'navigation', function () {
- return new Navigation;
- }
+ 'navigation',
+ function () {
+ return new Navigation;
+ }
);
$this->app->bind(
- 'amount', function () {
- return new Amount;
- }
+ 'amount',
+ function () {
+ return new Amount;
+ }
);
$this->app->bind(
- 'steam', function () {
- return new Steam;
- }
+ 'steam',
+ function () {
+ return new Steam;
+ }
);
$this->app->bind(
- 'expandedform', function () {
- return new ExpandedForm;
- }
+ 'expandedform',
+ function () {
+ return new ExpandedForm;
+ }
);
// chart generator:
@@ -168,5 +174,4 @@ class FireflyServiceProvider extends ServiceProvider
// password verifier thing
$this->app->bind(Verifier::class, PwndVerifier::class);
}
-
}
diff --git a/app/Providers/FireflySessionProvider.php b/app/Providers/FireflySessionProvider.php
index 4eb91f74a5..114c569deb 100644
--- a/app/Providers/FireflySessionProvider.php
+++ b/app/Providers/FireflySessionProvider.php
@@ -51,12 +51,13 @@ class FireflySessionProvider extends ServiceProvider
protected function registerSessionDriver()
{
$this->app->singleton(
- 'session.store', function ($app) {
- // First, we will create the session manager which is responsible for the
- // creation of the various session drivers when they are needed by the
- // application instance, and will resolve them on a lazy load basis.
- return $app->make('session')->driver();
- }
+ 'session.store',
+ function ($app) {
+ // First, we will create the session manager which is responsible for the
+ // creation of the various session drivers when they are needed by the
+ // application instance, and will resolve them on a lazy load basis.
+ return $app->make('session')->driver();
+ }
);
}
@@ -68,9 +69,10 @@ class FireflySessionProvider extends ServiceProvider
protected function registerSessionManager()
{
$this->app->singleton(
- 'session', function ($app) {
- return new SessionManager($app);
- }
+ 'session',
+ function ($app) {
+ return new SessionManager($app);
+ }
);
}
}
diff --git a/app/Providers/JournalServiceProvider.php b/app/Providers/JournalServiceProvider.php
index 262b3b56de..03c22f3160 100644
--- a/app/Providers/JournalServiceProvider.php
+++ b/app/Providers/JournalServiceProvider.php
@@ -93,7 +93,6 @@ class JournalServiceProvider extends ServiceProvider
/** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepository::class);
if ($app->auth->check()) {
-
$repository->setUser(auth()->user());
}
@@ -121,5 +120,4 @@ class JournalServiceProvider extends ServiceProvider
}
);
}
-
}
diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php
index 63243e409f..168a0a2e0b 100644
--- a/app/Providers/LogServiceProvider.php
+++ b/app/Providers/LogServiceProvider.php
@@ -43,7 +43,8 @@ class LogServiceProvider extends LaravelLogServiceProvider
protected function configureDailyHandler(Writer $log)
{
$log->useDailyFiles(
- $this->app->storagePath() . '/logs/firefly-iii.log', $this->maxFiles(),
+ $this->app->storagePath() . '/logs/firefly-iii.log',
+ $this->maxFiles(),
$this->logLevel()
);
}
diff --git a/app/Providers/PiggyBankServiceProvider.php b/app/Providers/PiggyBankServiceProvider.php
index 94dbe53dc8..b9f0569643 100644
--- a/app/Providers/PiggyBankServiceProvider.php
+++ b/app/Providers/PiggyBankServiceProvider.php
@@ -29,7 +29,6 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
/**
* Class PiggyBankServiceProvider
*
diff --git a/app/Providers/RuleGroupServiceProvider.php b/app/Providers/RuleGroupServiceProvider.php
index 6a72412a5f..54173feb0b 100644
--- a/app/Providers/RuleGroupServiceProvider.php
+++ b/app/Providers/RuleGroupServiceProvider.php
@@ -29,7 +29,6 @@ use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-
/**
* Class RuleGroupServiceProvider
*
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 34adbd971c..fac886b38a 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -37,7 +37,6 @@ use FireflyIII\User;
use Log;
use Validator;
-
/**
*
* Class AccountRepository
@@ -176,7 +175,6 @@ class AccountRepository implements AccountRepositoryInterface
$this->deleteInitialBalance($newAccount);
return $newAccount;
-
}
/**
@@ -211,7 +209,6 @@ class AccountRepository implements AccountRepositoryInterface
if (!is_null($journal->id)) {
$journal->delete();
}
-
}
/**
@@ -276,10 +273,10 @@ class AccountRepository implements AccountRepositoryInterface
// verify its creation:
if (is_null($newAccount->id)) {
Log::error(
- sprintf('Could not create account "%s" (%d error(s))', $data['name'], $newAccount->getErrors()->count()), $newAccount->getErrors()->toArray()
+ sprintf('Could not create account "%s" (%d error(s))', $data['name'], $newAccount->getErrors()->count()),
+ $newAccount->getErrors()->toArray()
);
throw new FireflyException(sprintf('Tried to create account named "%s" but failed. The logs have more details.', $data['name']));
-
}
Log::debug(sprintf('Created new account #%d named "%s" of type %s.', $newAccount->id, $newAccount->name, $accountType->type));
@@ -424,7 +421,10 @@ class AccountRepository implements AccountRepositoryInterface
Log::debug(
sprintf(
'Created meta-field "%s":"%s" for account #%d ("%s") ',
- $field, $data[$field], $account->id, $account->name
+ $field,
+ $data[$field],
+ $account->id,
+ $account->name
)
);
AccountMeta::create(
@@ -443,12 +443,14 @@ class AccountRepository implements AccountRepositoryInterface
Log::debug(
sprintf(
'Updated meta-field "%s":"%s" for account #%d ("%s") ',
- $field, $data[$field], $account->id, $account->name
+ $field,
+ $data[$field],
+ $account->id,
+ $account->name
)
);
}
}
-
}
/**
@@ -496,7 +498,6 @@ class AccountRepository implements AccountRepositoryInterface
Log::debug('Updated opening balance journal.');
return true;
-
}
diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php
index aaaffe11d2..7457bbcc39 100644
--- a/app/Repositories/Account/AccountRepositoryInterface.php
+++ b/app/Repositories/Account/AccountRepositoryInterface.php
@@ -159,5 +159,4 @@ interface AccountRepositoryInterface
* @return Account
*/
public function update(Account $account, array $data): Account;
-
}
diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php
index a978f1a69e..f3b4e6fca3 100644
--- a/app/Repositories/Account/AccountTaskerInterface.php
+++ b/app/Repositories/Account/AccountTaskerInterface.php
@@ -65,5 +65,4 @@ interface AccountTaskerInterface
* @param User $user
*/
public function setUser(User $user);
-
}
diff --git a/app/Repositories/Account/FindAccountsTrait.php b/app/Repositories/Account/FindAccountsTrait.php
index a674a25a12..e040ee8408 100644
--- a/app/Repositories/Account/FindAccountsTrait.php
+++ b/app/Repositories/Account/FindAccountsTrait.php
@@ -120,7 +120,6 @@ trait FindAccountsTrait
if (count($types) > 0) {
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
$query->whereIn('account_types.type', $types);
-
}
Log::debug(sprintf('Searching for account named "%s" (of user #%d) of the following type(s)', $name, $this->user->id), ['types' => $types]);
diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.php
index ee5b8dd6c0..d3b2e73008 100644
--- a/app/Repositories/Attachment/AttachmentRepository.php
+++ b/app/Repositories/Attachment/AttachmentRepository.php
@@ -168,13 +168,11 @@ class AttachmentRepository implements AttachmentRepositoryInterface
*/
public function update(Attachment $attachment, array $data): Attachment
{
-
$attachment->title = $data['title'];
$attachment->description = $data['description'];
$attachment->notes = $data['notes'];
$attachment->save();
return $attachment;
-
}
}
diff --git a/app/Repositories/Attachment/AttachmentRepositoryInterface.php b/app/Repositories/Attachment/AttachmentRepositoryInterface.php
index bfa0c662ad..7decdab90d 100644
--- a/app/Repositories/Attachment/AttachmentRepositoryInterface.php
+++ b/app/Repositories/Attachment/AttachmentRepositoryInterface.php
@@ -97,4 +97,3 @@ interface AttachmentRepositoryInterface
*/
public function update(Attachment $attachment, array $attachmentData): Attachment;
}
-
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php
index 44e31d94fc..ee77dbc9fa 100644
--- a/app/Repositories/Bill/BillRepository.php
+++ b/app/Repositories/Bill/BillRepository.php
@@ -125,7 +125,6 @@ class BillRepository implements BillRepositoryInterface
$set = $set->sortBy(
function (Bill $bill) {
-
$int = $bill->active ? 0 : 1;
return $int . strtolower($bill->name);
@@ -161,14 +160,16 @@ class BillRepository implements BillRepositoryInterface
$ids = $accounts->pluck('id')->toArray();
$set = $this->user->bills()
->leftJoin(
- 'transaction_journals', function (JoinClause $join) {
- $join->on('transaction_journals.bill_id', '=', 'bills.id')->whereNull('transaction_journals.deleted_at');
- }
+ 'transaction_journals',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.bill_id', '=', 'bills.id')->whereNull('transaction_journals.deleted_at');
+ }
)
->leftJoin(
- 'transactions', function (JoinClause $join) {
- $join->on('transaction_journals.id', '=', 'transactions.transaction_journal_id')->where('transactions.amount', '<', 0);
- }
+ 'transactions',
+ function (JoinClause $join) {
+ $join->on('transaction_journals.id', '=', 'transactions.transaction_journal_id')->where('transactions.amount', '<', 0);
+ }
)
->whereIn('transactions.account_id', $ids)
->whereNull('transaction_journals.deleted_at')
@@ -177,7 +178,6 @@ class BillRepository implements BillRepositoryInterface
$set = $set->sortBy(
function (Bill $bill) {
-
$int = $bill->active === 1 ? 0 : 1;
return $int . strtolower($bill->name);
@@ -238,7 +238,6 @@ class BillRepository implements BillRepositoryInterface
Log::debug(sprintf('Dates = %d, journalCount = %d, total = %d', $dates->count(), $count, $total));
if ($total > 0) {
-
$average = bcdiv(bcadd($bill->amount_max, $bill->amount_min), '2');
$multi = bcmul($average, strval($total));
$sum = bcadd($sum, $multi);
@@ -285,7 +284,6 @@ class BillRepository implements BillRepositoryInterface
$dates = $bill->transactionJournals()->before($end)->after($start)->get(['transaction_journals.date'])->pluck('date');
return $dates;
-
}
/**
@@ -519,7 +517,6 @@ class BillRepository implements BillRepositoryInterface
}
return false;
-
}
/**
@@ -565,8 +562,6 @@ class BillRepository implements BillRepositoryInterface
*/
public function update(Bill $bill, array $data): Bill
{
-
-
$bill->name = $data['name'];
$bill->match = $data['match'];
$bill->amount_min = $data['amount_min'];
diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php
index 8097f24294..0705dba846 100644
--- a/app/Repositories/Bill/BillRepositoryInterface.php
+++ b/app/Repositories/Bill/BillRepositoryInterface.php
@@ -188,5 +188,4 @@ interface BillRepositoryInterface
* @return Bill
*/
public function update(Bill $bill, array $data): Bill;
-
}
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php
index 0a2a72d000..9a8ed2f65a 100644
--- a/app/Repositories/Budget/BudgetRepository.php
+++ b/app/Repositories/Budget/BudgetRepository.php
@@ -72,7 +72,6 @@ class BudgetRepository implements BudgetRepositoryInterface
}
return true;
-
}
/**
@@ -229,7 +228,6 @@ class BudgetRepository implements BudgetRepositoryInterface
}
return $oldest;
-
}
/**
@@ -396,7 +394,6 @@ class BudgetRepository implements BudgetRepositoryInterface
}
return $data;
-
}
/**
diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php
index f1d4f6bc3f..e419a0b0f0 100644
--- a/app/Repositories/Budget/BudgetRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php
@@ -219,5 +219,4 @@ interface BudgetRepositoryInterface
* @return BudgetLimit
*/
public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, int $amount): BudgetLimit;
-
}
diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php
index 86e44b213d..7c6f1e6f88 100644
--- a/app/Repositories/Category/CategoryRepository.php
+++ b/app/Repositories/Category/CategoryRepository.php
@@ -547,5 +547,4 @@ class CategoryRepository implements CategoryRepositoryInterface
return null;
}
-
}
diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php
index af0e383460..eda842ccdd 100644
--- a/app/Repositories/Currency/CurrencyRepository.php
+++ b/app/Repositories/Currency/CurrencyRepository.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\Preference;
@@ -228,8 +227,6 @@ class CurrencyRepository implements CurrencyRepositoryInterface
}
return new CurrencyExchangeRate;
-
-
}
/**
diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php
index bea29039f8..1e6982e63a 100644
--- a/app/Repositories/Currency/CurrencyRepositoryInterface.php
+++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\Preference;
@@ -142,5 +141,4 @@ interface CurrencyRepositoryInterface
* @return TransactionCurrency
*/
public function update(TransactionCurrency $currency, array $data): TransactionCurrency;
-
}
diff --git a/app/Repositories/ExportJob/ExportJobRepository.php b/app/Repositories/ExportJob/ExportJobRepository.php
index c2a39deb9d..73a5306109 100644
--- a/app/Repositories/ExportJob/ExportJobRepository.php
+++ b/app/Repositories/ExportJob/ExportJobRepository.php
@@ -103,11 +103,9 @@ class ExportJobRepository implements ExportJobRepositoryInterface
return $exportJob;
}
$count++;
-
}
return new ExportJob;
-
}
/**
diff --git a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php
index cd1a1d6337..6e513e57a2 100644
--- a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php
+++ b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php
@@ -76,5 +76,4 @@ interface ExportJobRepositoryInterface
* @param User $user
*/
public function setUser(User $user);
-
}
diff --git a/app/Repositories/ImportJob/ImportJobRepository.php b/app/Repositories/ImportJob/ImportJobRepository.php
index cb1d005e43..38f900d938 100644
--- a/app/Repositories/ImportJob/ImportJobRepository.php
+++ b/app/Repositories/ImportJob/ImportJobRepository.php
@@ -81,7 +81,6 @@ class ImportJobRepository implements ImportJobRepositoryInterface
return $importJob;
}
$count++;
-
}
return new ImportJob;
@@ -115,7 +114,8 @@ class ImportJobRepository implements ImportJobRepositoryInterface
// demo user's configuration upload is ignored completely.
if (!$repository->hasRole($this->user, 'demo')) {
Log::debug(
- 'Uploaded configuration file', ['name' => $file->getClientOriginalName(), 'size' => $file->getSize(), 'mime' => $file->getClientMimeType()]
+ 'Uploaded configuration file',
+ ['name' => $file->getClientOriginalName(), 'size' => $file->getSize(), 'mime' => $file->getClientMimeType()]
);
$configFileObject = new SplFileObject($file->getRealPath());
diff --git a/app/Repositories/Journal/CreateJournalsTrait.php b/app/Repositories/Journal/CreateJournalsTrait.php
index 088ac15663..cac82799ef 100644
--- a/app/Repositories/Journal/CreateJournalsTrait.php
+++ b/app/Repositories/Journal/CreateJournalsTrait.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
-
use FireflyIII\Models\Budget;
use FireflyIII\Models\Category;
use FireflyIII\Models\Note;
@@ -205,7 +204,6 @@ trait CreateJournalsTrait
}
return $transaction;
-
}
diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php
index 6738da804e..8c99fa16b9 100644
--- a/app/Repositories/Journal/JournalRepository.php
+++ b/app/Repositories/Journal/JournalRepository.php
@@ -166,7 +166,6 @@ class JournalRepository implements JournalRepositoryInterface
$entry = $this->user->transactionJournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
if (is_null($entry)) {
-
return new TransactionJournal;
}
@@ -214,7 +213,6 @@ class JournalRepository implements JournalRepositoryInterface
$opposing->save();
return true;
-
}
/**
@@ -321,7 +319,6 @@ class JournalRepository implements JournalRepositoryInterface
$journal->save();
return $journal;
-
}
/**
diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php
index 1979b0dbce..d2c4edb1ea 100644
--- a/app/Repositories/Journal/JournalRepositoryInterface.php
+++ b/app/Repositories/Journal/JournalRepositoryInterface.php
@@ -149,5 +149,4 @@ interface JournalRepositoryInterface
* @return TransactionJournal
*/
public function updateSplitJournal(TransactionJournal $journal, array $data): TransactionJournal;
-
}
diff --git a/app/Repositories/Journal/JournalTasker.php b/app/Repositories/Journal/JournalTasker.php
index 8c4f2b2043..31fb04e1cb 100644
--- a/app/Repositories/Journal/JournalTasker.php
+++ b/app/Repositories/Journal/JournalTasker.php
@@ -86,13 +86,14 @@ class JournalTasker implements JournalTaskerInterface
$set = $journal
->transactions()// "source"
->leftJoin(
- 'transactions as destination', function (JoinClause $join) {
- $join
+ 'transactions as destination',
+ function (JoinClause $join) {
+ $join
->on('transactions.transaction_journal_id', '=', 'destination.transaction_journal_id')
->where('transactions.amount', '=', DB::raw('destination.amount * -1'))
->where('transactions.identifier', '=', DB::raw('destination.identifier'))
->whereNull('destination.deleted_at');
- }
+ }
)
->with(['budgets', 'categories'])
->leftJoin('accounts as source_accounts', 'transactions.account_id', '=', 'source_accounts.id')
diff --git a/app/Repositories/Journal/JournalTaskerInterface.php b/app/Repositories/Journal/JournalTaskerInterface.php
index 81ca557fae..98985477d8 100644
--- a/app/Repositories/Journal/JournalTaskerInterface.php
+++ b/app/Repositories/Journal/JournalTaskerInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
-
use FireflyIII\Models\TransactionJournal;
use FireflyIII\User;
use Illuminate\Support\Collection;
diff --git a/app/Repositories/Journal/SupportJournalsTrait.php b/app/Repositories/Journal/SupportJournalsTrait.php
index 322102d060..d825158223 100644
--- a/app/Repositories/Journal/SupportJournalsTrait.php
+++ b/app/Repositories/Journal/SupportJournalsTrait.php
@@ -81,7 +81,6 @@ trait SupportJournalsTrait
if (is_null($accounts['destination'])) {
Log::error('"destination"-account is null, so we cannot continue!', ['data' => $data]);
throw new FireflyException('"destination"-account is null, so we cannot continue!');
-
}
diff --git a/app/Repositories/Journal/UpdateJournalsTrait.php b/app/Repositories/Journal/UpdateJournalsTrait.php
index d077096010..75aba8e0a0 100644
--- a/app/Repositories/Journal/UpdateJournalsTrait.php
+++ b/app/Repositories/Journal/UpdateJournalsTrait.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
-
use DB;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account;
@@ -96,7 +95,6 @@ trait UpdateJournalsTrait
$transaction->foreign_currency_id = $data['foreign_currency_id'];
$transaction->account_id = $account->id;
$transaction->save();
-
}
/**
diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php
index c46fb2d2bd..2f71487d7d 100644
--- a/app/Repositories/LinkType/LinkTypeRepository.php
+++ b/app/Repositories/LinkType/LinkTypeRepository.php
@@ -106,8 +106,6 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
$opposingCount = TransactionJournalLink::whereDestinationId($two->id)->whereSourceId($one->id)->count();
return ($count + $opposingCount > 0);
-
-
}
/**
@@ -187,6 +185,5 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
$linkType->save();
return $linkType;
-
}
}
diff --git a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
index cfc44b4f14..5e4fe38e7e 100644
--- a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
+++ b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php
@@ -109,5 +109,4 @@ interface LinkTypeRepositoryInterface
* @return LinkType
*/
public function update(LinkType $linkType, array $data): LinkType;
-
}
diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php
index 8af13cbd28..a9e557f081 100644
--- a/app/Repositories/PiggyBank/PiggyBankRepository.php
+++ b/app/Repositories/PiggyBank/PiggyBankRepository.php
@@ -365,7 +365,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
*/
public function update(PiggyBank $piggyBank, array $data): PiggyBank
{
-
$piggyBank->name = $data['name'];
$piggyBank->account_id = intval($data['account_id']);
$piggyBank->targetamount = round($data['targetamount'], 2);
@@ -380,7 +379,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
// remove money from the rep.
$repetition = $piggyBank->currentRelevantRep();
if ($repetition->currentamount > $piggyBank->targetamount) {
-
$diff = bcsub($piggyBank->targetamount, $repetition->currentamount);
$this->createEvent($piggyBank, $diff);
diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php
index 5c5ccb4ab7..cf15854ea3 100644
--- a/app/Repositories/Rule/RuleRepository.php
+++ b/app/Repositories/Rule/RuleRepository.php
@@ -230,7 +230,6 @@ class RuleRepository implements RuleRepositoryInterface
}
return true;
-
}
/**
@@ -373,7 +372,6 @@ class RuleRepository implements RuleRepositoryInterface
}
return true;
-
}
/**
diff --git a/app/Repositories/Rule/RuleRepositoryInterface.php b/app/Repositories/Rule/RuleRepositoryInterface.php
index e2e1bc2d15..a7fd8bacd7 100644
--- a/app/Repositories/Rule/RuleRepositoryInterface.php
+++ b/app/Repositories/Rule/RuleRepositoryInterface.php
@@ -147,5 +147,4 @@ interface RuleRepositoryInterface
* @return Rule
*/
public function update(Rule $rule, array $data): Rule;
-
}
diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.php
index 77cb222201..09b74d84ae 100644
--- a/app/Repositories/RuleGroup/RuleGroupRepository.php
+++ b/app/Repositories/RuleGroup/RuleGroupRepository.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\RuleGroup;
-
use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use FireflyIII\User;
@@ -58,9 +57,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
{
/** @var Rule $rule */
foreach ($ruleGroup->rules as $rule) {
-
if (is_null($moveTo)) {
-
$rule->delete();
continue;
}
@@ -167,7 +164,6 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
'rules' => function (HasMany $query) {
$query->orderBy('active', 'DESC');
$query->orderBy('order', 'ASC');
-
},
'rules.ruleTriggers' => function (HasMany $query) {
$query->orderBy('order', 'ASC');
@@ -267,7 +263,6 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
}
return true;
-
}
/**
diff --git a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php
index 583f5e7508..a2ee5e45a5 100644
--- a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php
+++ b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\RuleGroup;
-
use FireflyIII\Models\RuleGroup;
use FireflyIII\User;
use Illuminate\Support\Collection;
@@ -141,6 +140,4 @@ interface RuleGroupRepositoryInterface
* @return RuleGroup
*/
public function update(RuleGroup $ruleGroup, array $data): RuleGroup;
-
-
}
diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php
index f4b3e9cdd8..25e99d7773 100644
--- a/app/Repositories/Tag/TagRepository.php
+++ b/app/Repositories/Tag/TagRepository.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Tag;
-
use Carbon\Carbon;
use DB;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
@@ -252,8 +251,6 @@ class TagRepository implements TagRepositoryInterface
$tag->save();
return $tag;
-
-
}
/**
@@ -435,7 +432,6 @@ class TagRepository implements TagRepositoryInterface
// no difference? Every tag same range:
if ($amountDiff === 0.0) {
-
return $range[0];
}
diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php
index 610700f3be..6e04a0a2df 100644
--- a/app/Repositories/Tag/TagRepositoryInterface.php
+++ b/app/Repositories/Tag/TagRepositoryInterface.php
@@ -29,7 +29,6 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\User;
use Illuminate\Support\Collection;
-
/**
* Interface TagRepositoryInterface
*
diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php
index ce8591e899..88bb889c86 100644
--- a/app/Repositories/User/UserRepository.php
+++ b/app/Repositories/User/UserRepository.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\User;
-
use FireflyIII\Models\BudgetLimit;
use FireflyIII\Models\Role;
use FireflyIII\User;
diff --git a/app/Repositories/User/UserRepositoryInterface.php b/app/Repositories/User/UserRepositoryInterface.php
index ac5be916af..9bca371f10 100644
--- a/app/Repositories/User/UserRepositoryInterface.php
+++ b/app/Repositories/User/UserRepositoryInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\User;
-
use FireflyIII\User;
use Illuminate\Support\Collection;
diff --git a/app/Services/Bunq/Id/BunqId.php b/app/Services/Bunq/Id/BunqId.php
index ffbb7bd591..21609f5fa3 100644
--- a/app/Services/Bunq/Id/BunqId.php
+++ b/app/Services/Bunq/Id/BunqId.php
@@ -49,6 +49,4 @@ class BunqId
{
$this->id = $id;
}
-
-
}
diff --git a/app/Services/Bunq/Id/DeviceServerId.php b/app/Services/Bunq/Id/DeviceServerId.php
index d0b65cbd07..88b91358b5 100644
--- a/app/Services/Bunq/Id/DeviceServerId.php
+++ b/app/Services/Bunq/Id/DeviceServerId.php
@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Id;
-
/**
* Class DeviceServerId
*
@@ -32,5 +31,4 @@ namespace FireflyIII\Services\Bunq\Id;
*/
class DeviceServerId extends BunqId
{
-
}
diff --git a/app/Services/Bunq/Id/DeviceSessionId.php b/app/Services/Bunq/Id/DeviceSessionId.php
index db4e7fd37c..c8443c4f2f 100644
--- a/app/Services/Bunq/Id/DeviceSessionId.php
+++ b/app/Services/Bunq/Id/DeviceSessionId.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Id;
-
/**
* Class DeviceSessionId
*
@@ -31,5 +30,4 @@ namespace FireflyIII\Services\Bunq\Id;
*/
class DeviceSessionId extends BunqId
{
-
}
diff --git a/app/Services/Bunq/Id/InstallationId.php b/app/Services/Bunq/Id/InstallationId.php
index 45704df8a1..84abcb61f9 100644
--- a/app/Services/Bunq/Id/InstallationId.php
+++ b/app/Services/Bunq/Id/InstallationId.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Id;
-
/**
* Class InstallationId
*
@@ -31,5 +30,4 @@ namespace FireflyIII\Services\Bunq\Id;
*/
class InstallationId extends BunqId
{
-
}
diff --git a/app/Services/Bunq/Object/Alias.php b/app/Services/Bunq/Object/Alias.php
index 61fead70b3..a625543de8 100644
--- a/app/Services/Bunq/Object/Alias.php
+++ b/app/Services/Bunq/Object/Alias.php
@@ -74,6 +74,4 @@ class Alias extends BunqObject
{
return $this->value;
}
-
-
}
diff --git a/app/Services/Bunq/Object/Amount.php b/app/Services/Bunq/Object/Amount.php
index cc28b97e2e..854a5ca6ba 100644
--- a/app/Services/Bunq/Object/Amount.php
+++ b/app/Services/Bunq/Object/Amount.php
@@ -63,6 +63,4 @@ class Amount extends BunqObject
{
return $this->value;
}
-
-
}
diff --git a/app/Services/Bunq/Object/Avatar.php b/app/Services/Bunq/Object/Avatar.php
index 9f294302cf..034e9c817c 100644
--- a/app/Services/Bunq/Object/Avatar.php
+++ b/app/Services/Bunq/Object/Avatar.php
@@ -30,5 +30,4 @@ namespace FireflyIII\Services\Bunq\Object;
*/
class Avatar extends BunqObject
{
-
}
diff --git a/app/Services/Bunq/Object/BunqObject.php b/app/Services/Bunq/Object/BunqObject.php
index 04dd2eed22..050ae58046 100644
--- a/app/Services/Bunq/Object/BunqObject.php
+++ b/app/Services/Bunq/Object/BunqObject.php
@@ -30,5 +30,4 @@ namespace FireflyIII\Services\Bunq\Object;
*/
class BunqObject
{
-
}
diff --git a/app/Services/Bunq/Object/DeviceServer.php b/app/Services/Bunq/Object/DeviceServer.php
index 176532e91c..d1498dcb93 100644
--- a/app/Services/Bunq/Object/DeviceServer.php
+++ b/app/Services/Bunq/Object/DeviceServer.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Object;
-
use Carbon\Carbon;
use FireflyIII\Services\Bunq\Id\DeviceServerId;
@@ -69,6 +68,4 @@ class DeviceServer extends BunqObject
{
return $this->ip;
}
-
-
}
diff --git a/app/Services/Bunq/Object/MonetaryAccountBank.php b/app/Services/Bunq/Object/MonetaryAccountBank.php
index 56e05debf8..1fe87a304b 100644
--- a/app/Services/Bunq/Object/MonetaryAccountBank.php
+++ b/app/Services/Bunq/Object/MonetaryAccountBank.php
@@ -159,5 +159,4 @@ class MonetaryAccountBank extends BunqObject
{
return $this->setting;
}
-
}
diff --git a/app/Services/Bunq/Object/MonetaryAccountProfile.php b/app/Services/Bunq/Object/MonetaryAccountProfile.php
index 83cfffc668..8bcc47ec03 100644
--- a/app/Services/Bunq/Object/MonetaryAccountProfile.php
+++ b/app/Services/Bunq/Object/MonetaryAccountProfile.php
@@ -51,5 +51,4 @@ class MonetaryAccountProfile extends BunqObject
return;
}
-
}
diff --git a/app/Services/Bunq/Object/MonetaryAccountSetting.php b/app/Services/Bunq/Object/MonetaryAccountSetting.php
index ebf48e9970..d592e914da 100644
--- a/app/Services/Bunq/Object/MonetaryAccountSetting.php
+++ b/app/Services/Bunq/Object/MonetaryAccountSetting.php
@@ -74,6 +74,4 @@ class MonetaryAccountSetting extends BunqObject
{
return $this->restrictionChat;
}
-
-
}
diff --git a/app/Services/Bunq/Object/NotificationFilter.php b/app/Services/Bunq/Object/NotificationFilter.php
index be411c7544..baf65ed86c 100644
--- a/app/Services/Bunq/Object/NotificationFilter.php
+++ b/app/Services/Bunq/Object/NotificationFilter.php
@@ -38,5 +38,4 @@ class NotificationFilter extends BunqObject
public function __construct(array $data)
{
}
-
}
diff --git a/app/Services/Bunq/Object/ServerPublicKey.php b/app/Services/Bunq/Object/ServerPublicKey.php
index dc72bc6440..bdea9e69a7 100644
--- a/app/Services/Bunq/Object/ServerPublicKey.php
+++ b/app/Services/Bunq/Object/ServerPublicKey.php
@@ -58,6 +58,4 @@ class ServerPublicKey extends BunqObject
{
$this->publicKey = $publicKey;
}
-
-
}
diff --git a/app/Services/Bunq/Object/UserCompany.php b/app/Services/Bunq/Object/UserCompany.php
index fab73dc3ca..54cfcdfc56 100644
--- a/app/Services/Bunq/Object/UserCompany.php
+++ b/app/Services/Bunq/Object/UserCompany.php
@@ -102,7 +102,6 @@ class UserCompany extends BunqObject
$this->sectorOfIndustry = $data['sector_of_industry'] ?? '';
$this->counterBankIban = $data['counter_bank_iban'];
$this->name = $data['name'];
-
}
/**
@@ -112,6 +111,4 @@ class UserCompany extends BunqObject
{
return $this->id;
}
-
-
}
diff --git a/app/Services/Bunq/Object/UserLight.php b/app/Services/Bunq/Object/UserLight.php
index 0f64cd8737..b7c7ee4c34 100644
--- a/app/Services/Bunq/Object/UserLight.php
+++ b/app/Services/Bunq/Object/UserLight.php
@@ -77,5 +77,4 @@ class UserLight extends BunqObject
$this->legalName = $data['legal_name'];
// aliases
}
-
}
diff --git a/app/Services/Bunq/Object/UserPerson.php b/app/Services/Bunq/Object/UserPerson.php
index 73482d2f6b..d66b2e97d6 100644
--- a/app/Services/Bunq/Object/UserPerson.php
+++ b/app/Services/Bunq/Object/UserPerson.php
@@ -147,6 +147,4 @@ class UserPerson extends BunqObject
{
return $this->id;
}
-
-
}
diff --git a/app/Services/Bunq/Request/DeviceSessionRequest.php b/app/Services/Bunq/Request/DeviceSessionRequest.php
index 88910c26af..36319e79be 100644
--- a/app/Services/Bunq/Request/DeviceSessionRequest.php
+++ b/app/Services/Bunq/Request/DeviceSessionRequest.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Request;
-
use FireflyIII\Services\Bunq\Id\DeviceSessionId;
use FireflyIII\Services\Bunq\Object\UserCompany;
use FireflyIII\Services\Bunq\Object\UserPerson;
@@ -155,6 +154,4 @@ class DeviceSessionRequest extends BunqRequest
return $userPerson;
}
-
-
}
diff --git a/app/Services/Bunq/Request/InstallationTokenRequest.php b/app/Services/Bunq/Request/InstallationTokenRequest.php
index 604df78d4c..45e6cb81d0 100644
--- a/app/Services/Bunq/Request/InstallationTokenRequest.php
+++ b/app/Services/Bunq/Request/InstallationTokenRequest.php
@@ -108,7 +108,6 @@ class InstallationTokenRequest extends BunqRequest
$installationId->setId(intval($data['id']));
return $installationId;
-
}
/**
@@ -118,7 +117,6 @@ class InstallationTokenRequest extends BunqRequest
*/
private function extractInstallationToken(array $response): InstallationToken
{
-
$data = $this->getKeyFromResponse('Token', $response);
$installationToken = new InstallationToken($data);
diff --git a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php b/app/Services/Bunq/Request/ListMonetaryAccountRequest.php
index f62b3bb4b0..231ad1d8db 100644
--- a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php
+++ b/app/Services/Bunq/Request/ListMonetaryAccountRequest.php
@@ -86,5 +86,4 @@ class ListMonetaryAccountRequest extends BunqRequest
{
$this->userId = $userId;
}
-
}
diff --git a/app/Services/Bunq/Token/BunqToken.php b/app/Services/Bunq/Token/BunqToken.php
index 5dfc0615cf..7ea1b16ab7 100644
--- a/app/Services/Bunq/Token/BunqToken.php
+++ b/app/Services/Bunq/Token/BunqToken.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Bunq\Token;
-
use Carbon\Carbon;
/**
@@ -96,5 +95,4 @@ class BunqToken
return;
}
-
}
diff --git a/app/Services/Bunq/Token/InstallationToken.php b/app/Services/Bunq/Token/InstallationToken.php
index de3d1b59bc..1659da3598 100644
--- a/app/Services/Bunq/Token/InstallationToken.php
+++ b/app/Services/Bunq/Token/InstallationToken.php
@@ -30,6 +30,4 @@ namespace FireflyIII\Services\Bunq\Token;
*/
class InstallationToken extends BunqToken
{
-
-
}
diff --git a/app/Services/Bunq/Token/SessionToken.php b/app/Services/Bunq/Token/SessionToken.php
index 6113949fd9..1e9df7e787 100644
--- a/app/Services/Bunq/Token/SessionToken.php
+++ b/app/Services/Bunq/Token/SessionToken.php
@@ -32,5 +32,4 @@ namespace FireflyIII\Services\Bunq\Token;
*/
class SessionToken extends BunqToken
{
-
}
diff --git a/app/Services/Currency/ExchangeRateInterface.php b/app/Services/Currency/ExchangeRateInterface.php
index 1d674059e3..e783de5f72 100644
--- a/app/Services/Currency/ExchangeRateInterface.php
+++ b/app/Services/Currency/ExchangeRateInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\TransactionCurrency;
@@ -46,5 +45,4 @@ interface ExchangeRateInterface
* @return mixed
*/
public function setUser(User $user);
-
}
diff --git a/app/Services/Currency/FixerIO.php b/app/Services/Currency/FixerIO.php
index 09f626ad9b..b7748953ee 100644
--- a/app/Services/Currency/FixerIO.php
+++ b/app/Services/Currency/FixerIO.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Currency;
-
use Carbon\Carbon;
use FireflyIII\Models\CurrencyExchangeRate;
use FireflyIII\Models\TransactionCurrency;
diff --git a/app/Services/Password/Verifier.php b/app/Services/Password/Verifier.php
index a8636dbc14..db600e12ee 100644
--- a/app/Services/Password/Verifier.php
+++ b/app/Services/Password/Verifier.php
@@ -38,5 +38,4 @@ interface Verifier
* @return bool
*/
public function validPassword(string $password): bool;
-
}
diff --git a/app/Support/Amount.php b/app/Support/Amount.php
index 767d2acc56..844f0cd5e1 100644
--- a/app/Support/Amount.php
+++ b/app/Support/Amount.php
@@ -141,7 +141,6 @@ class Amount
}
if ($coloured === true) {
-
if ($amount > 0) {
return sprintf('<span class="text-success">%s</span>', $result);
}
@@ -150,8 +149,6 @@ class Amount
}
return sprintf('<span style="color:#999">%s</span>', $result);
-
-
}
return $result;
@@ -170,7 +167,6 @@ class Amount
*/
public function getCurrencyCode(): string
{
-
$cache = new CacheProperties;
$cache->addProperty('getCurrencyCode');
if ($cache->has()) {
@@ -180,7 +176,6 @@ class Amount
$currency = TransactionCurrency::where('code', $currencyPreference->data)->first();
if ($currency) {
-
$cache->store($currency->code);
return $currency->code;
@@ -263,5 +258,4 @@ class Amount
'zero' => $positive,
];
}
-
}
diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php
index 9a5e786baf..415ed494ed 100644
--- a/app/Support/Binder/AccountList.php
+++ b/app/Support/Binder/AccountList.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Binder;
-
use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -44,9 +43,7 @@ class AccountList implements BinderInterface
*/
public static function routeBinder($value, $route): Collection
{
-
if (auth()->check()) {
-
$ids = explode(',', $value);
// filter ids:
$ids = self::filterIds($ids);
diff --git a/app/Support/Binder/BinderInterface.php b/app/Support/Binder/BinderInterface.php
index 2eadbef6bd..1754966a77 100644
--- a/app/Support/Binder/BinderInterface.php
+++ b/app/Support/Binder/BinderInterface.php
@@ -37,5 +37,4 @@ interface BinderInterface
* @return mixed
*/
public static function routeBinder($value, $route);
-
}
diff --git a/app/Support/Binder/BudgetList.php b/app/Support/Binder/BudgetList.php
index 835bb13448..1d91fd3a80 100644
--- a/app/Support/Binder/BudgetList.php
+++ b/app/Support/Binder/BudgetList.php
@@ -27,7 +27,6 @@ use FireflyIII\Models\Budget;
use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-
/**
* Class BudgetList
*
diff --git a/app/Support/Binder/UnfinishedJournal.php b/app/Support/Binder/UnfinishedJournal.php
index 2bb983cb45..1cf152879e 100644
--- a/app/Support/Binder/UnfinishedJournal.php
+++ b/app/Support/Binder/UnfinishedJournal.php
@@ -54,6 +54,5 @@ class UnfinishedJournal implements BinderInterface
}
throw new NotFoundHttpException;
-
}
}
diff --git a/app/Support/CacheProperties.php b/app/Support/CacheProperties.php
index 7ca5dbbd3d..5dc23ccfb5 100644
--- a/app/Support/CacheProperties.php
+++ b/app/Support/CacheProperties.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support;
-
use Cache;
use Illuminate\Support\Collection;
use Preferences as Prefs;
diff --git a/app/Support/Domain.php b/app/Support/Domain.php
index 97f0a882e6..03e093b638 100644
--- a/app/Support/Domain.php
+++ b/app/Support/Domain.php
@@ -36,7 +36,6 @@ class Domain
public static function getBindables(): array
{
return config('firefly.bindables');
-
}
/**
diff --git a/app/Support/Events/BillScanner.php b/app/Support/Events/BillScanner.php
index 23341b0f09..d58a048e72 100644
--- a/app/Support/Events/BillScanner.php
+++ b/app/Support/Events/BillScanner.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Events;
-
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
@@ -48,5 +47,4 @@ class BillScanner
$repository->scan($bill, $journal);
}
}
-
}
diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php
index 9174e837e3..764b8f1beb 100644
--- a/app/Support/ExpandedForm.php
+++ b/app/Support/ExpandedForm.php
@@ -133,7 +133,6 @@ class ExpandedForm
$html = view('form.file', compact('classes', 'name', 'label', 'options'))->render();
return $html;
-
}
/**
@@ -153,7 +152,6 @@ class ExpandedForm
$html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -172,7 +170,6 @@ class ExpandedForm
$html = view('form.location', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -387,7 +384,6 @@ class ExpandedForm
$html = view('form.password', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -426,7 +422,6 @@ class ExpandedForm
$html = view('form.static', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -464,7 +459,6 @@ class ExpandedForm
$html = view('form.text', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -484,7 +478,6 @@ class ExpandedForm
$html = view('form.textarea', compact('classes', 'name', 'label', 'value', 'options'))->render();
return $html;
-
}
/**
@@ -567,7 +560,6 @@ class ExpandedForm
$name = str_replace('[]', '', $name);
return strval(trans('form.' . $name));
-
}
/**
diff --git a/app/Support/Facades/Amount.php b/app/Support/Facades/Amount.php
index 561a01375a..ab7dcd3d4c 100644
--- a/app/Support/Facades/Amount.php
+++ b/app/Support/Facades/Amount.php
@@ -41,5 +41,4 @@ class Amount extends Facade
{
return 'amount';
}
-
}
diff --git a/app/Support/Facades/ExpandedForm.php b/app/Support/Facades/ExpandedForm.php
index 7b382a97f3..9f71f90399 100644
--- a/app/Support/Facades/ExpandedForm.php
+++ b/app/Support/Facades/ExpandedForm.php
@@ -41,5 +41,4 @@ class ExpandedForm extends Facade
{
return 'expandedform';
}
-
}
diff --git a/app/Support/Facades/FireflyConfig.php b/app/Support/Facades/FireflyConfig.php
index 6fa222424f..048e3e4b25 100644
--- a/app/Support/Facades/FireflyConfig.php
+++ b/app/Support/Facades/FireflyConfig.php
@@ -41,5 +41,4 @@ class FireflyConfig extends Facade
{
return 'fireflyconfig';
}
-
}
diff --git a/app/Support/Facades/Navigation.php b/app/Support/Facades/Navigation.php
index e98f22518d..95665752fb 100644
--- a/app/Support/Facades/Navigation.php
+++ b/app/Support/Facades/Navigation.php
@@ -41,5 +41,4 @@ class Navigation extends Facade
{
return 'navigation';
}
-
}
diff --git a/app/Support/Facades/Preferences.php b/app/Support/Facades/Preferences.php
index 2d036df025..d6a6373fb1 100644
--- a/app/Support/Facades/Preferences.php
+++ b/app/Support/Facades/Preferences.php
@@ -41,5 +41,4 @@ class Preferences extends Facade
{
return 'preferences';
}
-
}
diff --git a/app/Support/Facades/Steam.php b/app/Support/Facades/Steam.php
index 42eb0a82ec..015e910873 100644
--- a/app/Support/Facades/Steam.php
+++ b/app/Support/Facades/Steam.php
@@ -41,5 +41,4 @@ class Steam extends Facade
{
return 'steam';
}
-
}
diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php
index 4fefbb9de1..367d4c7c06 100644
--- a/app/Support/FireflyConfig.php
+++ b/app/Support/FireflyConfig.php
@@ -117,7 +117,5 @@ class FireflyConfig
Cache::forget('ff-config-' . $name);
return $config;
-
}
-
}
diff --git a/app/Support/Import/Configuration/ConfigurationInterface.php b/app/Support/Import/Configuration/ConfigurationInterface.php
index 66e784e6b7..a5723a55ad 100644
--- a/app/Support/Import/Configuration/ConfigurationInterface.php
+++ b/app/Support/Import/Configuration/ConfigurationInterface.php
@@ -61,5 +61,4 @@ interface ConfigurationInterface
* @return bool
*/
public function storeConfiguration(array $data): bool;
-
}
diff --git a/app/Support/Import/Configuration/Csv/Map.php b/app/Support/Import/Configuration/Csv/Map.php
index f877fb525f..612d782b4f 100644
--- a/app/Support/Import/Configuration/Csv/Map.php
+++ b/app/Support/Import/Configuration/Csv/Map.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Import\Configuration\Csv;
-
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Import\Mapper\MapperInterface;
use FireflyIII\Import\MapperPreProcess\PreProcessorInterface;
@@ -69,7 +68,6 @@ class Map implements ConfigurationInterface
$indexes = array_keys($this->data);
$rowIndex = 0;
foreach ($results as $rowIndex => $row) {
-
$row = $this->runSpecifics($row);
//do something here
@@ -117,7 +115,6 @@ class Map implements ConfigurationInterface
$this->job->save();
return $this->data;
-
}
/**
@@ -216,7 +213,6 @@ class Map implements ConfigurationInterface
}
return true;
-
}
/**
diff --git a/app/Support/Import/Configuration/Csv/Roles.php b/app/Support/Import/Configuration/Csv/Roles.php
index 02c0701f06..265b98aeab 100644
--- a/app/Support/Import/Configuration/Csv/Roles.php
+++ b/app/Support/Import/Configuration/Csv/Roles.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Import\Configuration\Csv;
-
use FireflyIII\Import\Specifics\SpecificInterface;
use FireflyIII\Models\ImportJob;
use FireflyIII\Support\Import\Configuration\ConfigurationInterface;
@@ -150,7 +149,6 @@ class Roles implements ConfigurationInterface
}
return $roles;
-
}
/**
@@ -175,7 +173,6 @@ class Roles implements ConfigurationInterface
$this->job->save();
return true;
-
}
/**
diff --git a/app/Support/Import/Information/BunqInformation.php b/app/Support/Import/Information/BunqInformation.php
index d3de5bcd2a..9570506a0d 100644
--- a/app/Support/Import/Information/BunqInformation.php
+++ b/app/Support/Import/Information/BunqInformation.php
@@ -83,7 +83,6 @@ class BunqInformation implements InformationInterface
$return = [];
/** @var MonetaryAccountBank $account */
foreach ($accounts as $account) {
-
$current = [
'id' => $account->getId(),
'name' => $account->getDescription(),
@@ -156,7 +155,6 @@ class BunqInformation implements InformationInterface
$request->call();
return $request->getMonetaryAccounts();
-
}
/**
diff --git a/app/Support/Import/Prerequisites/BunqPrerequisites.php b/app/Support/Import/Prerequisites/BunqPrerequisites.php
index a7b53f2f00..c9eae0595b 100644
--- a/app/Support/Import/Prerequisites/BunqPrerequisites.php
+++ b/app/Support/Import/Prerequisites/BunqPrerequisites.php
@@ -149,7 +149,6 @@ class BunqPrerequisites implements PrerequisitesInterface
Log::debug('Created key pair');
return;
-
}
/**
@@ -334,5 +333,4 @@ class BunqPrerequisites implements PrerequisitesInterface
return $deviceServerId;
}
-
}
diff --git a/app/Support/Import/Prerequisites/PrerequisitesInterface.php b/app/Support/Import/Prerequisites/PrerequisitesInterface.php
index cbbc633154..f6042869d4 100644
--- a/app/Support/Import/Prerequisites/PrerequisitesInterface.php
+++ b/app/Support/Import/Prerequisites/PrerequisitesInterface.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Import\Prerequisites;
-
use FireflyIII\User;
use Illuminate\Http\Request;
use Illuminate\Support\MessageBag;
diff --git a/app/Support/Models/TransactionJournalTrait.php b/app/Support/Models/TransactionJournalTrait.php
index 4bd4739672..ff039bea5a 100644
--- a/app/Support/Models/TransactionJournalTrait.php
+++ b/app/Support/Models/TransactionJournalTrait.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Models;
-
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Transaction;
@@ -161,8 +160,6 @@ trait TransactionJournalTrait
}
return '';
-
-
}
/**
diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index 3df169a12b..ae3ec494b0 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -176,7 +176,6 @@ class Navigation
if (isset($functionMap[$repeatFreq])) {
$function = $functionMap[$repeatFreq];
$currentEnd->$function();
-
}
if (!is_null($maxDate) && $currentEnd > $maxDate) {
@@ -221,7 +220,6 @@ class Navigation
}
return $entries;
-
}
/**
@@ -310,7 +308,6 @@ class Navigation
}
return $format;
-
}
/**
@@ -357,7 +354,6 @@ class Navigation
}
return $format;
-
}
/**
@@ -381,7 +377,6 @@ class Navigation
}
return $format;
-
}
/**
@@ -565,11 +560,7 @@ class Navigation
$start->startOfYear();
return $start;
-
-
}
throw new FireflyException(sprintf('updateStartDate cannot handle range "%s"', $range));
}
-
-
}
diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php
index bec81b756a..33a7becce5 100644
--- a/app/Support/Preferences.php
+++ b/app/Support/Preferences.php
@@ -115,7 +115,6 @@ class Preferences
}
return $result;
-
}
/**
@@ -146,7 +145,6 @@ class Preferences
}
return $this->setForUser($user, $name, $default);
-
}
/**
@@ -227,6 +225,5 @@ class Preferences
Cache::forever($fullName, $pref);
return $pref;
-
}
}
diff --git a/app/Support/Search/Modifier.php b/app/Support/Search/Modifier.php
index c5ad8dd986..cf23cc9383 100644
--- a/app/Support/Search/Modifier.php
+++ b/app/Support/Search/Modifier.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Search;
-
use Carbon\Carbon;
use Exception;
use FireflyIII\Exceptions\FireflyException;
@@ -154,7 +153,6 @@ class Modifier
Log::debug(sprintf('"%s" is in "%s"? %s', $needle, $haystack, var_export($res, true)));
return $res;
-
}
/**
diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php
index 6016c7d1e4..7b59960233 100644
--- a/app/Support/Search/Search.php
+++ b/app/Support/Search/Search.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Search;
-
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
@@ -134,7 +133,6 @@ class Search implements SearchInterface
// Filter transactions that match the given triggers.
$filtered = $set->filter(
function (Transaction $transaction) {
-
if ($this->matchModifiers($transaction)) {
return $transaction;
}
@@ -167,7 +165,6 @@ class Search implements SearchInterface
// break at some point so the script does not crash:
$currentTime = microtime(true) - $startTime;
Log::debug(sprintf('Have been running for %f seconds.', $currentTime));
-
} while (!$reachedEndOfList && !$foundEnough && $currentTime <= 30);
$result = $result->slice(0, $this->limit);
@@ -287,7 +284,6 @@ class Search implements SearchInterface
}
return true;
-
}
/**
diff --git a/app/Support/SingleCacheProperties.php b/app/Support/SingleCacheProperties.php
index d1eebe83e0..9e2b3324ad 100644
--- a/app/Support/SingleCacheProperties.php
+++ b/app/Support/SingleCacheProperties.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support;
-
use Illuminate\Support\Collection;
/**
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index 4f3a55c32d..a7b56c774d 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -208,8 +208,6 @@ class Steam
$cache->store($balances);
return $balances;
-
-
}
/**
@@ -337,8 +335,6 @@ class Steam
}
return intval($string);
-
-
}
/**
@@ -370,5 +366,4 @@ class Steam
return $value;
}
-
}
diff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.php
index 96022ca313..45f30556f2 100644
--- a/app/Support/Twig/AmountFormat.php
+++ b/app/Support/Twig/AmountFormat.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Twig;
-
use FireflyIII\Models\Account as AccountModel;
use FireflyIII\Models\TransactionCurrency;
use Twig_Extension;
@@ -46,7 +45,6 @@ class AmountFormat extends Twig_Extension
$this->formatAmount(),
$this->formatAmountPlain(),
];
-
}
/**
@@ -63,7 +61,6 @@ class AmountFormat extends Twig_Extension
$this->formatSourceBefore(),
$this->formatAmountByCurrency(),
];
-
}
/**
@@ -83,12 +80,13 @@ class AmountFormat extends Twig_Extension
protected function formatAmount(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'formatAmount', function (string $string): string {
-
- $currency = app('amount')->getDefaultCurrency();
+ 'formatAmount',
+ function (string $string): string {
+ $currency = app('amount')->getDefaultCurrency();
- return app('amount')->formatAnything($currency, $string, true);
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($currency, $string, true);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -100,20 +98,20 @@ class AmountFormat extends Twig_Extension
protected function formatAmountByAccount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatAmountByAccount', function (AccountModel $account, string $amount, bool $coloured = true): string {
- $currencyId = intval($account->getMeta('currency_id'));
+ 'formatAmountByAccount',
+ function (AccountModel $account, string $amount, bool $coloured = true): string {
+ $currencyId = intval($account->getMeta('currency_id'));
- if ($currencyId !== 0) {
- $currency = TransactionCurrency::find($currencyId);
+ if ($currencyId !== 0) {
+ $currency = TransactionCurrency::find($currencyId);
- return app('amount')->formatAnything($currency, $amount, $coloured);
- }
- $currency = app('amount')->getDefaultCurrency();
-
- return app('amount')->formatAnything($currency, $amount, $coloured);
+ return app('amount')->formatAnything($currency, $amount, $coloured);
+ }
+ $currency = app('amount')->getDefaultCurrency();
-
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($currency, $amount, $coloured);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -125,12 +123,11 @@ class AmountFormat extends Twig_Extension
protected function formatAmountByCurrency(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatAmountByCurrency', function (TransactionCurrency $currency, string $amount, bool $coloured = true): string {
-
- return app('amount')->formatAnything($currency, $amount, $coloured);
-
-
- }, ['is_safe' => ['html']]
+ 'formatAmountByCurrency',
+ function (TransactionCurrency $currency, string $amount, bool $coloured = true): string {
+ return app('amount')->formatAnything($currency, $amount, $coloured);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -142,16 +139,15 @@ class AmountFormat extends Twig_Extension
protected function formatAmountBySymbol(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatAmountBySymbol', function (string $amount, string $symbol, int $decimalPlaces = 2, bool $coloured = true): string {
-
- $currency = new TransactionCurrency;
- $currency->symbol = $symbol;
- $currency->decimal_places = $decimalPlaces;
-
- return app('amount')->formatAnything($currency, $amount, $coloured);
-
+ 'formatAmountBySymbol',
+ function (string $amount, string $symbol, int $decimalPlaces = 2, bool $coloured = true): string {
+ $currency = new TransactionCurrency;
+ $currency->symbol = $symbol;
+ $currency->decimal_places = $decimalPlaces;
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($currency, $amount, $coloured);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -161,12 +157,13 @@ class AmountFormat extends Twig_Extension
protected function formatAmountPlain(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'formatAmountPlain', function (string $string): string {
-
- $currency = app('amount')->getDefaultCurrency();
+ 'formatAmountPlain',
+ function (string $string): string {
+ $currency = app('amount')->getDefaultCurrency();
- return app('amount')->formatAnything($currency, $string, false);
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($currency, $string, false);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -176,27 +173,28 @@ class AmountFormat extends Twig_Extension
protected function formatDestinationAfter(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatDestinationAfter', function (array $transaction): string {
+ 'formatDestinationAfter',
+ function (array $transaction): string {
// build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
- $string = app('amount')->formatAnything($format, $transaction['destination_account_after'], true);
-
- // also append foreign amount for clarity:
- if (!is_null($transaction['foreign_destination_amount'])) {
- // build fake currency for foreign amount
$format = new TransactionCurrency;
- $format->decimal_places = $transaction['foreign_currency_dp'];
- $format->symbol = $transaction['foreign_currency_symbol'];
- $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_destination_amount'], true) . ')';
- }
-
-
- return $string;
-
- }, ['is_safe' => ['html']]
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
+ $string = app('amount')->formatAnything($format, $transaction['destination_account_after'], true);
+
+ // also append foreign amount for clarity:
+ if (!is_null($transaction['foreign_destination_amount'])) {
+ // build fake currency for foreign amount
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['foreign_currency_dp'];
+ $format->symbol = $transaction['foreign_currency_symbol'];
+ $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_destination_amount'], true) . ')';
+ }
+
+
+ return $string;
+ },
+ ['is_safe' => ['html']]
);
}
@@ -206,16 +204,17 @@ class AmountFormat extends Twig_Extension
protected function formatDestinationBefore(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatDestinationBefore', function (array $transaction): string {
+ 'formatDestinationBefore',
+ function (array $transaction): string {
// build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
-
- return app('amount')->formatAnything($format, $transaction['destination_account_before'], true);
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($format, $transaction['destination_account_before'], true);
+ },
+ ['is_safe' => ['html']]
);
}
@@ -225,28 +224,28 @@ class AmountFormat extends Twig_Extension
protected function formatSourceAfter(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatSourceAfter', function (array $transaction): string {
+ 'formatSourceAfter',
+ function (array $transaction): string {
// build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
- $string = app('amount')->formatAnything($format, $transaction['source_account_after'], true);
-
- // also append foreign amount for clarity:
- if (!is_null($transaction['foreign_source_amount'])) {
- // build fake currency for foreign amount
$format = new TransactionCurrency;
- $format->decimal_places = $transaction['foreign_currency_dp'];
- $format->symbol = $transaction['foreign_currency_symbol'];
- $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_source_amount'], true) . ')';
- }
-
-
- return $string;
-
-
- }, ['is_safe' => ['html']]
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
+ $string = app('amount')->formatAnything($format, $transaction['source_account_after'], true);
+
+ // also append foreign amount for clarity:
+ if (!is_null($transaction['foreign_source_amount'])) {
+ // build fake currency for foreign amount
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['foreign_currency_dp'];
+ $format->symbol = $transaction['foreign_currency_symbol'];
+ $string .= ' (' . app('amount')->formatAnything($format, $transaction['foreign_source_amount'], true) . ')';
+ }
+
+
+ return $string;
+ },
+ ['is_safe' => ['html']]
);
}
@@ -256,17 +255,17 @@ class AmountFormat extends Twig_Extension
protected function formatSourceBefore(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'formatSourceBefore', function (array $transaction): string {
+ 'formatSourceBefore',
+ function (array $transaction): string {
// build fake currency for main amount.
- $format = new TransactionCurrency;
- $format->decimal_places = $transaction['transaction_currency_dp'];
- $format->symbol = $transaction['transaction_currency_symbol'];
-
- return app('amount')->formatAnything($format, $transaction['source_account_before'], true);
+ $format = new TransactionCurrency;
+ $format->decimal_places = $transaction['transaction_currency_dp'];
+ $format->symbol = $transaction['transaction_currency_symbol'];
- }, ['is_safe' => ['html']]
+ return app('amount')->formatAnything($format, $transaction['source_account_before'], true);
+ },
+ ['is_safe' => ['html']]
);
}
-
}
diff --git a/app/Support/Twig/Extension/Transaction.php b/app/Support/Twig/Extension/Transaction.php
index b7ab549e29..8bcde09923 100644
--- a/app/Support/Twig/Extension/Transaction.php
+++ b/app/Support/Twig/Extension/Transaction.php
@@ -194,7 +194,6 @@ class Transaction extends Twig_Extension
$cache->store($txt);
return $txt;
-
}
/**
@@ -310,7 +309,8 @@ class Transaction extends Twig_Extension
/** @var TransactionModel $other */
$other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
- 'identifier', $transaction->identifier
+ 'identifier',
+ $transaction->identifier
)
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
@@ -488,7 +488,8 @@ class Transaction extends Twig_Extension
/** @var TransactionModel $other */
$other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
- 'identifier', $transaction->identifier
+ 'identifier',
+ $transaction->identifier
)
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
diff --git a/app/Support/Twig/Extension/TransactionJournal.php b/app/Support/Twig/Extension/TransactionJournal.php
index 0b0d78f384..5e429db205 100644
--- a/app/Support/Twig/Extension/TransactionJournal.php
+++ b/app/Support/Twig/Extension/TransactionJournal.php
@@ -37,7 +37,7 @@ class TransactionJournal extends Twig_Extension
*
* @return string
*/
- function totalAmount(JournalModel $journal): string
+ public function totalAmount(JournalModel $journal): string
{
$cache = new SingleCacheProperties;
$cache->addProperty('total-amount');
@@ -86,7 +86,5 @@ class TransactionJournal extends Twig_Extension
$cache->store($txt);
return $txt;
-
}
-
}
diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php
index 6e3b303bab..b2d04de926 100644
--- a/app/Support/Twig/General.php
+++ b/app/Support/Twig/General.php
@@ -53,7 +53,6 @@ class General extends Twig_Extension
$this->mimeIcon(),
];
-
}
/**
@@ -73,7 +72,6 @@ class General extends Twig_Extension
$this->activeRoutePartialWhat(),
];
-
}
/**
@@ -93,16 +91,17 @@ class General extends Twig_Extension
protected function activeRoutePartial(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'activeRoutePartial', function (): string {
- $args = func_get_args();
- $route = $args[0]; // name of the route.
- $name = Route::getCurrentRoute()->getName() ?? '';
- if (!(strpos($name, $route) === false)) {
- return 'active';
+ 'activeRoutePartial',
+ function (): string {
+ $args = func_get_args();
+ $route = $args[0]; // name of the route.
+ $name = Route::getCurrentRoute()->getName() ?? '';
+ if (!(strpos($name, $route) === false)) {
+ return 'active';
+ }
+
+ return '';
}
-
- return '';
- }
);
}
@@ -115,18 +114,20 @@ class General extends Twig_Extension
protected function activeRoutePartialWhat(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'activeRoutePartialWhat', function ($context): string {
- $args = func_get_args();
- $route = $args[1]; // name of the route.
+ 'activeRoutePartialWhat',
+ function ($context): string {
+ $args = func_get_args();
+ $route = $args[1]; // name of the route.
$what = $args[2]; // name of the route.
$activeWhat = $context['what'] ?? false;
- if ($what === $activeWhat && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
- return 'active';
- }
+ if ($what === $activeWhat && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
+ return 'active';
+ }
- return '';
- }, ['needs_context' => true]
+ return '';
+ },
+ ['needs_context' => true]
);
}
@@ -139,16 +140,17 @@ class General extends Twig_Extension
protected function activeRouteStrict(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'activeRouteStrict', function (): string {
- $args = func_get_args();
- $route = $args[0]; // name of the route.
+ 'activeRouteStrict',
+ function (): string {
+ $args = func_get_args();
+ $route = $args[0]; // name of the route.
- if (Route::getCurrentRoute()->getName() === $route) {
- return 'active';
- }
+ if (Route::getCurrentRoute()->getName() === $route) {
+ return 'active';
+ }
- return '';
- }
+ return '';
+ }
);
}
@@ -158,14 +160,15 @@ class General extends Twig_Extension
protected function balance(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'balance', function (?Account $account): string {
- if (is_null($account)) {
- return 'NULL';
+ 'balance',
+ function (?Account $account): string {
+ if (is_null($account)) {
+ return 'NULL';
+ }
+ $date = session('end', Carbon::now()->endOfMonth());
+
+ return app('steam')->balance($account, $date);
}
- $date = session('end', Carbon::now()->endOfMonth());
-
- return app('steam')->balance($account, $date);
- }
);
}
@@ -175,9 +178,10 @@ class General extends Twig_Extension
protected function env(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'env', function (string $name, string $default): string {
- return env($name, $default);
- }
+ 'env',
+ function (string $name, string $default): string {
+ return env($name, $default);
+ }
);
}
@@ -187,20 +191,21 @@ class General extends Twig_Extension
protected function formatFilesize(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'filesize', function (int $size): string {
+ 'filesize',
+ function (int $size): string {
// less than one GB, more than one MB
- if ($size < (1024 * 1024 * 2014) && $size >= (1024 * 1024)) {
- return round($size / (1024 * 1024), 2) . ' MB';
- }
+ if ($size < (1024 * 1024 * 2014) && $size >= (1024 * 1024)) {
+ return round($size / (1024 * 1024), 2) . ' MB';
+ }
- // less than one MB
- if ($size < (1024 * 1024)) {
- return round($size / 1024, 2) . ' KB';
- }
+ // less than one MB
+ if ($size < (1024 * 1024)) {
+ return round($size / 1024, 2) . ' KB';
+ }
- return $size . ' bytes';
- }
+ return $size . ' bytes';
+ }
);
}
@@ -211,9 +216,10 @@ class General extends Twig_Extension
protected function getCurrencyCode(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'getCurrencyCode', function (): string {
- return app('amount')->getCurrencyCode();
- }
+ 'getCurrencyCode',
+ function (): string {
+ return app('amount')->getCurrencyCode();
+ }
);
}
@@ -223,9 +229,10 @@ class General extends Twig_Extension
protected function getCurrencySymbol(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'getCurrencySymbol', function (): string {
- return app('amount')->getCurrencySymbol();
- }
+ 'getCurrencySymbol',
+ function (): string {
+ return app('amount')->getCurrencySymbol();
+ }
);
}
@@ -235,8 +242,9 @@ class General extends Twig_Extension
protected function mimeIcon(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
- 'mimeIcon', function (string $string): string {
- switch ($string) {
+ 'mimeIcon',
+ function (string $string): string {
+ switch ($string) {
default:
return 'fa-file-o';
case 'application/pdf':
@@ -245,7 +253,8 @@ class General extends Twig_Extension
case 'image/jpeg':
return 'fa-file-image-o';
}
- }, ['is_safe' => ['html']]
+ },
+ ['is_safe' => ['html']]
);
}
@@ -255,9 +264,10 @@ class General extends Twig_Extension
protected function phpdate()
{
return new Twig_SimpleFunction(
- 'phpdate', function (string $str): string {
- return date($str);
- }
+ 'phpdate',
+ function (string $str): string {
+ return date($str);
+ }
);
}
@@ -267,9 +277,10 @@ class General extends Twig_Extension
protected function steamPositive()
{
return new Twig_SimpleFunction(
- 'steam_positive', function (string $str): string {
- return Steam::positive($str);
- }
+ 'steam_positive',
+ function (string $str): string {
+ return Steam::positive($str);
+ }
);
}
@@ -279,10 +290,10 @@ class General extends Twig_Extension
private function getAmountFromJournal()
{
return new Twig_SimpleFunction(
- 'getAmount', function (TransactionJournal $journal): string {
- return $journal->amount();
- }
+ 'getAmount',
+ function (TransactionJournal $journal): string {
+ return $journal->amount();
+ }
);
}
-
}
diff --git a/app/Support/Twig/Journal.php b/app/Support/Twig/Journal.php
index cad069fd36..3998ba15ec 100644
--- a/app/Support/Twig/Journal.php
+++ b/app/Support/Twig/Journal.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Twig;
-
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\Category;
@@ -49,31 +48,32 @@ class Journal extends Twig_Extension
public function getDestinationAccount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'destinationAccount', function (TransactionJournal $journal) {
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('destination-account-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
+ 'destinationAccount',
+ function (TransactionJournal $journal) {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('destination-account-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
+ }
- $list = $journal->destinationAccountList();
- $array = [];
- /** @var Account $entry */
- foreach ($list as $entry) {
- if ($entry->accountType->type === AccountType::CASH) {
- $array[] = '<span class="text-success">(cash)</span>';
- continue;
+ $list = $journal->destinationAccountList();
+ $array = [];
+ /** @var Account $entry */
+ foreach ($list as $entry) {
+ if ($entry->accountType->type === AccountType::CASH) {
+ $array[] = '<span class="text-success">(cash)</span>';
+ continue;
+ }
+ $array[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($entry->name), route('accounts.show', $entry->id));
}
- $array[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($entry->name), route('accounts.show', $entry->id));
- }
- $array = array_unique($array);
- $result = join(', ', $array);
- $cache->store($result);
+ $array = array_unique($array);
+ $result = join(', ', $array);
+ $cache->store($result);
- return $result;
- }
+ return $result;
+ }
);
}
@@ -120,34 +120,32 @@ class Journal extends Twig_Extension
public function getSourceAccount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'sourceAccount', function (TransactionJournal $journal): string {
-
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('source-account-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
-
- $list = $journal->sourceAccountList();
- $array = [];
- /** @var Account $entry */
- foreach ($list as $entry) {
- if ($entry->accountType->type === AccountType::CASH) {
- $array[] = '<span class="text-success">(cash)</span>';
- continue;
+ 'sourceAccount',
+ function (TransactionJournal $journal): string {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('source-account-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
}
- $array[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($entry->name), route('accounts.show', $entry->id));
- }
- $array = array_unique($array);
- $result = join(', ', $array);
- $cache->store($result);
-
- return $result;
+ $list = $journal->sourceAccountList();
+ $array = [];
+ /** @var Account $entry */
+ foreach ($list as $entry) {
+ if ($entry->accountType->type === AccountType::CASH) {
+ $array[] = '<span class="text-success">(cash)</span>';
+ continue;
+ }
+ $array[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($entry->name), route('accounts.show', $entry->id));
+ }
+ $array = array_unique($array);
+ $result = join(', ', $array);
+ $cache->store($result);
- }
+ return $result;
+ }
);
}
@@ -157,34 +155,33 @@ class Journal extends Twig_Extension
public function journalBudgets(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'journalBudgets', function (TransactionJournal $journal): string {
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('budget-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
+ 'journalBudgets',
+ function (TransactionJournal $journal): string {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('budget-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
+ }
- $budgets = [];
- // get all budgets:
- foreach ($journal->budgets as $budget) {
- $budgets[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($budget->name), route('budgets.show', $budget->id));
- }
- // and more!
- foreach ($journal->transactions as $transaction) {
- foreach ($transaction->budgets as $budget) {
+ $budgets = [];
+ // get all budgets:
+ foreach ($journal->budgets as $budget) {
$budgets[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($budget->name), route('budgets.show', $budget->id));
}
- }
- $string = join(', ', array_unique($budgets));
- $cache->store($string);
-
- return $string;
-
+ // and more!
+ foreach ($journal->transactions as $transaction) {
+ foreach ($transaction->budgets as $budget) {
+ $budgets[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($budget->name), route('budgets.show', $budget->id));
+ }
+ }
+ $string = join(', ', array_unique($budgets));
+ $cache->store($string);
- }
+ return $string;
+ }
);
}
@@ -194,37 +191,38 @@ class Journal extends Twig_Extension
public function journalCategories(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'journalCategories', function (TransactionJournal $journal): string {
- $cache = new CacheProperties;
- $cache->addProperty($journal->id);
- $cache->addProperty('transaction-journal');
- $cache->addProperty('category-string');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
- $categories = [];
- // get all categories for the journal itself (easy):
- foreach ($journal->categories as $category) {
- $categories[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($category->name), route('categories.show', $category->id));
- }
- if (count($categories) === 0) {
- $set = Category::distinct()->leftJoin('category_transaction', 'categories.id', '=', 'category_transaction.category_id')
+ 'journalCategories',
+ function (TransactionJournal $journal): string {
+ $cache = new CacheProperties;
+ $cache->addProperty($journal->id);
+ $cache->addProperty('transaction-journal');
+ $cache->addProperty('category-string');
+ if ($cache->has()) {
+ return $cache->get(); // @codeCoverageIgnore
+ }
+ $categories = [];
+ // get all categories for the journal itself (easy):
+ foreach ($journal->categories as $category) {
+ $categories[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($category->name), route('categories.show', $category->id));
+ }
+ if (count($categories) === 0) {
+ $set = Category::distinct()->leftJoin('category_transaction', 'categories.id', '=', 'category_transaction.category_id')
->leftJoin('transactions', 'category_transaction.transaction_id', '=', 'transactions.id')
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('categories.user_id', $journal->user_id)
->where('transaction_journals.id', $journal->id)
->get(['categories.*']);
- /** @var Category $category */
- foreach ($set as $category) {
- $categories[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($category->name), route('categories.show', $category->id));
+ /** @var Category $category */
+ foreach ($set as $category) {
+ $categories[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($category->name), route('categories.show', $category->id));
+ }
}
- }
- $string = join(', ', array_unique($categories));
- $cache->store($string);
+ $string = join(', ', array_unique($categories));
+ $cache->store($string);
- return $string;
- }
+ return $string;
+ }
);
}
}
diff --git a/app/Support/Twig/Loader/TransactionJournalLoader.php b/app/Support/Twig/Loader/TransactionJournalLoader.php
index a12e6b0763..6e92978c14 100644
--- a/app/Support/Twig/Loader/TransactionJournalLoader.php
+++ b/app/Support/Twig/Loader/TransactionJournalLoader.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Twig\Loader;
-
use FireflyIII\Support\Twig\Extension\TransactionJournal;
use Twig_RuntimeLoaderInterface;
diff --git a/app/Support/Twig/Loader/TransactionLoader.php b/app/Support/Twig/Loader/TransactionLoader.php
index 002c4e70da..4c4b8e9892 100644
--- a/app/Support/Twig/Loader/TransactionLoader.php
+++ b/app/Support/Twig/Loader/TransactionLoader.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Support\Twig\Loader;
-
use FireflyIII\Support\Twig\Extension\Transaction;
use Twig_RuntimeLoaderInterface;
diff --git a/app/Support/Twig/PiggyBank.php b/app/Support/Twig/PiggyBank.php
index a47da054ea..a56a67e2be 100644
--- a/app/Support/Twig/PiggyBank.php
+++ b/app/Support/Twig/PiggyBank.php
@@ -44,15 +44,17 @@ class PiggyBank extends Twig_Extension
$functions = [];
$functions[] = new Twig_SimpleFunction(
- 'currentRelevantRepAmount', function (PB $piggyBank) {
- return $piggyBank->currentRelevantRep()->currentamount;
- }
+ 'currentRelevantRepAmount',
+ function (PB $piggyBank) {
+ return $piggyBank->currentRelevantRep()->currentamount;
+ }
);
$functions[] = new Twig_SimpleFunction(
- 'suggestedMonthlyAmount', function (PB $piggyBank) {
- return $piggyBank->getSuggestedMonthlyAmount();
- }
+ 'suggestedMonthlyAmount',
+ function (PB $piggyBank) {
+ return $piggyBank->getSuggestedMonthlyAmount();
+ }
);
return $functions;
diff --git a/app/Support/Twig/Rule.php b/app/Support/Twig/Rule.php
index 7c36b5b8ff..646912c370 100644
--- a/app/Support/Twig/Rule.php
+++ b/app/Support/Twig/Rule.php
@@ -41,18 +41,19 @@ class Rule extends Twig_Extension
public function allActionTriggers(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'allRuleActions', function () {
- // array of valid values for actions
- $ruleActions = array_keys(Config::get('firefly.rule-actions'));
- $possibleActions = [];
- foreach ($ruleActions as $key) {
- $possibleActions[$key] = trans('firefly.rule_action_' . $key . '_choice');
- }
- unset($key, $ruleActions);
- asort($possibleActions);
+ 'allRuleActions',
+ function () {
+ // array of valid values for actions
+ $ruleActions = array_keys(Config::get('firefly.rule-actions'));
+ $possibleActions = [];
+ foreach ($ruleActions as $key) {
+ $possibleActions[$key] = trans('firefly.rule_action_' . $key . '_choice');
+ }
+ unset($key, $ruleActions);
+ asort($possibleActions);
- return $possibleActions;
- }
+ return $possibleActions;
+ }
);
}
@@ -62,12 +63,13 @@ class Rule extends Twig_Extension
public function allJournalTriggers(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'allJournalTriggers', function () {
- return [
+ 'allJournalTriggers',
+ function () {
+ return [
'store-journal' => trans('firefly.rule_trigger_store_journal'),
'update-journal' => trans('firefly.rule_trigger_update_journal'),
];
- }
+ }
);
}
@@ -77,22 +79,22 @@ class Rule extends Twig_Extension
public function allRuleTriggers(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'allRuleTriggers', function () {
- $ruleTriggers = array_keys(Config::get('firefly.rule-triggers'));
- $possibleTriggers = [];
- foreach ($ruleTriggers as $key) {
- if ($key !== 'user_action') {
- $possibleTriggers[$key] = trans('firefly.rule_trigger_' . $key . '_choice');
+ 'allRuleTriggers',
+ function () {
+ $ruleTriggers = array_keys(Config::get('firefly.rule-triggers'));
+ $possibleTriggers = [];
+ foreach ($ruleTriggers as $key) {
+ if ($key !== 'user_action') {
+ $possibleTriggers[$key] = trans('firefly.rule_trigger_' . $key . '_choice');
+ }
}
- }
- unset($key, $ruleTriggers);
- asort($possibleTriggers);
+ unset($key, $ruleTriggers);
+ asort($possibleTriggers);
- return $possibleTriggers;
- }
+ return $possibleTriggers;
+ }
);
-
}
/**
@@ -105,7 +107,6 @@ class Rule extends Twig_Extension
$this->allRuleTriggers(),
$this->allActionTriggers(),
];
-
}
/**
diff --git a/app/Support/Twig/Translation.php b/app/Support/Twig/Translation.php
index 95c1456315..3939dd8f3d 100644
--- a/app/Support/Twig/Translation.php
+++ b/app/Support/Twig/Translation.php
@@ -44,11 +44,11 @@ class Translation extends Twig_Extension
$filters = [];
$filters[] = new Twig_SimpleFilter(
- '_', function ($name) {
-
- return strval(trans(sprintf('firefly.%s', $name)));
-
- }, ['is_safe' => ['html']]
+ '_',
+ function ($name) {
+ return strval(trans(sprintf('firefly.%s', $name)));
+ },
+ ['is_safe' => ['html']]
);
return $filters;
@@ -64,7 +64,6 @@ class Translation extends Twig_Extension
$this->journalLinkTranslation(),
];
-
}
/**
@@ -81,17 +80,17 @@ class Translation extends Twig_Extension
public function journalLinkTranslation(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
- 'journalLinkTranslation', function (string $direction, string $original) {
- $key = sprintf('firefly.%s_%s', $original, $direction);
- $translation = trans($key);
- if ($key === $translation) {
- return $original;
- }
-
- return $translation;
-
-
- }, ['is_safe' => ['html']]
+ 'journalLinkTranslation',
+ function (string $direction, string $original) {
+ $key = sprintf('firefly.%s_%s', $original, $direction);
+ $translation = trans($key);
+ if ($key === $translation) {
+ return $original;
+ }
+
+ return $translation;
+ },
+ ['is_safe' => ['html']]
);
}
}
diff --git a/app/TransactionRules/Actions/AddTag.php b/app/TransactionRules/Actions/AddTag.php
index 0886008566..a1f667a459 100644
--- a/app/TransactionRules/Actions/AddTag.php
+++ b/app/TransactionRules/Actions/AddTag.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Tag;
use FireflyIII\Models\TransactionJournal;
diff --git a/app/TransactionRules/Actions/AppendDescription.php b/app/TransactionRules/Actions/AppendDescription.php
index 6fd15be25e..12e9d5339f 100644
--- a/app/TransactionRules/Actions/AppendDescription.php
+++ b/app/TransactionRules/Actions/AppendDescription.php
@@ -34,7 +34,6 @@ use Log;
*/
class AppendDescription implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/AppendNotes.php b/app/TransactionRules/Actions/AppendNotes.php
index b7d09e7b84..ef57c62fbf 100644
--- a/app/TransactionRules/Actions/AppendNotes.php
+++ b/app/TransactionRules/Actions/AppendNotes.php
@@ -35,7 +35,6 @@ use Log;
*/
class AppendNotes implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/ClearBudget.php b/app/TransactionRules/Actions/ClearBudget.php
index b10e3ff7f7..b666bc9cd1 100644
--- a/app/TransactionRules/Actions/ClearBudget.php
+++ b/app/TransactionRules/Actions/ClearBudget.php
@@ -34,7 +34,6 @@ use Log;
*/
class ClearBudget implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/ClearCategory.php b/app/TransactionRules/Actions/ClearCategory.php
index 198e9c0218..fee2a49a1a 100644
--- a/app/TransactionRules/Actions/ClearCategory.php
+++ b/app/TransactionRules/Actions/ClearCategory.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -35,7 +34,6 @@ use Log;
*/
class ClearCategory implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.php
index b1ed669e6c..f02b3662bc 100644
--- a/app/TransactionRules/Actions/ClearNotes.php
+++ b/app/TransactionRules/Actions/ClearNotes.php
@@ -35,7 +35,6 @@ use Log;
*/
class ClearNotes implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/PrependDescription.php b/app/TransactionRules/Actions/PrependDescription.php
index dae4a86649..0a1b1c3e49 100644
--- a/app/TransactionRules/Actions/PrependDescription.php
+++ b/app/TransactionRules/Actions/PrependDescription.php
@@ -34,7 +34,6 @@ use Log;
*/
class PrependDescription implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/PrependNotes.php b/app/TransactionRules/Actions/PrependNotes.php
index ee132f3c2d..2273b59076 100644
--- a/app/TransactionRules/Actions/PrependNotes.php
+++ b/app/TransactionRules/Actions/PrependNotes.php
@@ -35,7 +35,6 @@ use Log;
*/
class PrependNotes implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/RemoveAllTags.php b/app/TransactionRules/Actions/RemoveAllTags.php
index e7ca077b4c..caebb9e389 100644
--- a/app/TransactionRules/Actions/RemoveAllTags.php
+++ b/app/TransactionRules/Actions/RemoveAllTags.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -59,6 +58,5 @@ class RemoveAllTags implements ActionInterface
$journal->tags()->detach();
return true;
-
}
}
diff --git a/app/TransactionRules/Actions/RemoveTag.php b/app/TransactionRules/Actions/RemoveTag.php
index a1d7b32a89..c6b178f255 100644
--- a/app/TransactionRules/Actions/RemoveTag.php
+++ b/app/TransactionRules/Actions/RemoveTag.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\Tag;
use FireflyIII\Models\TransactionJournal;
@@ -36,7 +35,6 @@ use Log;
*/
class RemoveTag implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/SetBudget.php b/app/TransactionRules/Actions/SetBudget.php
index 1f91664926..d9fd23f02d 100644
--- a/app/TransactionRules/Actions/SetBudget.php
+++ b/app/TransactionRules/Actions/SetBudget.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Budget;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
@@ -38,7 +37,6 @@ use Log;
*/
class SetBudget implements ActionInterface
{
-
private $action;
@@ -78,7 +76,9 @@ class SetBudget implements ActionInterface
if ($journal->transactionType->type !== TransactionType::WITHDRAWAL) {
Log::debug(
sprintf(
- 'RuleAction SetBudget could not set budget of journal #%d to "%s" because journal is a %s.', $journal->id, $search,
+ 'RuleAction SetBudget could not set budget of journal #%d to "%s" because journal is a %s.',
+ $journal->id,
+ $search,
$journal->transactionType->type
)
);
diff --git a/app/TransactionRules/Actions/SetCategory.php b/app/TransactionRules/Actions/SetCategory.php
index 6644dbb10f..ca540ccdc5 100644
--- a/app/TransactionRules/Actions/SetCategory.php
+++ b/app/TransactionRules/Actions/SetCategory.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Category;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
@@ -36,7 +35,6 @@ use Log;
*/
class SetCategory implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/SetDescription.php b/app/TransactionRules/Actions/SetDescription.php
index f52a7346b6..f0a29cc896 100644
--- a/app/TransactionRules/Actions/SetDescription.php
+++ b/app/TransactionRules/Actions/SetDescription.php
@@ -34,7 +34,6 @@ use Log;
*/
class SetDescription implements ActionInterface
{
-
private $action;
@@ -61,7 +60,8 @@ class SetDescription implements ActionInterface
Log::debug(
sprintf(
- 'RuleAction SetDescription changed the description of journal #%d from "%s" to "%s".', $journal->id,
+ 'RuleAction SetDescription changed the description of journal #%d from "%s" to "%s".',
+ $journal->id,
$oldDescription,
$this->action->action_value
)
diff --git a/app/TransactionRules/Actions/SetDestinationAccount.php b/app/TransactionRules/Actions/SetDestinationAccount.php
index 93b96f9905..58b7eb7f8b 100644
--- a/app/TransactionRules/Actions/SetDestinationAccount.php
+++ b/app/TransactionRules/Actions/SetDestinationAccount.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\RuleAction;
@@ -39,7 +38,6 @@ use Log;
*/
class SetDestinationAccount implements ActionInterface
{
-
private $action;
/** @var TransactionJournal */
@@ -87,7 +85,8 @@ class SetDestinationAccount implements ActionInterface
Log::error(
sprintf(
'Cannot change destination account of journal #%d because no asset account with name "%s" exists.',
- $journal->id, $this->action->action_value
+ $journal->id,
+ $this->action->action_value
)
);
diff --git a/app/TransactionRules/Actions/SetNotes.php b/app/TransactionRules/Actions/SetNotes.php
index a29e14d0ba..6bed507707 100644
--- a/app/TransactionRules/Actions/SetNotes.php
+++ b/app/TransactionRules/Actions/SetNotes.php
@@ -35,7 +35,6 @@ use Log;
*/
class SetNotes implements ActionInterface
{
-
private $action;
diff --git a/app/TransactionRules/Actions/SetSourceAccount.php b/app/TransactionRules/Actions/SetSourceAccount.php
index 8654646792..f45461f698 100644
--- a/app/TransactionRules/Actions/SetSourceAccount.php
+++ b/app/TransactionRules/Actions/SetSourceAccount.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Actions;
-
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\RuleAction;
@@ -39,7 +38,6 @@ use Log;
*/
class SetSourceAccount implements ActionInterface
{
-
private $action;
/** @var TransactionJournal */
@@ -86,7 +84,8 @@ class SetSourceAccount implements ActionInterface
Log::error(
sprintf(
'Cannot change source account of journal #%d because no asset account with name "%s" exists.',
- $journal->id, $this->action->action_value
+ $journal->id,
+ $this->action->action_value
)
);
diff --git a/app/TransactionRules/Processor.php b/app/TransactionRules/Processor.php
index 8aed15f659..e0156162cc 100644
--- a/app/TransactionRules/Processor.php
+++ b/app/TransactionRules/Processor.php
@@ -193,7 +193,6 @@ final class Processor
}
return false;
-
}
/**
@@ -220,7 +219,6 @@ final class Processor
}
return false;
-
}
/**
@@ -241,7 +239,6 @@ final class Processor
Log::debug('Stop processing now and break.');
break;
}
-
}
return true;
@@ -272,14 +269,10 @@ final class Processor
Log::debug('Stop processing this trigger and break.');
break;
}
-
}
$result = ($hitTriggers === $foundTriggers && $foundTriggers > 0);
Log::debug('Result of triggered()', ['hitTriggers' => $hitTriggers, 'foundTriggers' => $foundTriggers, 'result' => $result]);
return $result;
-
}
-
-
}
diff --git a/app/TransactionRules/TransactionMatcher.php b/app/TransactionRules/TransactionMatcher.php
index 5e32179a2f..510d4cca84 100644
--- a/app/TransactionRules/TransactionMatcher.php
+++ b/app/TransactionRules/TransactionMatcher.php
@@ -60,7 +60,6 @@ class TransactionMatcher
public function __construct(JournalTaskerInterface $tasker)
{
$this->tasker = $tasker;
-
}
/**
@@ -151,7 +150,6 @@ class TransactionMatcher
$this->range = $range;
return $this;
-
}
/**
@@ -236,11 +234,8 @@ class TransactionMatcher
Log::debug(sprintf('reachedEndOfList: %s', var_export($reachedEndOfList, true)));
Log::debug(sprintf('foundEnough: %s', var_export($foundEnough, true)));
Log::debug(sprintf('searchedEnough: %s', var_export($searchedEnough, true)));
-
} while (!$reachedEndOfList && !$foundEnough && !$searchedEnough);
return $result;
}
-
-
}
diff --git a/app/TransactionRules/Triggers/AbstractTrigger.php b/app/TransactionRules/Triggers/AbstractTrigger.php
index d917dd1a84..e1fd0dc6cb 100644
--- a/app/TransactionRules/Triggers/AbstractTrigger.php
+++ b/app/TransactionRules/Triggers/AbstractTrigger.php
@@ -53,7 +53,6 @@ class AbstractTrigger
*/
private function __construct()
{
-
}
/**
@@ -122,6 +121,4 @@ class AbstractTrigger
{
return $this->triggerValue;
}
-
-
}
diff --git a/app/TransactionRules/Triggers/AmountExactly.php b/app/TransactionRules/Triggers/AmountExactly.php
index fadc89c159..c6e6262e6e 100644
--- a/app/TransactionRules/Triggers/AmountExactly.php
+++ b/app/TransactionRules/Triggers/AmountExactly.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -79,6 +78,5 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %d matches %d NOT exactly, so return false', $journal->id, $amount, $compare));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/AmountLess.php b/app/TransactionRules/Triggers/AmountLess.php
index 3879dd193b..c635859f09 100644
--- a/app/TransactionRules/Triggers/AmountLess.php
+++ b/app/TransactionRules/Triggers/AmountLess.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -80,6 +79,5 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger AmountLess for journal #%d: %d is NOT less than %d, so return false', $journal->id, $amount, $compare));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/AmountMore.php b/app/TransactionRules/Triggers/AmountMore.php
index 3f2c798861..619bd9e5c5 100644
--- a/app/TransactionRules/Triggers/AmountMore.php
+++ b/app/TransactionRules/Triggers/AmountMore.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -86,6 +85,5 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %d is NOT more than %d, so return false', $journal->id, $amount, $compare));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/BudgetIs.php b/app/TransactionRules/Triggers/BudgetIs.php
index 73b1afe26b..cc234e6636 100644
--- a/app/TransactionRules/Triggers/BudgetIs.php
+++ b/app/TransactionRules/Triggers/BudgetIs.php
@@ -90,7 +90,10 @@ final class BudgetIs extends AbstractTrigger implements TriggerInterface
Log::debug(
sprintf(
'RuleTrigger BudgetIs for journal #%d (transaction #%d): "%s" is "%s", return true.',
- $journal->id, $transaction->id, $name, $this->triggerValue
+ $journal->id,
+ $transaction->id,
+ $name,
+ $this->triggerValue
)
);
diff --git a/app/TransactionRules/Triggers/CategoryIs.php b/app/TransactionRules/Triggers/CategoryIs.php
index d18aa02a24..6b406031d6 100644
--- a/app/TransactionRules/Triggers/CategoryIs.php
+++ b/app/TransactionRules/Triggers/CategoryIs.php
@@ -90,7 +90,10 @@ final class CategoryIs extends AbstractTrigger implements TriggerInterface
Log::debug(
sprintf(
'RuleTrigger CategoryIs for journal #%d (transaction #%d): "%s" is "%s", return true.',
- $journal->id, $transaction->id, $name, $this->triggerValue
+ $journal->id,
+ $transaction->id,
+ $name,
+ $this->triggerValue
)
);
diff --git a/app/TransactionRules/Triggers/DescriptionContains.php b/app/TransactionRules/Triggers/DescriptionContains.php
index 3bc2f0d77d..a81f10f2a2 100644
--- a/app/TransactionRules/Triggers/DescriptionContains.php
+++ b/app/TransactionRules/Triggers/DescriptionContains.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -86,6 +85,5 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
Log::debug(sprintf('RuleTrigger DescriptionContains for journal #%d: "%s" does NOT contain "%s", return false.', $journal->id, $source, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/DescriptionEnds.php b/app/TransactionRules/Triggers/DescriptionEnds.php
index 5bbb6b5d83..1877eb8099 100644
--- a/app/TransactionRules/Triggers/DescriptionEnds.php
+++ b/app/TransactionRules/Triggers/DescriptionEnds.php
@@ -89,7 +89,6 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
$part = substr($description, $searchLength * -1);
if ($part === $search) {
-
Log::debug(sprintf('RuleTrigger DescriptionEnds for journal #%d: "%s" ends with "%s", return true.', $journal->id, $description, $search));
return true;
diff --git a/app/TransactionRules/Triggers/DescriptionIs.php b/app/TransactionRules/Triggers/DescriptionIs.php
index bd6be247a5..bcfeb803d6 100644
--- a/app/TransactionRules/Triggers/DescriptionIs.php
+++ b/app/TransactionRules/Triggers/DescriptionIs.php
@@ -72,7 +72,6 @@ final class DescriptionIs extends AbstractTrigger implements TriggerInterface
$search = strtolower($this->triggerValue);
if ($description === $search) {
-
Log::debug(sprintf('RuleTrigger DescriptionIs for journal #%d: "%s" is "%s", return true.', $journal->id, $description, $search));
return true;
diff --git a/app/TransactionRules/Triggers/FromAccountContains.php b/app/TransactionRules/Triggers/FromAccountContains.php
index e6d0472264..ae26f69a31 100644
--- a/app/TransactionRules/Triggers/FromAccountContains.php
+++ b/app/TransactionRules/Triggers/FromAccountContains.php
@@ -84,7 +84,6 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf
$strpos = strpos($fromAccountName, $search);
if (!($strpos === false)) {
-
Log::debug(sprintf('RuleTrigger FromAccountContains for journal #%d: "%s" contains "%s", return true.', $journal->id, $fromAccountName, $search));
return true;
@@ -93,11 +92,12 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf
Log::debug(
sprintf(
'RuleTrigger FromAccountContains for journal #%d: "%s" does not contain "%s", return false.',
- $journal->id, $fromAccountName, $search
+ $journal->id,
+ $fromAccountName,
+ $search
)
);
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/FromAccountEnds.php b/app/TransactionRules/Triggers/FromAccountEnds.php
index 6e08f5d0de..1a469a310e 100644
--- a/app/TransactionRules/Triggers/FromAccountEnds.php
+++ b/app/TransactionRules/Triggers/FromAccountEnds.php
@@ -104,6 +104,5 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger FromAccountEnds for journal #%d: "%s" does not end with "%s", return false.', $journal->id, $name, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/FromAccountIs.php b/app/TransactionRules/Triggers/FromAccountIs.php
index 880cf37072..53787e0910 100644
--- a/app/TransactionRules/Triggers/FromAccountIs.php
+++ b/app/TransactionRules/Triggers/FromAccountIs.php
@@ -91,6 +91,5 @@ final class FromAccountIs extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger FromAccountIs for journal #%d: "%s" is NOT "%s", return false.', $journal->id, $name, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasAnyBudget.php b/app/TransactionRules/Triggers/HasAnyBudget.php
index 66b6016ddc..3d1628e461 100644
--- a/app/TransactionRules/Triggers/HasAnyBudget.php
+++ b/app/TransactionRules/Triggers/HasAnyBudget.php
@@ -86,6 +86,5 @@ final class HasAnyBudget extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasAnyBudget for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasAnyCategory.php b/app/TransactionRules/Triggers/HasAnyCategory.php
index 65fdb23723..aad3509b8a 100644
--- a/app/TransactionRules/Triggers/HasAnyCategory.php
+++ b/app/TransactionRules/Triggers/HasAnyCategory.php
@@ -86,6 +86,5 @@ final class HasAnyCategory extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasAnyCategory for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasAnyTag.php b/app/TransactionRules/Triggers/HasAnyTag.php
index 765f814129..0d83e06adf 100644
--- a/app/TransactionRules/Triggers/HasAnyTag.php
+++ b/app/TransactionRules/Triggers/HasAnyTag.php
@@ -71,6 +71,5 @@ final class HasAnyTag extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasAnyTag for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasAttachment.php b/app/TransactionRules/Triggers/HasAttachment.php
index 691197d8b1..54528c65fb 100644
--- a/app/TransactionRules/Triggers/HasAttachment.php
+++ b/app/TransactionRules/Triggers/HasAttachment.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -68,7 +67,10 @@ class HasAttachment extends AbstractTrigger implements TriggerInterface
if ($attachments >= $minimum) {
Log::debug(
sprintf(
- 'RuleTrigger HasAttachment for journal #%d: count is %d, is more than or equal to %d, return true.', $journal->id, $attachments, $minimum
+ 'RuleTrigger HasAttachment for journal #%d: count is %d, is more than or equal to %d, return true.',
+ $journal->id,
+ $attachments,
+ $minimum
)
);
diff --git a/app/TransactionRules/Triggers/HasNoBudget.php b/app/TransactionRules/Triggers/HasNoBudget.php
index cd35f4ad78..db3a6d66f9 100644
--- a/app/TransactionRules/Triggers/HasNoBudget.php
+++ b/app/TransactionRules/Triggers/HasNoBudget.php
@@ -79,6 +79,5 @@ final class HasNoBudget extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasNoBudget for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasNoCategory.php b/app/TransactionRules/Triggers/HasNoCategory.php
index ce3a84b678..76ac645a0b 100644
--- a/app/TransactionRules/Triggers/HasNoCategory.php
+++ b/app/TransactionRules/Triggers/HasNoCategory.php
@@ -79,6 +79,5 @@ final class HasNoCategory extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasNoCategory for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/HasNoTag.php b/app/TransactionRules/Triggers/HasNoTag.php
index b2b610d588..04dc7542f7 100644
--- a/app/TransactionRules/Triggers/HasNoTag.php
+++ b/app/TransactionRules/Triggers/HasNoTag.php
@@ -71,6 +71,5 @@ final class HasNoTag extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger HasNoTag for journal #%d: count is %d, return false.', $journal->id, $count));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/NotesAny.php b/app/TransactionRules/Triggers/NotesAny.php
index 50c20ca324..e342a98962 100644
--- a/app/TransactionRules/Triggers/NotesAny.php
+++ b/app/TransactionRules/Triggers/NotesAny.php
@@ -71,7 +71,6 @@ final class NotesAny extends AbstractTrigger implements TriggerInterface
}
if (strlen($text) > 0) {
-
Log::debug(sprintf('RuleTrigger NotesEmpty for journal #%d: strlen > 0, return true.', $journal->id));
return true;
diff --git a/app/TransactionRules/Triggers/NotesAre.php b/app/TransactionRules/Triggers/NotesAre.php
index 25a889390d..ef7362649d 100644
--- a/app/TransactionRules/Triggers/NotesAre.php
+++ b/app/TransactionRules/Triggers/NotesAre.php
@@ -78,7 +78,6 @@ final class NotesAre extends AbstractTrigger implements TriggerInterface
$search = strtolower($this->triggerValue);
if ($text === $search && strlen($text) > 0) {
-
Log::debug(sprintf('RuleTrigger NotesAre for journal #%d: "%s" is "%s", return true.', $journal->id, $text, $search));
return true;
diff --git a/app/TransactionRules/Triggers/NotesContain.php b/app/TransactionRules/Triggers/NotesContain.php
index 4cbbc3fc88..6b1d04521a 100644
--- a/app/TransactionRules/Triggers/NotesContain.php
+++ b/app/TransactionRules/Triggers/NotesContain.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -93,7 +92,6 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
$strpos = strpos($text, $search);
if (!($strpos === false)) {
-
Log::debug(sprintf('RuleTrigger NotesContain for journal #%d: "%s" contains "%s", return true.', $journal->id, $text, $search));
return true;
@@ -102,6 +100,5 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger NotesContain for journal #%d: "%s" does NOT contain "%s", return false.', $journal->id, $text, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/NotesEmpty.php b/app/TransactionRules/Triggers/NotesEmpty.php
index d53c642857..5c52cca0b1 100644
--- a/app/TransactionRules/Triggers/NotesEmpty.php
+++ b/app/TransactionRules/Triggers/NotesEmpty.php
@@ -71,7 +71,6 @@ final class NotesEmpty extends AbstractTrigger implements TriggerInterface
}
if (strlen($text) === 0) {
-
Log::debug(sprintf('RuleTrigger NotesEmpty for journal #%d: strlen is 0, return true.', $journal->id));
return true;
diff --git a/app/TransactionRules/Triggers/NotesEnd.php b/app/TransactionRules/Triggers/NotesEnd.php
index 5e1e3140a6..f4c1546281 100644
--- a/app/TransactionRules/Triggers/NotesEnd.php
+++ b/app/TransactionRules/Triggers/NotesEnd.php
@@ -95,7 +95,6 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface
$part = substr($text, $searchLength * -1);
if ($part === $search) {
-
Log::debug(sprintf('RuleTrigger NotesEnd for journal #%d: "%s" ends with "%s", return true.', $journal->id, $text, $search));
return true;
diff --git a/app/TransactionRules/Triggers/NotesStart.php b/app/TransactionRules/Triggers/NotesStart.php
index b5a8eadb71..64385a6f7e 100644
--- a/app/TransactionRules/Triggers/NotesStart.php
+++ b/app/TransactionRules/Triggers/NotesStart.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\TransactionRules\Triggers;
-
use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournal;
use Log;
@@ -94,6 +93,5 @@ final class NotesStart extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger NotesStart for journal #%d: "%s" does not start with "%s", return false.', $journal->id, $text, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/ToAccountContains.php b/app/TransactionRules/Triggers/ToAccountContains.php
index e0085cf76f..729e1454b9 100644
--- a/app/TransactionRules/Triggers/ToAccountContains.php
+++ b/app/TransactionRules/Triggers/ToAccountContains.php
@@ -84,7 +84,6 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
$strpos = strpos($toAccountName, $search);
if (!($strpos === false)) {
-
Log::debug(sprintf('RuleTrigger ToAccountContains for journal #%d: "%s" contains "%s", return true.', $journal->id, $toAccountName, $search));
return true;
@@ -93,7 +92,9 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
Log::debug(
sprintf(
'RuleTrigger ToAccountContains for journal #%d: "%s" does not contain "%s", return false.',
- $journal->id, $toAccountName, $search
+ $journal->id,
+ $toAccountName,
+ $search
)
);
diff --git a/app/TransactionRules/Triggers/ToAccountIs.php b/app/TransactionRules/Triggers/ToAccountIs.php
index c2931cf0f2..457c421da6 100644
--- a/app/TransactionRules/Triggers/ToAccountIs.php
+++ b/app/TransactionRules/Triggers/ToAccountIs.php
@@ -91,6 +91,5 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface
Log::debug(sprintf('RuleTrigger ToAccountIs for journal #%d: "%s" is NOT "%s", return true.', $journal->id, $toAccountName, $search));
return false;
-
}
}
diff --git a/app/TransactionRules/Triggers/ToAccountStarts.php b/app/TransactionRules/Triggers/ToAccountStarts.php
index e903af5a8a..84f52c24d1 100644
--- a/app/TransactionRules/Triggers/ToAccountStarts.php
+++ b/app/TransactionRules/Triggers/ToAccountStarts.php
@@ -92,6 +92,5 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface
return false;
-
}
}
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php
index 368b9361ae..70290446bc 100644
--- a/app/Validation/FireflyValidator.php
+++ b/app/Validation/FireflyValidator.php
@@ -102,7 +102,6 @@ class FireflyValidator extends Validator
}
return false;
-
}
/**
@@ -279,7 +278,6 @@ class FireflyValidator extends Validator
$class = $classes[$name];
return !($class::willMatchEverything($value));
-
}
return false;
@@ -363,13 +361,11 @@ class FireflyValidator extends Validator
/** @var AccountMeta $entry */
foreach ($set as $entry) {
if ($entry->data === $value) {
-
return false;
}
}
return true;
-
}
/**
@@ -447,7 +443,6 @@ class FireflyValidator extends Validator
private function getRuleTriggerName($index): string
{
return $this->data['rule-trigger'][$index] ?? 'invalid';
-
}
/**
@@ -525,7 +520,6 @@ class FireflyValidator extends Validator
}
return true;
-
}
/**
@@ -549,7 +543,6 @@ class FireflyValidator extends Validator
}
return true;
-
}
/**
@@ -575,4 +568,3 @@ class FireflyValidator extends Validator
return true;
}
}
-