Skip to content

Firefly III: a personal finances manager

🤖 Auto commit for release 'develop' on 2026-03-06

JC5b66f95f1dcc8
diff --git a/app/Api/V1/Controllers/Models/Bill/DestroyController.php b/app/Api/V1/Controllers/Models/Bill/DestroyController.php
index 7769129d6d..066cb2f899 100644
--- a/app/Api/V1/Controllers/Models/Bill/DestroyController.php
+++ b/app/Api/V1/Controllers/Models/Bill/DestroyController.php
@@ -45,7 +45,7 @@ final class DestroyController extends Controller
parent::__construct();
$this->middleware(function ($request, $next) {
$this->repository = app(BillRepositoryInterface::class);
- $this->repository->setUser(auth( )->user());
+ $this->repository->setUser(auth()->user());
return $next($request);
});
diff --git a/app/Api/V1/Controllers/System/BatchController.php b/app/Api/V1/Controllers/System/BatchController.php
index 0070f987b3..7d15b8514b 100644
--- a/app/Api/V1/Controllers/System/BatchController.php
+++ b/app/Api/V1/Controllers/System/BatchController.php
@@ -62,7 +62,7 @@ final class BatchController extends Controller
}
Log::debug(sprintf('Counted %d journals.', count($journals)));
- /** @var TransactionJournal|null $first */
+ /** @var null|TransactionJournal $first */
$first = $journals->first();
$group = $first?->transactionGroup;
if (null === $group) {
diff --git a/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php b/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php
index 018c214d4b..d6ec6294c3 100644
--- a/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php
+++ b/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php
@@ -61,7 +61,7 @@ class UpdateRequest extends FormRequest
*/
public function rules(): array
{
- /** @var TransactionCurrency|string $currency */
+ /** @var string|TransactionCurrency $currency */
$currency = $this->route()->parameter('currency_code');
if (is_string($currency)) {
$currency = TransactionCurrency::whereCode($currency)->first();
diff --git a/app/Console/Commands/Correction/CorrectsIbans.php b/app/Console/Commands/Correction/CorrectsIbans.php
index 8b3ae9da56..dca465b685 100644
--- a/app/Console/Commands/Correction/CorrectsIbans.php
+++ b/app/Console/Commands/Correction/CorrectsIbans.php
@@ -35,9 +35,9 @@ class CorrectsIbans extends Command
{
use ShowsFriendlyMessages;
- protected $description = 'Removes spaces from IBANs';
- protected $signature = 'correction:ibans';
- private int $count = 0;
+ protected $description = 'Removes spaces from IBANs';
+ protected $signature = 'correction:ibans';
+ private int $count = 0;
/**
* Execute the console command.
@@ -57,13 +57,13 @@ class CorrectsIbans extends Command
/** @var Account $account */
foreach ($accounts as $account) {
- $userId = $account->user_id;
+ $userId = $account->user_id;
$set[$userId] ??= [];
- $iban = (string)$account->iban;
+ $iban = (string) $account->iban;
if ('' === $iban) {
continue;
}
- $type = $account->accountType->type;
+ $type = $account->accountType->type;
if (in_array($type, [AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::MORTGAGE->value], true)) {
$type = 'liabilities';
}
@@ -79,7 +79,13 @@ class CorrectsIbans extends Command
}
}
if ($showWarningAndCorrect) {
- $this->friendlyWarning(sprintf('IBAN "%s" is used more than once and will be removed from %s #%d ("%s")', $iban, $account->accountType->type, $account->id, $account->name));
+ $this->friendlyWarning(sprintf(
+ 'IBAN "%s" is used more than once and will be removed from %s #%d ("%s")',
+ $iban,
+ $account->accountType->type,
+ $account->id,
+ $account->name
+ ));
$account->iban = null;
$account->save();
++$this->count;
@@ -95,8 +101,8 @@ class CorrectsIbans extends Command
{
/** @var Account $account */
foreach ($accounts as $account) {
- $iban = (string)$account->iban;
- $newIban = Steam::filterSpaces($iban);
+ $iban = (string) $account->iban;
+ $newIban = Steam::filterSpaces($iban);
if ('' !== $iban && $iban !== $newIban) {
$account->iban = $newIban;
$account->save();
@@ -106,7 +112,7 @@ class CorrectsIbans extends Command
// same for account number:
$accountNumber = $account->accountMeta->where('name', 'account_number')->first();
if (null !== $accountNumber) {
- $number = (string)$accountNumber->value;
+ $number = (string) $accountNumber->value;
$newNumber = Steam::filterSpaces($number);
if ('' !== $number && $number !== $newNumber) {
$accountNumber->value = $newNumber;
diff --git a/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php b/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php
index 3e6f53f0e8..8518b165f6 100644
--- a/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php
+++ b/app/Console/Commands/Upgrade/UpgradesLiabilitiesEight.php
@@ -103,9 +103,11 @@ class UpgradesLiabilitiesEight extends Command
{
/** @var TransactionType $openingBalanceType */
$openingBalanceType = TransactionType::whereType(TransactionTypeEnum::OPENING_BALANCE->value)->first();
+
/** @var TransactionType $liabilityType */
$liabilityType = TransactionType::whereType(TransactionTypeEnum::LIABILITY_CREDIT->value)->first();
- /** @var TransactionJournal|null $openingJournal */
+
+ /** @var null|TransactionJournal $openingJournal */
$openingJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $openingBalanceType->id)
@@ -114,7 +116,8 @@ class UpgradesLiabilitiesEight extends Command
if (null === $openingJournal) {
return false;
}
- /** @var TransactionJournal|null $liabilityJournal */
+
+ /** @var null|TransactionJournal $liabilityJournal */
$liabilityJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $liabilityType->id)
diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php
index f4b3281d7c..064d7e5d57 100644
--- a/app/Factory/TransactionJournalFactory.php
+++ b/app/Factory/TransactionJournalFactory.php
@@ -56,6 +56,7 @@ use FireflyIII\Validation\AccountValidator;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use JsonException;
+
use function Safe\json_encode;
/**
@@ -67,17 +68,17 @@ class TransactionJournalFactory
{
use JournalServiceTrait;
- private AccountRepositoryInterface $accountRepository;
- private AccountValidator $accountValidator;
- private BillRepositoryInterface $billRepository;
- private CurrencyRepositoryInterface $currencyRepository;
- private bool $errorOnHash = false;
- private array $fields;
- private PiggyBankEventFactory $piggyEventFactory;
- private PiggyBankRepositoryInterface $piggyRepository;
+ private AccountRepositoryInterface $accountRepository;
+ private AccountValidator $accountValidator;
+ private BillRepositoryInterface $billRepository;
+ private CurrencyRepositoryInterface $currencyRepository;
+ private bool $errorOnHash = false;
+ private array $fields;
+ private PiggyBankEventFactory $piggyEventFactory;
+ private PiggyBankRepositoryInterface $piggyRepository;
private TransactionTypeRepositoryInterface $typeRepository;
- private User $user;
- private UserGroup $userGroup;
+ private User $user;
+ private UserGroup $userGroup;
/**
* Constructor.
@@ -108,8 +109,8 @@ class TransactionJournalFactory
public function create(array $data): Collection
{
Log::debug('Now in TransactionJournalFactory::create()');
- $collection = new Collection();
- $transactions = $data['transactions'] ?? [];
+ $collection = new Collection();
+ $transactions = $data['transactions'] ?? [];
if (0 === count($transactions)) {
Log::error('There are no transactions in the array, the TransactionJournalFactory cannot continue.');
@@ -122,7 +123,7 @@ class TransactionJournalFactory
foreach ($transactions as $index => $row) {
$row['batch_submission'] = $batchSubmission;
Log::debug(sprintf('Now creating journal %d/%d', $index + 1, count($transactions)));
- $journal = $this->createJournal(new NullArrayObject($row));
+ $journal = $this->createJournal(new NullArrayObject($row));
if ($journal instanceof TransactionJournal) {
$collection->push($journal);
}
@@ -187,7 +188,7 @@ class TransactionJournalFactory
protected function storeMeta(TransactionJournal $journal, array $data, string $field): void
{
- $set = ['journal' => $journal, 'name' => $field, 'data' => (string)($data[$field] ?? '')];
+ $set = ['journal' => $journal, 'name' => $field, 'data' => (string) ($data[$field] ?? '')];
if (array_key_exists($field, $data) && $data[$field] instanceof Carbon) {
$data[$field]->setTimezone(config('app.timezone'));
Log::debug(sprintf('%s Date: %s (%s)', $field, $data[$field], $data[$field]->timezone->getName()));
@@ -234,18 +235,18 @@ class TransactionJournalFactory
$this->errorIfDuplicate($row['import_hash_v2']);
// Some basic fields
- $type = $this->typeRepository->findTransactionType(null, $row['type']);
- $carbon = $row['date'] ?? today(config('app.timezone'));
- $order = $row['order'] ?? 0;
+ $type = $this->typeRepository->findTransactionType(null, $row['type']);
+ $carbon = $row['date'] ?? today(config('app.timezone'));
+ $order = $row['order'] ?? 0;
Log::debug('Find currency or return default.');
- $currency = $this->currencyRepository->findCurrency((int)$row['currency_id'], $row['currency_code']);
+ $currency = $this->currencyRepository->findCurrency((int) $row['currency_id'], $row['currency_code']);
Log::debug('Find foreign currency or return NULL.');
- $foreignCurrency = $this->currencyRepository->findCurrencyNull($row['foreign_currency_id'], $row['foreign_currency_code']);
- $bill = $this->billRepository->findBill((int)$row['bill_id'], $row['bill_name']);
- $billId = TransactionTypeEnum::WITHDRAWAL->value === $type->type && $bill instanceof Bill ? $bill->id : null;
- $description = (string)$row['description'];
+ $foreignCurrency = $this->currencyRepository->findCurrencyNull($row['foreign_currency_id'], $row['foreign_currency_code']);
+ $bill = $this->billRepository->findBill((int) $row['bill_id'], $row['bill_name']);
+ $billId = TransactionTypeEnum::WITHDRAWAL->value === $type->type && $bill instanceof Bill ? $bill->id : null;
+ $description = (string) $row['description'];
// Manipulate basic fields
$carbon->setTimezone(config('app.timezone'));
@@ -266,7 +267,7 @@ class TransactionJournalFactory
}
/** create or get source and destination accounts */
- $sourceInfo = [
+ $sourceInfo = [
'id' => $row['source_id'],
'name' => $row['source_name'],
'iban' => $row['source_iban'],
@@ -275,7 +276,7 @@ class TransactionJournalFactory
'currency_id' => $currency->id,
];
- $destInfo = [
+ $destInfo = [
'id' => $row['destination_id'],
'name' => $row['destination_name'],
'iban' => $row['destination_iban'],
@@ -285,8 +286,8 @@ class TransactionJournalFactory
];
Log::debug('Source info:', $sourceInfo);
Log::debug('Destination info:', $destInfo);
- $destinationAccount = null;
- $sourceAccount = null;
+ $destinationAccount = null;
+ $sourceAccount = null;
if (TransactionTypeEnum::DEPOSIT->value === $type->type) {
Log::debug('Transaction type is deposit, start with destination first.');
$destinationAccount = $this->getAccount($type->type, 'destination', $destInfo);
@@ -311,38 +312,38 @@ class TransactionJournalFactory
[$sourceAccount, $destinationAccount] = $this->reconciliationSanityCheck($sourceAccount, $destinationAccount);
}
- $currency = $this->getCurrencyByAccount($type->type, $currency, $sourceAccount, $destinationAccount);
- $foreignCurrency = $this->compareCurrencies($currency, $foreignCurrency);
- $foreignCurrency = $this->getForeignByAccount($type->type, $foreignCurrency, $destinationAccount);
- $description = $this->getDescription($description);
+ $currency = $this->getCurrencyByAccount($type->type, $currency, $sourceAccount, $destinationAccount);
+ $foreignCurrency = $this->compareCurrencies($currency, $foreignCurrency);
+ $foreignCurrency = $this->getForeignByAccount($type->type, $foreignCurrency, $destinationAccount);
+ $description = $this->getDescription($description);
Log::debug(sprintf(
- 'Currency is #%d "%s", foreign currency is #%d "%s"',
- $currency->id,
- $currency->code,
- $foreignCurrency?->id,
- $foreignCurrency?->code
- ));
+ 'Currency is #%d "%s", foreign currency is #%d "%s"',
+ $currency->id,
+ $currency->code,
+ $foreignCurrency?->id,
+ $foreignCurrency?->code
+ ));
Log::debug(sprintf('Date: %s (%s)', $carbon->toW3cString(), $carbon->getTimezone()->getName()));
/** Create a basic journal. */
- $journal = TransactionJournal::create([
- 'user_id' => $this->user->id,
- 'user_group_id' => $this->userGroup->id,
- 'transaction_type_id' => $type->id,
- 'bill_id' => $billId,
- 'transaction_currency_id' => $currency->id,
- 'description' => substr($description, 0, 1000),
- 'date' => $carbon,
- 'date_tz' => $carbon->format('e'),
- 'order' => $order,
- 'tag_count' => 0,
- 'completed' => is_bool($row['batch_submission']) && !$row['batch_submission'],
- ]);
+ $journal = TransactionJournal::create([
+ 'user_id' => $this->user->id,
+ 'user_group_id' => $this->userGroup->id,
+ 'transaction_type_id' => $type->id,
+ 'bill_id' => $billId,
+ 'transaction_currency_id' => $currency->id,
+ 'description' => substr($description, 0, 1000),
+ 'date' => $carbon,
+ 'date_tz' => $carbon->format('e'),
+ 'order' => $order,
+ 'tag_count' => 0,
+ 'completed' => is_bool($row['batch_submission']) && !$row['batch_submission'],
+ ]);
Log::debug(sprintf('Created new journal #%d: "%s"', $journal->id, $journal->description));
/** Create two transactions. */
- $transactionFactory = app(TransactionFactory::class);
+ $transactionFactory = app(TransactionFactory::class);
$transactionFactory->setJournal($journal);
$transactionFactory->setAccount($sourceAccount);
$transactionFactory->setCurrency($currency);
@@ -351,7 +352,7 @@ class TransactionJournalFactory
$transactionFactory->setReconciled($row['reconciled'] ?? false);
try {
- $negative = $transactionFactory->createNegative((string)$row['amount'], (string)$row['foreign_amount']);
+ $negative = $transactionFactory->createNegative((string) $row['amount'], (string) $row['foreign_amount']);
} catch (FireflyException $e) {
Log::error(sprintf('Exception creating negative transaction: %s', $e->getMessage()));
$this->forceDeleteOnError(new Collection()->push($journal));
@@ -360,7 +361,7 @@ class TransactionJournalFactory
}
/** @var TransactionFactory $transactionFactory */
- $transactionFactory = app(TransactionFactory::class);
+ $transactionFactory = app(TransactionFactory::class);
$transactionFactory->setJournal($journal);
$transactionFactory->setAccount($destinationAccount);
$transactionFactory->setAccountInformation($destInfo);
@@ -372,8 +373,8 @@ class TransactionJournalFactory
// Firefly III will save the foreign currency information in such a way that both
// asset accounts can look at the "amount" and "transaction_currency_id" column and
// see the currency they expect to see.
- $amount = (string)$row['amount'];
- $foreignAmount = (string)$row['foreign_amount'];
+ $amount = (string) $row['amount'];
+ $foreignAmount = (string) $row['foreign_amount'];
if (
$foreignCurrency instanceof TransactionCurrency
&& $foreignCurrency->id !== $currency->id
@@ -381,8 +382,8 @@ class TransactionJournalFactory
) {
$transactionFactory->setCurrency($foreignCurrency);
$transactionFactory->setForeignCurrency($currency);
- $amount = (string)$row['foreign_amount'];
- $foreignAmount = (string)$row['amount'];
+ $amount = (string) $row['foreign_amount'];
+ $foreignAmount = (string) $row['amount'];
Log::debug('Swap primary/foreign amounts in transfer for new save method.');
}
@@ -425,17 +426,18 @@ class TransactionJournalFactory
/** @var null|TransactionJournalMeta $result */
$result = TransactionJournalMeta::withTrashed()
- ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id')
- ->whereNotNull('transaction_journals.id')
- ->where('transaction_journals.user_id', $this->user->id)
- ->where('data', json_encode($hash, JSON_THROW_ON_ERROR))
- ->with(['transactionJournal', 'transactionJournal.transactionGroup'])
- ->first(['journal_meta.*']);
+ ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id')
+ ->whereNotNull('transaction_journals.id')
+ ->where('transaction_journals.user_id', $this->user->id)
+ ->where('data', json_encode($hash, JSON_THROW_ON_ERROR))
+ ->with(['transactionJournal', 'transactionJournal.transactionGroup'])
+ ->first(['journal_meta.*'])
+ ;
if (null !== $result) {
Log::warning(sprintf('Found a duplicate in errorIfDuplicate because hash %s is not unique!', $hash));
$journal = $result->transactionJournal()->withTrashed()->first();
$group = $journal?->transactionGroup()->withTrashed()->first();
- $groupId = (int)$group?->id;
+ $groupId = (int) $group?->id;
throw new DuplicateTransactionException(sprintf('Duplicate of transaction #%d.', $groupId));
}
@@ -472,7 +474,7 @@ class TransactionJournalFactory
// return user's default:
return Amount::getPrimaryCurrencyByUserGroup($this->user->userGroup);
}
- $result = $preference ?? $currency;
+ $result = $preference ?? $currency;
Log::debug(sprintf('Currency is now #%d (%s) because of account #%d (%s)', $result->id, $result->code, $account->id, $account->name));
return $result;
@@ -605,7 +607,7 @@ class TransactionJournalFactory
{
Log::debug('Will now store piggy event.');
- $piggyBank = $this->piggyRepository->findPiggyBank((int)$data['piggy_bank_id'], $data['piggy_bank_name']);
+ $piggyBank = $this->piggyRepository->findPiggyBank((int) $data['piggy_bank_id'], $data['piggy_bank_name']);
if ($piggyBank instanceof PiggyBank) {
$this->piggyEventFactory->create($journal, $piggyBank);
@@ -622,18 +624,18 @@ class TransactionJournalFactory
private function validateAccounts(NullArrayObject $data): void
{
Log::debug(sprintf('Now in %s', __METHOD__));
- $transactionType = $data['type'] ?? 'invalid';
+ $transactionType = $data['type'] ?? 'invalid';
$this->accountValidator->setUser($this->user);
$this->accountValidator->setTransactionType($transactionType);
// validate source account.
- $array = [
- 'id' => null !== $data['source_id'] ? (int)$data['source_id'] : null,
- 'name' => null !== $data['source_name'] ? (string)$data['source_name'] : null,
- 'iban' => null !== $data['source_iban'] ? (string)$data['source_iban'] : null,
- 'number' => null !== $data['source_number'] ? (string)$data['source_number'] : null,
+ $array = [
+ 'id' => null !== $data['source_id'] ? (int) $data['source_id'] : null,
+ 'name' => null !== $data['source_name'] ? (string) $data['source_name'] : null,
+ 'iban' => null !== $data['source_iban'] ? (string) $data['source_iban'] : null,
+ 'number' => null !== $data['source_number'] ? (string) $data['source_number'] : null,
];
- $validSource = $this->accountValidator->validateSource($array);
+ $validSource = $this->accountValidator->validateSource($array);
// do something with result:
if (false === $validSource) {
@@ -642,11 +644,11 @@ class TransactionJournalFactory
Log::debug('Source seems valid.');
// validate destination account
- $array = [
- 'id' => null !== $data['destination_id'] ? (int)$data['destination_id'] : null,
- 'name' => null !== $data['destination_name'] ? (string)$data['destination_name'] : null,
- 'iban' => null !== $data['destination_iban'] ? (string)$data['destination_iban'] : null,
- 'number' => null !== $data['destination_number'] ? (string)$data['destination_number'] : null,
+ $array = [
+ 'id' => null !== $data['destination_id'] ? (int) $data['destination_id'] : null,
+ 'name' => null !== $data['destination_name'] ? (string) $data['destination_name'] : null,
+ 'iban' => null !== $data['destination_iban'] ? (string) $data['destination_iban'] : null,
+ 'number' => null !== $data['destination_number'] ? (string) $data['destination_number'] : null,
];
$validDestination = $this->accountValidator->validateDestination($array);
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 055f083cf3..8cdb92bf1b 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -123,6 +123,7 @@ final class LoginController extends Controller
// send a custom login event because laravel will also fire a login event if a "remember me"-cookie
// restores the event.
event(new UserSuccessfullyLoggedIn($this->guard()->user()));
+
return $this->sendLoginResponse($request);
}
Log::warning('Login attempt failed.');
diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php
index 70c06e3224..6c8b317340 100644
--- a/app/Http/Controllers/DebugController.php
+++ b/app/Http/Controllers/DebugController.php
@@ -52,8 +52,10 @@ use Illuminate\View\View;
use Monolog\Handler\RotatingFileHandler;
use Safe\Exceptions\FilesystemException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+
use function Safe\file_get_contents;
use function Safe\ini_get;
+
use const PHP_INT_SIZE;
use const PHP_SAPI;
@@ -102,7 +104,7 @@ final class DebugController extends Controller
*
* @throws FireflyException
*/
- public function flush(Request $request): Redirector | RedirectResponse
+ public function flush(Request $request): Redirector|RedirectResponse
{
Preferences::mark();
$request->session()->forget(['start', 'end', '_previous', 'viewRange', 'range', 'is_custom_range', 'temp-mfa-secret', 'temp-mfa-codes']);
@@ -138,14 +140,14 @@ final class DebugController extends Controller
*
* @throws FilesystemException
*/
- public function index(): Factory | \Illuminate\Contracts\View\View
+ public function index(): Factory|\Illuminate\Contracts\View\View
{
- $table = $this->generateTable();
- $table = str_replace(["\n", "\t", ' '], '', $table);
- $now = now(config('app.timezone'))->format('Y-m-d H:i:s');
+ $table = $this->generateTable();
+ $table = str_replace(["\n", "\t", ' '], '', $table);
+ $now = now(config('app.timezone'))->format('Y-m-d H:i:s');
// get latest log file:
- $logger = Log::driver();
+ $logger = Log::driver();
// PHPstan doesn't recognize the method because of its polymorphic nature.
$handlers = $logger->getHandlers();
$logContent = '';
@@ -159,10 +161,10 @@ final class DebugController extends Controller
}
if ('' !== $logContent) {
// last few lines
- $logContent = 'Truncated from this point <----|' . substr($logContent, -16384);
+ $logContent = 'Truncated from this point <----|'.substr($logContent, -16384);
}
- return view('debug', ['table' => $table, 'now' => $now, 'logContent' => $logContent]);
+ return view('debug', ['table' => $table, 'now' => $now, 'logContent' => $logContent]);
}
public function routes(Request $request): never
@@ -239,13 +241,13 @@ final class DebugController extends Controller
continue;
}
- $params = [];
+ $params = [];
foreach ($route->parameterNames() as $name) {
$params[] = $this->getParameter($name);
}
$return[$route->getName()] = route($route->getName(), $params);
}
- $count = 0;
+ $count = 0;
echo '<hr>';
echo '<h1>Routes</h1>';
echo sprintf('<h2>%s</h2>', $count);
@@ -265,7 +267,7 @@ final class DebugController extends Controller
/**
* Flash all types of messages.
*/
- public function testFlash(Request $request): Redirector | RedirectResponse
+ public function testFlash(Request $request): Redirector|RedirectResponse
{
$request->session()->flash('success', 'This is a success message.');
$request->session()->flash('info', 'This is an info message.');
@@ -283,15 +285,15 @@ final class DebugController extends Controller
$app = $this->getAppInfo();
$user = $this->getUserInfo();
- return (string)view('partials.debug-table', ['system' => $system, 'docker' => $docker, 'app' => $app, 'user' => $user]);
+ return (string) view('partials.debug-table', ['system' => $system, 'docker' => $docker, 'app' => $app, 'user' => $user]);
}
private function getAppInfo(): array
{
- $userGuard = config('auth.defaults.guard');
+ $userGuard = config('auth.defaults.guard');
$config = FireflyConfig::get('last_rt_job', 0);
- $lastTime = (int)$config->data;
+ $lastTime = (int) $config->data;
$lastCronjob = 'never';
$lastCronjobAgo = 'never';
if ($lastTime > 0) {
@@ -302,9 +304,9 @@ final class DebugController extends Controller
return [
'debug' => var_export(config('app.debug'), true),
- 'audit_log_channel' => join(', ', config('logging.channels.audit.channels')),
- 'default_language' => (string)config('firefly.default_language'),
- 'default_locale' => (string)config('firefly.default_locale'),
+ 'audit_log_channel' => implode(', ', config('logging.channels.audit.channels')),
+ 'default_language' => (string) config('firefly.default_language'),
+ 'default_locale' => (string) config('firefly.default_locale'),
'remote_header' => 'remote_user_guard' === $userGuard ? config('auth.guard_header') : 'N/A',
'remote_mail_header' => 'remote_user_guard' === $userGuard ? config('auth.guard_email') : 'N/A',
'stateful_domains' => implode(', ', config('sanctum.stateful')),
@@ -313,8 +315,8 @@ final class DebugController extends Controller
// any of the cron jobs will do, they always run at the same time.
// but this job is the oldest, so the biggest chance it ran once
- 'last_cronjob' => $lastCronjob,
- 'last_cronjob_ago' => $lastCronjobAgo,
+ 'last_cronjob' => $lastCronjob,
+ 'last_cronjob_ago' => $lastCronjobAgo,
];
}
@@ -463,7 +465,7 @@ final class DebugController extends Controller
'bits' => PHP_INT_SIZE * 8,
'bcscale' => bcscale(),
'display_errors' => ini_get('display_errors'),
- 'error_reporting' => $this->errorReporting((int)ini_get('error_reporting')),
+ 'error_reporting' => $this->errorReporting((int) ini_get('error_reporting')),
'upload_size' => min($maxFileSize, $maxPostSize),
'all_drivers' => $drivers,
'current_driver' => $currentDriver,
@@ -472,10 +474,10 @@ final class DebugController extends Controller
private function getUserFlags(): string
{
- $flags = [];
+ $flags = [];
/** @var User $user */
- $user = auth()->user();
+ $user = auth()->user();
// has liabilities
if ($user->accounts()->accountTypeIn([AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value])->count() > 0) {
@@ -491,7 +493,7 @@ final class DebugController extends Controller
}
// has stored reconciliations
- $type = TransactionType::whereType(TransactionTypeEnum::RECONCILIATION->value)->first();
+ $type = TransactionType::whereType(TransactionTypeEnum::RECONCILIATION->value)->first();
if ($user->transactionJournals()->where('transaction_type_id', $type->id)->count() > 0) {
$flags[] = '<span title="Has reconciled">:ledger:</span>';
}
@@ -523,22 +525,22 @@ final class DebugController extends Controller
private function getUserInfo(): array
{
- $userFlags = $this->getUserFlags();
+ $userFlags = $this->getUserFlags();
// user info
- $userAgent = request()->header('user-agent');
+ $userAgent = request()->header('user-agent');
// set languages, see what happens:
$original = setlocale(LC_ALL, '0');
$localeAttempts = [];
$parts = Steam::getLocaleArray(Steam::getLocale());
foreach ($parts as $code) {
- $code = trim($code);
+ $code = trim($code);
Log::debug(sprintf('Trying to set %s', $code));
$result = setlocale(LC_ALL, $code);
$localeAttempts[$code] = $result === $code;
}
- setlocale(LC_ALL, (string)$original);
+ setlocale(LC_ALL, (string) $original);
return [
'user_id' => auth()->user()->id,
diff --git a/app/Listeners/Model/Webhook/SendsWebhookMessages.php b/app/Listeners/Model/Webhook/SendsWebhookMessages.php
index 26cd6d989b..871593aaee 100644
--- a/app/Listeners/Model/Webhook/SendsWebhookMessages.php
+++ b/app/Listeners/Model/Webhook/SendsWebhookMessages.php
@@ -58,6 +58,7 @@ class SendsWebhookMessages implements ShouldQueue
$message->save();
Log::debug(sprintf('Send message #%d', $message->id));
SendWebhookMessage::dispatch($message)->afterResponse();
+
continue;
}
Log::debug(sprintf('Skip message #%d', $message->id));
diff --git a/app/Models/Bill.php b/app/Models/Bill.php
index d91ea7c3aa..6e07a06ca0 100644
--- a/app/Models/Bill.php
+++ b/app/Models/Bill.php
@@ -41,8 +41,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* @property Carbon $date
- * @property Carbon|null $end_date
- * @property Carbon|null $extension_date
+ * @property null|Carbon $end_date
+ * @property null|Carbon $extension_date
*/
#[ObservedBy([BillObserver::class])]
class Bill extends Model
@@ -51,49 +51,48 @@ class Bill extends Model
use ReturnsIntegerUserIdTrait;
use SoftDeletes;
- protected $fillable
- = [
- 'name',
- 'match',
- 'amount_min',
- 'user_id',
- 'user_group_id',
- 'amount_max',
- 'date',
- 'date_tz',
- 'repeat_freq',
- 'skip',
- 'automatch',
- 'active',
- 'transaction_currency_id',
- 'end_date',
- 'extension_date',
- 'end_date_tz',
- 'extension_date_tz',
- 'native_amount_min',
- 'native_amount_max',
- ];
-
- protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];
+ protected $fillable = [
+ 'name',
+ 'match',
+ 'amount_min',
+ 'user_id',
+ 'user_group_id',
+ 'amount_max',
+ 'date',
+ 'date_tz',
+ 'repeat_freq',
+ 'skip',
+ 'automatch',
+ 'active',
+ 'transaction_currency_id',
+ 'end_date',
+ 'extension_date',
+ 'end_date_tz',
+ 'extension_date_tz',
+ 'native_amount_min',
+ 'native_amount_max',
+ ];
+
+ protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];
/**
* Route binder. Converts the key in the URL to the specified object (or throw 404).
*
* @throws NotFoundHttpException
*/
- public static function routeBinder(self | string $value): self
+ public static function routeBinder(self|string $value): self
{
if ($value instanceof self) {
- $value = (int)$value->id;
+ $value = (int) $value->id;
}
if (auth()->check()) {
- $billId = (int)$value;
+ $billId = (int) $value;
/** @var User $user */
- $user = auth()->user();
+ $user = auth()->user();
/** @var null|Bill $bill */
- $bill = $user->bills()->find($billId);
+ $bill = $user->bills()->find($billId);
if (null !== $bill) {
return $bill;
}
@@ -128,7 +127,7 @@ class Bill extends Model
*/
public function setAmountMaxAttribute($value): void
{
- $this->attributes['amount_max'] = (string)$value;
+ $this->attributes['amount_max'] = (string) $value;
}
/**
@@ -136,7 +135,7 @@ class Bill extends Model
*/
public function setAmountMinAttribute($value): void
{
- $this->attributes['amount_min'] = (string)$value;
+ $this->attributes['amount_min'] = (string) $value;
}
public function transactionCurrency(): BelongsTo
@@ -159,7 +158,7 @@ class Bill extends Model
*/
protected function amountMax(): Attribute
{
- return Attribute::make(get: static fn($value): string => (string)$value);
+ return Attribute::make(get: static fn ($value): string => (string) $value);
}
/**
@@ -167,7 +166,7 @@ class Bill extends Model
*/
protected function amountMin(): Attribute
{
- return Attribute::make(get: static fn($value): string => (string)$value);
+ return Attribute::make(get: static fn ($value): string => (string) $value);
}
protected function casts(): array
@@ -193,7 +192,7 @@ class Bill extends Model
protected function order(): Attribute
{
- return Attribute::make(get: static fn($value): int => (int)$value);
+ return Attribute::make(get: static fn ($value): int => (int) $value);
}
/**
@@ -201,11 +200,11 @@ class Bill extends Model
*/
protected function skip(): Attribute
{
- return Attribute::make(get: static fn($value): int => (int)$value);
+ return Attribute::make(get: static fn ($value): int => (int) $value);
}
protected function transactionCurrencyId(): Attribute
{
- return Attribute::make(get: static fn($value): int => (int)$value);
+ return Attribute::make(get: static fn ($value): int => (int) $value);
}
}
diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php
index 4f316d0704..908bbb9d9e 100644
--- a/app/Models/PiggyBank.php
+++ b/app/Models/PiggyBank.php
@@ -38,8 +38,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * @property Carbon|null $target_date
- * @property Carbon|null $start_date
+ * @property null|Carbon $target_date
+ * @property null|Carbon $start_date
*/
#[ObservedBy([PiggyBankObserver::class])]
class PiggyBank extends Model
@@ -47,37 +47,37 @@ class PiggyBank extends Model
use ReturnsIntegerIdTrait;
use SoftDeletes;
- protected $fillable
- = [
- 'name',
- 'order',
- 'target_amount',
- 'start_date',
- 'start_date_tz',
- 'target_date',
- 'target_date_tz',
- 'active',
- 'transaction_currency_id',
- 'native_target_amount',
- ];
+ protected $fillable = [
+ 'name',
+ 'order',
+ 'target_amount',
+ 'start_date',
+ 'start_date_tz',
+ 'target_date',
+ 'target_date_tz',
+ 'active',
+ 'transaction_currency_id',
+ 'native_target_amount',
+ ];
/**
* Route binder. Converts the key in the URL to the specified object (or throw 404).
*
* @throws NotFoundHttpException
*/
- public static function routeBinder(self | string $value): self
+ public static function routeBinder(self|string $value): self
{
if ($value instanceof self) {
- $value = (int)$value->id;
+ $value = (int) $value->id;
}
if (auth()->check()) {
- $piggyBankId = (int)$value;
+ $piggyBankId = (int) $value;
$piggyBank = self::where('piggy_banks.id', $piggyBankId)
- ->leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id')
- ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')
- ->where('accounts.user_id', auth()->user()->id)
- ->first(['piggy_banks.*']);
+ ->leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id')
+ ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')
+ ->where('accounts.user_id', auth()->user()->id)
+ ->first(['piggy_banks.*'])
+ ;
if (null !== $piggyBank) {
return $piggyBank;
}
@@ -132,7 +132,7 @@ class PiggyBank extends Model
*/
public function setTargetAmountAttribute($value): void
{
- $this->attributes['target_amount'] = (string)$value;
+ $this->attributes['target_amount'] = (string) $value;
}
public function transactionCurrency(): BelongsTo
@@ -142,7 +142,7 @@ class PiggyBank extends Model
protected function accountId(): Attribute
{
- return Attribute::make(get: static fn($value): int => (int)$value);
+ return Attribute::make(get: static fn ($value): int => (int) $value);
}
protected function casts(): array
@@ -163,7 +163,7 @@ class PiggyBank extends Model
protected function order(): Attribute
{
- return Attribute::make(get: static fn($value): int => (int)$value);
+ return Attribute::make(get: static fn ($value): int => (int) $value);
}
/**
@@ -171,6 +171,6 @@ class PiggyBank extends Model
*/
protected function targetAmount(): Attribute
{
- return Attribute::make(get: static fn($value): string => (string)$value);
+ return Attribute::make(get: static fn ($value): string => (string) $value);
}
}
diff --git a/app/Models/Recurrence.php b/app/Models/Recurrence.php
index 829d518988..11fa9b39aa 100644
--- a/app/Models/Recurrence.php
+++ b/app/Models/Recurrence.php
@@ -40,7 +40,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * @property Carbon|null $first_date
+ * @property null|Carbon $first_date
* @property null|Carbon $latest_date
* @property null|Carbon $repeat_until
*/
@@ -51,44 +51,43 @@ class Recurrence extends Model
use ReturnsIntegerUserIdTrait;
use SoftDeletes;
- protected $fillable
- = [
- 'user_id',
- 'user_group_id',
- 'transaction_type_id',
- 'title',
- 'description',
- 'first_date',
- 'first_date_tz',
- 'repeat_until',
- 'repeat_until_tz',
- 'latest_date',
- 'latest_date_tz',
- 'repetitions',
- 'apply_rules',
- 'active',
- ];
-
- protected $table = 'recurrences';
+ protected $fillable = [
+ 'user_id',
+ 'user_group_id',
+ 'transaction_type_id',
+ 'title',
+ 'description',
+ 'first_date',
+ 'first_date_tz',
+ 'repeat_until',
+ 'repeat_until_tz',
+ 'latest_date',
+ 'latest_date_tz',
+ 'repetitions',
+ 'apply_rules',
+ 'active',
+ ];
+
+ protected $table = 'recurrences';
/**
* Route binder. Converts the key in the URL to the specified object (or throw 404).
*
* @throws NotFoundHttpException
*/
- public static function routeBinder(self | string $value): self
+ public static function routeBinder(self|string $value): self
{
if ($value instanceof self) {
- $value = (int)$value->id;
+ $value = (int) $value->id;
}
if (auth()->check()) {
- $recurrenceId = (int)$value;
+ $recurrenceId = (int) $value;
/** @var User $user */
- $user = auth()->user();
+ $user = auth()->user();
/** @var null|Recurrence $recurrence */
- $recurrence = $user->recurrences()->find($recurrenceId);
+ $recurrence = $user->recurrences()->find($recurrenceId);
if (null !== $recurrence) {
return $recurrence;
}
@@ -162,6 +161,6 @@ class Recurrence extends Model
protected function transactionTypeId(): Attribute
{
- return Attribute::make(get: static fn($value): int => (int)$value);
+ return Attribute::make(get: static fn ($value): int => (int) $value);
}
}
diff --git a/app/Models/Tag.php b/app/Models/Tag.php
index eeff315bc2..cd5661881a 100644
--- a/app/Models/Tag.php
+++ b/app/Models/Tag.php
@@ -38,7 +38,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
- * @property Carbon|null $date
+ * @property null|Carbon $date
*/
#[ObservedBy([DeletedTagObserver::class])]
class Tag extends Model
diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php
index bcbc7862e2..b9d271daef 100644
--- a/app/Models/TransactionJournal.php
+++ b/app/Models/TransactionJournal.php
@@ -47,8 +47,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method EloquentBuilder|static after()
* @method static EloquentBuilder|static query()
*
- * @property TransactionGroup|null $transactionGroup
- * @property Carbon $date
+ * @property null|TransactionGroup $transactionGroup
+ * @property Carbon $date
*/
#[ObservedBy([DeletedTransactionJournalObserver::class])]
class TransactionJournal extends Model
diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php
index 29bb186bdb..86ccfdaedf 100644
--- a/app/Repositories/Account/AccountRepositoryInterface.php
+++ b/app/Repositories/Account/AccountRepositoryInterface.php
@@ -155,6 +155,7 @@ interface AccountRepositoryInterface
public function resetAccountOrder(): void;
public function searchAccount(string $query, array $types, int $limit): Collection;
+
public function searchAccountIncludingInactive(string $query, array $types, int $limit): Collection;
public function searchAccountNr(string $query, array $types, int $limit): Collection;
diff --git a/app/Repositories/Tag/OperationsRepository.php b/app/Repositories/Tag/OperationsRepository.php
index 0ccba0132b..29785e366a 100644
--- a/app/Repositories/Tag/OperationsRepository.php
+++ b/app/Repositories/Tag/OperationsRepository.php
@@ -101,8 +101,12 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
'currency_code' => (string) $journal['currency_code'],
'currency_decimal_places' => (int) $journal['currency_decimal_places'],
'foreign_currency_id' => (int) ($journal['foreign_currency_id'] ?? 0),
- 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount'] ? Steam::negative((string) $journal['foreign_amount']) : null,
- 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount'] ? Steam::negative((string) $journal['pc_amount']) : null,
+ 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount']
+ ? Steam::negative((string) $journal['foreign_amount'])
+ : null,
+ 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount']
+ ? Steam::negative((string) $journal['pc_amount'])
+ : null,
'date' => $journal['date'],
'source_account_id' => $journal['source_account_id'],
'budget_name' => $journal['budget_name'],
@@ -186,8 +190,12 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
'currency_code' => (string) $journal['currency_code'],
'currency_decimal_places' => (int) $journal['currency_decimal_places'],
'foreign_currency_id' => (int) ($journal['foreign_currency_id'] ?? 0),
- 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount'] ? Steam::positive((string) $journal['foreign_amount']) : null,
- 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount'] ? Steam::positive((string) $journal['pc_amount']) : null,
+ 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount']
+ ? Steam::positive((string) $journal['foreign_amount'])
+ : null,
+ 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount']
+ ? Steam::positive((string) $journal['pc_amount'])
+ : null,
'date' => $journal['date'],
'source_account_id' => $journal['source_account_id'],
'budget_name' => $journal['budget_name'],
diff --git a/app/Services/Internal/Destroy/AccountDestroyService.php b/app/Services/Internal/Destroy/AccountDestroyService.php
index 65e2c2858d..cc23533d12 100644
--- a/app/Services/Internal/Destroy/AccountDestroyService.php
+++ b/app/Services/Internal/Destroy/AccountDestroyService.php
@@ -86,7 +86,8 @@ class AccountDestroyService
foreach ($collection as $row) {
if ((int) $row->the_count > 1) {
$journalId = $row->transaction_journal_id;
- /** @var TransactionJournal|null $journal */
+
+ /** @var null|TransactionJournal $journal */
$journal = $user->transactionJournals()->find($journalId);
if (null !== $journal) {
Log::debug(sprintf('Deleted journal #%d because it has the same source as destination.', $journal->id));
diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php
index 204353c99c..1dfbe25e57 100644
--- a/app/Support/Authentication/RemoteUserGuard.php
+++ b/app/Support/Authentication/RemoteUserGuard.php
@@ -153,6 +153,7 @@ class RemoteUserGuard implements Guard
return $this;
}
Log::error(sprintf('Did not set user at %s', __METHOD__));
+
return $this;
}
diff --git a/app/Support/Binder/BudgetList.php b/app/Support/Binder/BudgetList.php
index f484165ec7..6d85166feb 100644
--- a/app/Support/Binder/BudgetList.php
+++ b/app/Support/Binder/BudgetList.php
@@ -43,7 +43,7 @@ class BudgetList implements BinderInterface
if ('allBudgets' === $value) {
return auth()->user()->budgets()->where('active', true)->orderBy('order', 'ASC')->orderBy('name', 'ASC')->get();
}
- if('' === $value) {
+ if ('' === $value) {
Log::warning('Budget list count is zero, return 404.');
throw new NotFoundHttpException();
diff --git a/app/Support/Binder/CategoryList.php b/app/Support/Binder/CategoryList.php
index 23fc5f0c6a..223bfe8da4 100644
--- a/app/Support/Binder/CategoryList.php
+++ b/app/Support/Binder/CategoryList.php
@@ -43,7 +43,7 @@ class CategoryList implements BinderInterface
if ('allCategories' === $value) {
return auth()->user()->categories()->orderBy('name', 'ASC')->get();
}
- if('' === $value) {
+ if ('' === $value) {
Log::warning('Category list count is zero, return 404.');
throw new NotFoundHttpException();
diff --git a/app/Support/Binder/JournalList.php b/app/Support/Binder/JournalList.php
index d24f662cd7..59f8e5aab0 100644
--- a/app/Support/Binder/JournalList.php
+++ b/app/Support/Binder/JournalList.php
@@ -66,11 +66,12 @@ class JournalList implements BinderInterface
protected static function parseList(string $value): array
{
- if('' === $value) {
+ if ('' === $value) {
Log::warning('Category list count is zero, return 404.');
throw new NotFoundHttpException();
}
+
return array_unique(array_map(\intval(...), explode(',', $value)));
}
}
diff --git a/app/Support/Binder/TagList.php b/app/Support/Binder/TagList.php
index 0ab2bc5691..323a09893c 100644
--- a/app/Support/Binder/TagList.php
+++ b/app/Support/Binder/TagList.php
@@ -44,7 +44,7 @@ class TagList implements BinderInterface
if ('allTags' === $value) {
return auth()->user()->tags()->orderBy('tag', 'ASC')->get();
}
- if('' === $value) {
+ if ('' === $value) {
Log::warning('Category list count is zero, return 404.');
throw new NotFoundHttpException();
diff --git a/app/Support/Models/BillDateCalculator.php b/app/Support/Models/BillDateCalculator.php
index 4f5abe0213..d087077763 100644
--- a/app/Support/Models/BillDateCalculator.php
+++ b/app/Support/Models/BillDateCalculator.php
@@ -128,8 +128,10 @@ class BillDateCalculator
}
}
Log::debug('end of loop');
+
/** @template T
* @param Carbon $date
+ *
* @return null|T
*/
$simple = $set->map(static fn (Carbon $date) => $date->format('Y-m-d'));
diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index ade065a4f5..fd4800e730 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -201,7 +201,7 @@ class Navigation
Log::debug('endOfPeriod() requests "YTD" + future, set it to "3M" instead.');
$repeatFreq = '3M';
}
- $new = Carbon::now();
+ $new = Carbon::now();
$functionMap = [
'1D' => 'endOfDay',
'daily' => 'endOfDay',
diff --git a/config/database.php b/config/database.php
index 9e6578fa31..5cbbb418b2 100644
--- a/config/database.php
+++ b/config/database.php
@@ -24,12 +24,12 @@ declare(strict_types=1);
use function Safe\parse_url;
-$databaseUrl = getenv('DATABASE_URL');
-$host = '';
-$username = '';
-$password = '';
-$database = '';
-$port = '';
+$databaseUrl = getenv('DATABASE_URL');
+$host = '';
+$username = '';
+$password = '';
+$database = '';
+$port = '';
if (false !== $databaseUrl) {
$options = parse_url($databaseUrl);
@@ -48,8 +48,8 @@ $mysql_ssl_key = env('MYSQL_SSL_KEY');
$mysql_ssl_ciphers = env('MYSQL_SSL_CIPHER');
$mysql_ssl_verify = env('MYSQL_SSL_VERIFY_SERVER_CERT');
-$mySqlSSLOptions = [];
-$useSSL = envDefaultWhenEmpty(env('MYSQL_USE_SSL'), false);
+$mySqlSSLOptions = [];
+$useSSL = envDefaultWhenEmpty(env('MYSQL_USE_SSL'), false);
if (false !== $useSSL && null !== $useSSL && '' !== $useSSL) {
if (null !== $mysql_ssl_ca_dir) {
$mySqlSSLOptions[PDO::MYSQL_ATTR_SSL_CAPATH] = $mysql_ssl_ca_dir;
diff --git a/config/firefly.php b/config/firefly.php
index 92a324fe45..c6a0c24ef1 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -78,16 +78,16 @@ return [
'running_balance_column' => (bool)envDefaultWhenEmpty(env('USE_RUNNING_BALANCE'), true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag.
],
- 'version' => '6.5.4',
- 'build_time' => 1772787852,
+ 'version' => 'develop/2026-03-06',
+ 'build_time' => 1772807311,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.
// Docker build info, if present:
- 'is_docker' => env('IS_DOCKER', false),
- 'base_image_build' => envDefaultWhenEmpty(env('BASE_IMAGE_BUILD'),'(unknown)'),
- 'base_image_date' => envDefaultWhenEmpty(env('BASE_IMAGE_DATE'),'(unknown)'),
- 'is_local_dev' => env('IS_LOCAL_DEV', false),
+ 'is_docker' => env('IS_DOCKER', false),
+ 'base_image_build' => envDefaultWhenEmpty(env('BASE_IMAGE_BUILD'), '(unknown)'),
+ 'base_image_date' => envDefaultWhenEmpty(env('BASE_IMAGE_DATE'), '(unknown)'),
+ 'is_local_dev' => env('IS_LOCAL_DEV', false),
// generic settings
'maxUploadSize' => 1073741824, // 1 GB