Skip to content

Firefly III: a personal finances manager

Fix https://github.com/firefly-iii/firefly-iii/issues/8575

James Cole5626d1c56dab
diff --git a/app/Api/V2/Controllers/Transaction/List/TransactionController.php b/app/Api/V2/Controllers/Transaction/List/TransactionController.php
index a1e6d61fac..31c4924fc6 100644
--- a/app/Api/V2/Controllers/Transaction/List/TransactionController.php
+++ b/app/Api/V2/Controllers/Transaction/List/TransactionController.php
@@ -112,6 +112,7 @@ class TransactionController extends Controller
return response()
->json($this->jsonApiList('transactions', $paginator, new TransactionGroupTransformer()))
- ->header('Content-Type', self::CONTENT_TYPE);
+ ->header('Content-Type', self::CONTENT_TYPE)
+ ;
}
}
diff --git a/app/Console/Commands/Correction/DeleteEmptyGroups.php b/app/Console/Commands/Correction/DeleteEmptyGroups.php
index 3ba5ea8515..aa769e9dde 100644
--- a/app/Console/Commands/Correction/DeleteEmptyGroups.php
+++ b/app/Console/Commands/Correction/DeleteEmptyGroups.php
@@ -47,7 +47,7 @@ class DeleteEmptyGroups extends Command
{
$groupIds
= TransactionGroup::leftJoin('transaction_journals', 'transaction_groups.id', '=', 'transaction_journals.transaction_group_id')
- ->whereNull('transaction_journals.id')->get(['transaction_groups.id'])->pluck('id')->toArray()
+ ->whereNull('transaction_journals.id')->get(['transaction_groups.id'])->pluck('id')->toArray()
;
$total = count($groupIds);
diff --git a/app/Console/Commands/System/ForceDecimalSize.php b/app/Console/Commands/System/ForceDecimalSize.php
index 383f004554..19cda1faa2 100644
--- a/app/Console/Commands/System/ForceDecimalSize.php
+++ b/app/Console/Commands/System/ForceDecimalSize.php
@@ -74,19 +74,19 @@ class ForceDecimalSize extends Command
private string $regularExpression;
private array $tables
= [
- 'accounts' => ['virtual_balance'],
- 'auto_budgets' => ['amount'],
- 'available_budgets' => ['amount'],
- 'bills' => ['amount_min', 'amount_max'],
- 'budget_limits' => ['amount'],
- 'currency_exchange_rates' => ['rate', 'user_rate'],
- 'limit_repetitions' => ['amount'],
- 'piggy_bank_events' => ['amount'],
- 'piggy_bank_repetitions' => ['currentamount'],
- 'piggy_banks' => ['targetamount'],
- 'recurrences_transactions' => ['amount', 'foreign_amount'],
- 'transactions' => ['amount', 'foreign_amount'],
- ];
+ 'accounts' => ['virtual_balance'],
+ 'auto_budgets' => ['amount'],
+ 'available_budgets' => ['amount'],
+ 'bills' => ['amount_min', 'amount_max'],
+ 'budget_limits' => ['amount'],
+ 'currency_exchange_rates' => ['rate', 'user_rate'],
+ 'limit_repetitions' => ['amount'],
+ 'piggy_bank_events' => ['amount'],
+ 'piggy_bank_repetitions' => ['currentamount'],
+ 'piggy_banks' => ['targetamount'],
+ 'recurrences_transactions' => ['amount', 'foreign_amount'],
+ 'transactions' => ['amount', 'foreign_amount'],
+ ];
/**
* Execute the console command.
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php
index fff221f886..fbeaef9a84 100644
--- a/app/Helpers/Collector/GroupCollector.php
+++ b/app/Helpers/Collector/GroupCollector.php
@@ -1083,7 +1083,8 @@ class GroupCollector implements GroupCollectorInterface
// include budget ID + name (if any)
->withBudgetInformation()
// include bill ID + name (if any)
- ->withBillInformation();
+ ->withBillInformation()
+ ;
return $this;
}
diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php
index 935974063f..1dbde9dd81 100644
--- a/app/Http/Controllers/Budget/IndexController.php
+++ b/app/Http/Controllers/Budget/IndexController.php
@@ -278,11 +278,11 @@ class IndexController extends Controller
// also calculate how much left from budgeted:
$sums['left'][$currencyId]
??= [
- 'amount' => '0',
- 'currency_id' => $budgeted['currency_id'],
- 'currency_symbol' => $budgeted['currency_symbol'],
- 'currency_decimal_places' => $budgeted['currency_decimal_places'],
- ];
+ 'amount' => '0',
+ 'currency_id' => $budgeted['currency_id'],
+ 'currency_symbol' => $budgeted['currency_symbol'],
+ 'currency_decimal_places' => $budgeted['currency_decimal_places'],
+ ];
}
}
diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php
index aaf1504ecd..42be033f2b 100644
--- a/app/Http/Controllers/Chart/CategoryController.php
+++ b/app/Http/Controllers/Chart/CategoryController.php
@@ -192,11 +192,11 @@ class CategoryController extends Controller
$chartData[$inKey]
= [
- 'label' => sprintf('%s (%s)', (string)trans('firefly.earned'), $currencyInfo['currency_name']),
- 'entries' => [],
- 'type' => 'bar',
- 'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green
- ];
+ 'label' => sprintf('%s (%s)', (string)trans('firefly.earned'), $currencyInfo['currency_name']),
+ 'entries' => [],
+ 'type' => 'bar',
+ 'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green
+ ];
// loop empty periods:
foreach (array_keys($periods) as $period) {
$label = $periods[$period];
diff --git a/app/Http/Controllers/JavascriptController.php b/app/Http/Controllers/JavascriptController.php
index f07a6d3874..f7068f2751 100644
--- a/app/Http/Controllers/JavascriptController.php
+++ b/app/Http/Controllers/JavascriptController.php
@@ -144,6 +144,7 @@ class JavascriptController extends Controller
return response()
->view('v2.javascript.variables', $data)
- ->header('Content-Type', 'text/javascript');
+ ->header('Content-Type', 'text/javascript')
+ ;
}
}
diff --git a/app/Http/Controllers/Rule/CreateController.php b/app/Http/Controllers/Rule/CreateController.php
index 59d2c48ced..6d35df8e28 100644
--- a/app/Http/Controllers/Rule/CreateController.php
+++ b/app/Http/Controllers/Rule/CreateController.php
@@ -159,7 +159,7 @@ class CreateController extends Controller
$oldActions = $this->getActionsForBill($bill);
// restore actions and triggers from old input:
- if (null !== $request->old()) {
+ if (null !== $request->old() && is_array($request->old()) && count($request->old()) > 0) {
$oldTriggers = $this->getPreviousTriggers($request);
$oldActions = $this->getPreviousActions($request);
}
diff --git a/app/Models/Account.php b/app/Models/Account.php
index c6ed9908e7..9736462044 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -122,13 +122,13 @@ class Account extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'user_id' => 'integer',
- 'deleted_at' => 'datetime',
- 'active' => 'boolean',
- 'encrypted' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'user_id' => 'integer',
+ 'deleted_at' => 'datetime',
+ 'active' => 'boolean',
+ 'encrypted' => 'boolean',
+ ];
protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];
diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.php
index a3c37ed271..799543776c 100644
--- a/app/Models/AccountMeta.php
+++ b/app/Models/AccountMeta.php
@@ -59,9 +59,9 @@ class AccountMeta extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ ];
protected $fillable = ['account_id', 'name', 'data'];
diff --git a/app/Models/AccountType.php b/app/Models/AccountType.php
index c2a942460a..54036c23ab 100644
--- a/app/Models/AccountType.php
+++ b/app/Models/AccountType.php
@@ -72,9 +72,9 @@ class AccountType extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ ];
protected $fillable = ['type'];
diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php
index e2ef680150..c0dedb7db3 100644
--- a/app/Models/Attachment.php
+++ b/app/Models/Attachment.php
@@ -97,11 +97,11 @@ class Attachment extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'uploaded' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'uploaded' => 'boolean',
+ ];
protected $fillable = ['attachable_id', 'attachable_type', 'user_id', 'md5', 'filename', 'mime', 'title', 'description', 'size', 'uploaded'];
diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php
index 8a3d8c7e91..95bdaa6120 100644
--- a/app/Models/AvailableBudget.php
+++ b/app/Models/AvailableBudget.php
@@ -80,13 +80,13 @@ class AvailableBudget extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'start_date' => 'date',
- 'end_date' => 'date',
- 'transaction_currency_id' => 'int',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'start_date' => 'date',
+ 'end_date' => 'date',
+ 'transaction_currency_id' => 'int',
+ ];
protected $fillable = ['user_id', 'user_group_id', 'transaction_currency_id', 'amount', 'start_date', 'end_date'];
diff --git a/app/Models/Bill.php b/app/Models/Bill.php
index 5b7e65ce61..ff50cc7aa6 100644
--- a/app/Models/Bill.php
+++ b/app/Models/Bill.php
@@ -114,36 +114,36 @@ class Bill extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'date' => 'date',
- 'end_date' => 'date',
- 'extension_date' => 'date',
- 'skip' => 'int',
- 'automatch' => 'boolean',
- 'active' => 'boolean',
- 'name_encrypted' => 'boolean',
- 'match_encrypted' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'date' => 'date',
+ 'end_date' => 'date',
+ 'extension_date' => 'date',
+ 'skip' => 'int',
+ 'automatch' => 'boolean',
+ 'active' => 'boolean',
+ 'name_encrypted' => 'boolean',
+ 'match_encrypted' => 'boolean',
+ ];
protected $fillable
= [
- 'name',
- 'match',
- 'amount_min',
- 'user_id',
- 'user_group_id',
- 'amount_max',
- 'date',
- 'repeat_freq',
- 'skip',
- 'automatch',
- 'active',
- 'transaction_currency_id',
- 'end_date',
- 'extension_date',
- ];
+ 'name',
+ 'match',
+ 'amount_min',
+ 'user_id',
+ 'user_group_id',
+ 'amount_max',
+ 'date',
+ 'repeat_freq',
+ 'skip',
+ 'automatch',
+ 'active',
+ 'transaction_currency_id',
+ 'end_date',
+ 'extension_date',
+ ];
protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];
diff --git a/app/Models/Budget.php b/app/Models/Budget.php
index 3c13dba221..dd7f9a5a6b 100644
--- a/app/Models/Budget.php
+++ b/app/Models/Budget.php
@@ -97,12 +97,12 @@ class Budget extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'active' => 'boolean',
- 'encrypted' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'active' => 'boolean',
+ 'encrypted' => 'boolean',
+ ];
protected $fillable = ['user_id', 'name', 'active', 'order', 'user_group_id'];
diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php
index 58bc881614..e8528e5e40 100644
--- a/app/Models/BudgetLimit.php
+++ b/app/Models/BudgetLimit.php
@@ -74,18 +74,18 @@ class BudgetLimit extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'start_date' => 'date',
- 'end_date' => 'date',
- 'auto_budget' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'start_date' => 'date',
+ 'end_date' => 'date',
+ 'auto_budget' => 'boolean',
+ ];
protected $dispatchesEvents
= [
- 'created' => Created::class,
- 'updated' => Updated::class,
- 'deleted' => Deleted::class,
- ];
+ 'created' => Created::class,
+ 'updated' => Updated::class,
+ 'deleted' => Deleted::class,
+ ];
protected $fillable = ['budget_id', 'start_date', 'end_date', 'amount', 'transaction_currency_id'];
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 007d95d0f5..5901af1e7c 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -86,11 +86,11 @@ class Category extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'encrypted' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'encrypted' => 'boolean',
+ ];
protected $fillable = ['user_id', 'user_group_id', 'name'];
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index 9d07d927f0..815e3aaa63 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -62,10 +62,10 @@ class Configuration extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ ];
/** @var string The table to store the data in */
protected $table = 'configuration';
diff --git a/app/Models/LinkType.php b/app/Models/LinkType.php
index eb3f5f9f15..f08edd46c8 100644
--- a/app/Models/LinkType.php
+++ b/app/Models/LinkType.php
@@ -72,11 +72,11 @@ class LinkType extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'editable' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'editable' => 'boolean',
+ ];
protected $fillable = ['name', 'inward', 'outward', 'editable'];
diff --git a/app/Models/Location.php b/app/Models/Location.php
index 10962cb375..4b0d913db2 100644
--- a/app/Models/Location.php
+++ b/app/Models/Location.php
@@ -74,13 +74,13 @@ class Location extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'zoomLevel' => 'int',
- 'latitude' => 'float',
- 'longitude' => 'float',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'zoomLevel' => 'int',
+ 'latitude' => 'float',
+ 'longitude' => 'float',
+ ];
protected $fillable = ['locatable_id', 'locatable_type', 'latitude', 'longitude', 'zoom_level'];
diff --git a/app/Models/Note.php b/app/Models/Note.php
index d1fb218940..d3238150da 100644
--- a/app/Models/Note.php
+++ b/app/Models/Note.php
@@ -69,10 +69,10 @@ class Note extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ ];
protected $fillable = ['title', 'text', 'noteable_id', 'noteable_type'];
diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php
index 0ae5b7432d..912748415f 100644
--- a/app/Models/PiggyBank.php
+++ b/app/Models/PiggyBank.php
@@ -92,15 +92,15 @@ class PiggyBank extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'startdate' => 'date',
- 'targetdate' => 'date',
- 'order' => 'int',
- 'active' => 'boolean',
- 'encrypted' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'startdate' => 'date',
+ 'targetdate' => 'date',
+ 'order' => 'int',
+ 'active' => 'boolean',
+ 'encrypted' => 'boolean',
+ ];
protected $fillable = ['name', 'account_id', 'order', 'targetamount', 'startdate', 'targetdate', 'active'];
diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php
index 0fc4268c03..75eef73b50 100644
--- a/app/Models/PiggyBankEvent.php
+++ b/app/Models/PiggyBankEvent.php
@@ -63,10 +63,10 @@ class PiggyBankEvent extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'date' => 'date',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'date' => 'date',
+ ];
protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount'];
diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php
index 5ef34f96ad..5926e1a7bc 100644
--- a/app/Models/PiggyBankRepetition.php
+++ b/app/Models/PiggyBankRepetition.php
@@ -64,11 +64,11 @@ class PiggyBankRepetition extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'startdate' => 'date',
- 'targetdate' => 'date',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'startdate' => 'date',
+ 'targetdate' => 'date',
+ ];
protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount'];
diff --git a/app/Models/Preference.php b/app/Models/Preference.php
index 82758bf0b8..005c9769f8 100644
--- a/app/Models/Preference.php
+++ b/app/Models/Preference.php
@@ -63,10 +63,10 @@ class Preference extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'data' => 'array',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'data' => 'array',
+ ];
protected $fillable = ['user_id', 'data', 'name'];
diff --git a/app/Models/Recurrence.php b/app/Models/Recurrence.php
index e6a1d8fed1..7b9756c31b 100644
--- a/app/Models/Recurrence.php
+++ b/app/Models/Recurrence.php
@@ -104,19 +104,19 @@ class Recurrence extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'title' => 'string',
- 'id' => 'int',
- 'description' => 'string',
- 'first_date' => 'date',
- 'repeat_until' => 'date',
- 'latest_date' => 'date',
- 'repetitions' => 'int',
- 'active' => 'bool',
- 'apply_rules' => 'bool',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'title' => 'string',
+ 'id' => 'int',
+ 'description' => 'string',
+ 'first_date' => 'date',
+ 'repeat_until' => 'date',
+ 'latest_date' => 'date',
+ 'repetitions' => 'int',
+ 'active' => 'bool',
+ 'apply_rules' => 'bool',
+ ];
protected $fillable
= ['user_id', 'transaction_type_id', 'title', 'description', 'first_date', 'repeat_until', 'latest_date', 'repetitions', 'apply_rules', 'active'];
diff --git a/app/Models/RecurrenceMeta.php b/app/Models/RecurrenceMeta.php
index d3d34abf10..d7bd0c060d 100644
--- a/app/Models/RecurrenceMeta.php
+++ b/app/Models/RecurrenceMeta.php
@@ -67,12 +67,12 @@ class RecurrenceMeta extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'name' => 'string',
- 'value' => 'string',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'name' => 'string',
+ 'value' => 'string',
+ ];
protected $fillable = ['recurrence_id', 'name', 'value'];
diff --git a/app/Models/RecurrenceRepetition.php b/app/Models/RecurrenceRepetition.php
index c63a456434..efcb09c1b4 100644
--- a/app/Models/RecurrenceRepetition.php
+++ b/app/Models/RecurrenceRepetition.php
@@ -76,14 +76,14 @@ class RecurrenceRepetition extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'repetition_type' => 'string',
- 'repetition_moment' => 'string',
- 'repetition_skip' => 'int',
- 'weekend' => 'int',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'repetition_type' => 'string',
+ 'repetition_moment' => 'string',
+ 'repetition_skip' => 'int',
+ 'weekend' => 'int',
+ ];
protected $fillable = ['recurrence_id', 'weekend', 'repetition_type', 'repetition_moment', 'repetition_skip'];
diff --git a/app/Models/RecurrenceTransaction.php b/app/Models/RecurrenceTransaction.php
index 0d4364e8c7..f3bf0a5791 100644
--- a/app/Models/RecurrenceTransaction.php
+++ b/app/Models/RecurrenceTransaction.php
@@ -91,25 +91,25 @@ class RecurrenceTransaction extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'amount' => 'string',
- 'foreign_amount' => 'string',
- 'description' => 'string',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'amount' => 'string',
+ 'foreign_amount' => 'string',
+ 'description' => 'string',
+ ];
protected $fillable
= [
- 'recurrence_id',
- 'transaction_currency_id',
- 'foreign_currency_id',
- 'source_id',
- 'destination_id',
- 'amount',
- 'foreign_amount',
- 'description',
- ];
+ 'recurrence_id',
+ 'transaction_currency_id',
+ 'foreign_currency_id',
+ 'source_id',
+ 'destination_id',
+ 'amount',
+ 'foreign_amount',
+ 'description',
+ ];
/** @var string The table to store the data in */
protected $table = 'recurrences_transactions';
diff --git a/app/Models/RecurrenceTransactionMeta.php b/app/Models/RecurrenceTransactionMeta.php
index 6bb4eea372..e0a60d4163 100644
--- a/app/Models/RecurrenceTransactionMeta.php
+++ b/app/Models/RecurrenceTransactionMeta.php
@@ -67,12 +67,12 @@ class RecurrenceTransactionMeta extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'name' => 'string',
- 'value' => 'string',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'name' => 'string',
+ 'value' => 'string',
+ ];
protected $fillable = ['rt_id', 'name', 'value'];
diff --git a/app/Models/Role.php b/app/Models/Role.php
index 39a6216f1f..b356c6fc15 100644
--- a/app/Models/Role.php
+++ b/app/Models/Role.php
@@ -62,9 +62,9 @@ class Role extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ ];
protected $fillable = ['name', 'display_name', 'description'];
diff --git a/app/Models/Rule.php b/app/Models/Rule.php
index befb9640b1..8ccc7c44bc 100644
--- a/app/Models/Rule.php
+++ b/app/Models/Rule.php
@@ -95,15 +95,15 @@ class Rule extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'active' => 'boolean',
- 'order' => 'int',
- 'stop_processing' => 'boolean',
- 'id' => 'int',
- 'strict' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'active' => 'boolean',
+ 'order' => 'int',
+ 'stop_processing' => 'boolean',
+ 'id' => 'int',
+ 'strict' => 'boolean',
+ ];
protected $fillable = ['rule_group_id', 'order', 'active', 'title', 'description', 'user_id', 'strict'];
diff --git a/app/Models/RuleAction.php b/app/Models/RuleAction.php
index a8756a5d50..f8f8e5fe12 100644
--- a/app/Models/RuleAction.php
+++ b/app/Models/RuleAction.php
@@ -66,12 +66,12 @@ class RuleAction extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'active' => 'boolean',
- 'order' => 'int',
- 'stop_processing' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'active' => 'boolean',
+ 'order' => 'int',
+ 'stop_processing' => 'boolean',
+ ];
protected $fillable = ['rule_id', 'action_type', 'action_value', 'order', 'active', 'stop_processing'];
diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.php
index a363e72919..67e6c42f23 100644
--- a/app/Models/RuleGroup.php
+++ b/app/Models/RuleGroup.php
@@ -85,13 +85,13 @@ class RuleGroup extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'active' => 'boolean',
- 'stop_processing' => 'boolean',
- 'order' => 'int',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'active' => 'boolean',
+ 'stop_processing' => 'boolean',
+ 'order' => 'int',
+ ];
protected $fillable = ['user_id', 'user_group_id', 'stop_processing', 'order', 'title', 'description', 'active'];
diff --git a/app/Models/RuleTrigger.php b/app/Models/RuleTrigger.php
index 6d14358ebd..e617ee8b21 100644
--- a/app/Models/RuleTrigger.php
+++ b/app/Models/RuleTrigger.php
@@ -66,12 +66,12 @@ class RuleTrigger extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'active' => 'boolean',
- 'order' => 'int',
- 'stop_processing' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'active' => 'boolean',
+ 'order' => 'int',
+ 'stop_processing' => 'boolean',
+ ];
protected $fillable = ['rule_id', 'trigger_type', 'trigger_value', 'order', 'active', 'stop_processing'];
diff --git a/app/Models/Tag.php b/app/Models/Tag.php
index c5fa90814f..9ba92bc9f3 100644
--- a/app/Models/Tag.php
+++ b/app/Models/Tag.php
@@ -93,14 +93,14 @@ class Tag extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'date' => 'date',
- 'zoomLevel' => 'int',
- 'latitude' => 'float',
- 'longitude' => 'float',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'date' => 'date',
+ 'zoomLevel' => 'int',
+ 'latitude' => 'float',
+ 'longitude' => 'float',
+ ];
protected $fillable = ['user_id', 'user_group_id', 'tag', 'date', 'description', 'tagMode'];
diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php
index 4626848073..974cc3d7a7 100644
--- a/app/Models/Transaction.php
+++ b/app/Models/Transaction.php
@@ -99,28 +99,28 @@ class Transaction extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'identifier' => 'int',
- 'encrypted' => 'boolean', // model does not have these fields though
- 'bill_name_encrypted' => 'boolean',
- 'reconciled' => 'boolean',
- 'date' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'identifier' => 'int',
+ 'encrypted' => 'boolean', // model does not have these fields though
+ 'bill_name_encrypted' => 'boolean',
+ 'reconciled' => 'boolean',
+ 'date' => 'datetime',
+ ];
protected $fillable
= [
- 'account_id',
- 'transaction_journal_id',
- 'description',
- 'amount',
- 'identifier',
- 'transaction_currency_id',
- 'foreign_currency_id',
- 'foreign_amount',
- 'reconciled',
- ];
+ 'account_id',
+ 'transaction_journal_id',
+ 'description',
+ 'amount',
+ 'identifier',
+ 'transaction_currency_id',
+ 'foreign_currency_id',
+ 'foreign_amount',
+ 'reconciled',
+ ];
protected $hidden = ['encrypted'];
diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php
index 8d0c58d319..886bc8a4c8 100644
--- a/app/Models/TransactionCurrency.php
+++ b/app/Models/TransactionCurrency.php
@@ -89,12 +89,12 @@ class TransactionCurrency extends Model
public ?bool $userGroupEnabled;
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'decimal_places' => 'int',
- 'enabled' => 'bool',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'decimal_places' => 'int',
+ 'enabled' => 'bool',
+ ];
protected $fillable = ['name', 'code', 'symbol', 'decimal_places', 'enabled'];
diff --git a/app/Models/TransactionGroup.php b/app/Models/TransactionGroup.php
index 6922513c49..76e4d64a82 100644
--- a/app/Models/TransactionGroup.php
+++ b/app/Models/TransactionGroup.php
@@ -78,13 +78,13 @@ class TransactionGroup extends Model
protected $casts
= [
- 'id' => 'integer',
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'title' => 'string',
- 'date' => 'datetime',
- ];
+ 'id' => 'integer',
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'title' => 'string',
+ 'date' => 'datetime',
+ ];
protected $fillable = ['user_id', 'user_group_id', 'title'];
diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php
index fd26fbcc05..b5e77ee825 100644
--- a/app/Models/TransactionJournal.php
+++ b/app/Models/TransactionJournal.php
@@ -138,32 +138,32 @@ class TransactionJournal extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- 'date' => 'datetime',
- 'interest_date' => 'date',
- 'book_date' => 'date',
- 'process_date' => 'date',
- 'order' => 'int',
- 'tag_count' => 'int',
- 'encrypted' => 'boolean',
- 'completed' => 'boolean',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ 'date' => 'datetime',
+ 'interest_date' => 'date',
+ 'book_date' => 'date',
+ 'process_date' => 'date',
+ 'order' => 'int',
+ 'tag_count' => 'int',
+ 'encrypted' => 'boolean',
+ 'completed' => 'boolean',
+ ];
protected $fillable
= [
- 'user_id',
- 'user_group_id',
- 'transaction_type_id',
- 'bill_id',
- 'tag_count',
- 'transaction_currency_id',
- 'description',
- 'completed',
- 'order',
- 'date',
- ];
+ 'user_id',
+ 'user_group_id',
+ 'transaction_type_id',
+ 'bill_id',
+ 'tag_count',
+ 'transaction_currency_id',
+ 'description',
+ 'completed',
+ 'order',
+ 'date',
+ ];
protected $hidden = ['encrypted'];
diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.php
index 01923e8318..f3237f4664 100644
--- a/app/Models/TransactionJournalLink.php
+++ b/app/Models/TransactionJournalLink.php
@@ -71,9 +71,9 @@ class TransactionJournalLink extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ ];
/** @var string The table to store the data in */
protected $table = 'journal_links';
diff --git a/app/Models/TransactionJournalMeta.php b/app/Models/TransactionJournalMeta.php
index 767eccd314..2b94815cfa 100644
--- a/app/Models/TransactionJournalMeta.php
+++ b/app/Models/TransactionJournalMeta.php
@@ -69,10 +69,10 @@ class TransactionJournalMeta extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ ];
protected $fillable = ['transaction_journal_id', 'name', 'data', 'hash'];
diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.php
index e888294824..7e9c4551bc 100644
--- a/app/Models/TransactionType.php
+++ b/app/Models/TransactionType.php
@@ -73,10 +73,10 @@ class TransactionType extends Model
protected $casts
= [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
+ 'created_at' => 'datetime',
+ 'updated_at' => 'datetime',
+ 'deleted_at' => 'datetime',
+ ];
protected $fillable = ['type'];
/**
diff --git a/app/Repositories/Category/NoCategoryRepository.php b/app/Repositories/Category/NoCategoryRepository.php
index d74749f2df..1da423c8b0 100644
--- a/app/Repositories/Category/NoCategoryRepository.php
+++ b/app/Repositories/Category/NoCategoryRepository.php
@@ -75,9 +75,9 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
$journalId = (int)$journal['transaction_journal_id'];
$array[$currencyId]['categories'][0]['transaction_journals'][$journalId]
= [
- 'amount' => app('steam')->negative($journal['amount']),
- 'date' => $journal['date'],
- ];
+ 'amount' => app('steam')->negative($journal['amount']),
+ 'date' => $journal['date'],
+ ];
}
return $array;
@@ -128,9 +128,9 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
$journalId = (int)$journal['transaction_journal_id'];
$array[$currencyId]['categories'][0]['transaction_journals'][$journalId]
= [
- 'amount' => app('steam')->positive($journal['amount']),
- 'date' => $journal['date'],
- ];
+ 'amount' => app('steam')->positive($journal['amount']),
+ 'date' => $journal['date'],
+ ];
}
return $array;
diff --git a/app/Rules/UniqueIban.php b/app/Rules/UniqueIban.php
index 6df894dfd4..3bc00be090 100644
--- a/app/Rules/UniqueIban.php
+++ b/app/Rules/UniqueIban.php
@@ -146,10 +146,10 @@ class UniqueIban implements ValidationRule
}
$query
= auth()->user()
- ->accounts()
- ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
- ->where('accounts.iban', $iban)
- ->whereIn('account_types.type', $typesArray)
+ ->accounts()
+ ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
+ ->where('accounts.iban', $iban)
+ ->whereIn('account_types.type', $typesArray)
;
if (null !== $this->account) {
diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php
index 15d8d43ac8..c35213211a 100644
--- a/app/Support/Http/Controllers/PeriodOverview.php
+++ b/app/Support/Http/Controllers/PeriodOverview.php
@@ -566,13 +566,13 @@ trait PeriodOverview
}
$entries[]
= [
- 'title' => $title,
- 'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
- 'total_transactions' => count($spent) + count($earned) + count($transferred),
- 'spent' => $this->groupByCurrency($spent),
- 'earned' => $this->groupByCurrency($earned),
- 'transferred' => $this->groupByCurrency($transferred),
- ];
+ 'title' => $title,
+ 'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
+ 'total_transactions' => count($spent) + count($earned) + count($transferred),
+ 'spent' => $this->groupByCurrency($spent),
+ 'earned' => $this->groupByCurrency($earned),
+ 'transferred' => $this->groupByCurrency($transferred),
+ ];
}
return $entries;
diff --git a/app/Support/Report/Budget/BudgetReportGenerator.php b/app/Support/Report/Budget/BudgetReportGenerator.php
index f2836bcca4..7059886943 100644
--- a/app/Support/Report/Budget/BudgetReportGenerator.php
+++ b/app/Support/Report/Budget/BudgetReportGenerator.php
@@ -213,16 +213,16 @@ class BudgetReportGenerator
// make sum information:
$this->report['sums'][$currencyId]
??= [
- 'budgeted' => '0',
- 'spent' => '0',
- 'left' => '0',
- 'overspent' => '0',
- 'currency_id' => $currencyId,
- 'currency_code' => $limitCurrency->code,
- 'currency_name' => $limitCurrency->name,
- 'currency_symbol' => $limitCurrency->symbol,
- 'currency_decimal_places' => $limitCurrency->decimal_places,
- ];
+ 'budgeted' => '0',
+ 'spent' => '0',
+ 'left' => '0',
+ 'overspent' => '0',
+ 'currency_id' => $currencyId,
+ 'currency_code' => $limitCurrency->code,
+ 'currency_name' => $limitCurrency->name,
+ 'currency_symbol' => $limitCurrency->symbol,
+ 'currency_decimal_places' => $limitCurrency->decimal_places,
+ ];
$this->report['sums'][$currencyId]['budgeted'] = bcadd($this->report['sums'][$currencyId]['budgeted'], $limit->amount);
$this->report['sums'][$currencyId]['spent'] = bcadd($this->report['sums'][$currencyId]['spent'], $spent);
$this->report['sums'][$currencyId]['left'] = bcadd($this->report['sums'][$currencyId]['left'], bcadd($limit->amount, $spent));
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php
index 65b27f3bb9..8072d178f3 100644
--- a/app/Validation/FireflyValidator.php
+++ b/app/Validation/FireflyValidator.php
@@ -824,7 +824,8 @@ class FireflyValidator extends Validator
->where('trigger', $trigger)
->where('response', $response)
->where('delivery', $delivery)
- ->where('url', $url)->count();
+ ->where('url', $url)->count()
+ ;
}
return false;