Skip to content

Firefly III: a personal finances manager

Always great when using conflicting tools

James Colece023f2580b8
diff --git a/.ci/phpstan.neon b/.ci/phpstan.neon
index ac8d1f7205..7e804a9a43 100644
--- a/.ci/phpstan.neon
+++ b/.ci/phpstan.neon
@@ -13,6 +13,7 @@ parameters:
- '#is not allowed to extend#'
- '#switch is forbidden to use#'
- '#is neither abstract nor final#'
+ - '#on left side of \?\?\= always exists and is not nullable#'
- '#has a nullable return type declaration#' # perhaps throw errors instead?
- '#with a nullable type declaration#' # decide what action should be if param is null.
- '#with null as default value#'
diff --git a/app/Console/Commands/Correction/FixAccountTypes.php b/app/Console/Commands/Correction/FixAccountTypes.php
index d8f9fe72cc..b7bb806317 100644
--- a/app/Console/Commands/Correction/FixAccountTypes.php
+++ b/app/Console/Commands/Correction/FixAccountTypes.php
@@ -43,8 +43,8 @@ class FixAccountTypes extends Command
{
use ShowsFriendlyMessages;
- protected $description = 'Make sure all journals have the correct from/to account types.';
- protected $signature = 'firefly-iii:fix-account-types';
+ protected $description = 'Make sure all journals have the correct from/to account types.';
+ protected $signature = 'firefly-iii:fix-account-types';
private int $count;
private array $expected;
private AccountFactory $factory;
diff --git a/app/Console/Commands/Correction/FixIbans.php b/app/Console/Commands/Correction/FixIbans.php
index 717a0e1269..0717441a5a 100644
--- a/app/Console/Commands/Correction/FixIbans.php
+++ b/app/Console/Commands/Correction/FixIbans.php
@@ -37,8 +37,8 @@ class FixIbans extends Command
{
use ShowsFriendlyMessages;
- protected $description = 'Removes spaces from IBANs';
- protected $signature = 'firefly-iii:fix-ibans';
+ protected $description = 'Removes spaces from IBANs';
+ protected $signature = 'firefly-iii:fix-ibans';
private int $count = 0;
/**
diff --git a/app/Console/Commands/Correction/FixRecurringTransactions.php b/app/Console/Commands/Correction/FixRecurringTransactions.php
index 8777946f7c..ac2fc02cf8 100644
--- a/app/Console/Commands/Correction/FixRecurringTransactions.php
+++ b/app/Console/Commands/Correction/FixRecurringTransactions.php
@@ -40,8 +40,8 @@ class FixRecurringTransactions extends Command
{
use ShowsFriendlyMessages;
- protected $description = 'Fixes recurring transactions with the wrong transaction type.';
- protected $signature = 'firefly-iii:fix-recurring-transactions';
+ protected $description = 'Fixes recurring transactions with the wrong transaction type.';
+ protected $signature = 'firefly-iii:fix-recurring-transactions';
private int $count = 0;
private RecurringRepositoryInterface $recurringRepos;
private UserRepositoryInterface $userRepos;
diff --git a/app/Console/Commands/Export/ExportData.php b/app/Console/Commands/Export/ExportData.php
index b191cb48e3..8589dcb336 100644
--- a/app/Console/Commands/Export/ExportData.php
+++ b/app/Console/Commands/Export/ExportData.php
@@ -51,7 +51,7 @@ class ExportData extends Command
protected $description = 'Command to export data from Firefly III.';
- protected $signature = 'firefly-iii:export-data
+ protected $signature = 'firefly-iii:export-data
{--user=1 : The user ID that the export should run for.}
{--token= : The user\'s access token.}
{--start= : First transaction to export. Defaults to your very first transaction. Only applies to transaction export.}
diff --git a/app/Console/Commands/System/CreateFirstUser.php b/app/Console/Commands/System/CreateFirstUser.php
index 06e158f468..0cdc5370e6 100644
--- a/app/Console/Commands/System/CreateFirstUser.php
+++ b/app/Console/Commands/System/CreateFirstUser.php
@@ -42,7 +42,7 @@ class CreateFirstUser extends Command
protected $description = 'Creates a new user and gives admin rights. Outputs the password on the command line. Strictly for testing.';
- protected $signature = 'firefly-iii:create-first-user {email}';
+ protected $signature = 'firefly-iii:create-first-user {email}';
private UserRepositoryInterface $repository;
/**
diff --git a/app/Console/Commands/System/ForceDecimalSize.php b/app/Console/Commands/System/ForceDecimalSize.php
index 361fb03278..08e86cc706 100644
--- a/app/Console/Commands/System/ForceDecimalSize.php
+++ b/app/Console/Commands/System/ForceDecimalSize.php
@@ -53,8 +53,8 @@ class ForceDecimalSize extends Command
{
use ShowsFriendlyMessages;
- protected $description = 'This command resizes DECIMAL columns in MySQL or PostgreSQL and correct amounts (only MySQL).';
- protected $signature = 'firefly-iii:force-decimal-size';
+ protected $description = 'This command resizes DECIMAL columns in MySQL or PostgreSQL and correct amounts (only MySQL).';
+ protected $signature = 'firefly-iii:force-decimal-size';
private string $cast;
private array $classes
= [
diff --git a/app/Console/Commands/Tools/ApplyRules.php b/app/Console/Commands/Tools/ApplyRules.php
index 3a83a8b3b9..eaa50b94bd 100644
--- a/app/Console/Commands/Tools/ApplyRules.php
+++ b/app/Console/Commands/Tools/ApplyRules.php
@@ -50,7 +50,7 @@ class ApplyRules extends Command
protected $description = 'This command will apply your rules and rule groups on a selection of your transactions.';
- protected $signature
+ protected $signature
= 'firefly-iii:apply-rules
{--user=1 : The user ID.}
{--token= : The user\'s access token.}
diff --git a/app/Console/Commands/Upgrade/AccountCurrencies.php b/app/Console/Commands/Upgrade/AccountCurrencies.php
index 4b11a59c19..37305ff4e8 100644
--- a/app/Console/Commands/Upgrade/AccountCurrencies.php
+++ b/app/Console/Commands/Upgrade/AccountCurrencies.php
@@ -46,8 +46,8 @@ class AccountCurrencies extends Command
public const string CONFIG_NAME = '480_account_currencies';
- protected $description = 'Give all accounts proper currency info.';
- protected $signature = 'firefly-iii:account-currencies {--F|force : Force the execution of this command.}';
+ protected $description = 'Give all accounts proper currency info.';
+ protected $signature = 'firefly-iii:account-currencies {--F|force : Force the execution of this command.}';
private AccountRepositoryInterface $accountRepos;
private int $count;
private UserRepositoryInterface $userRepos;
diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php
index e5aa55b1ff..8da1102421 100644
--- a/app/Console/Commands/Upgrade/MigrateToGroups.php
+++ b/app/Console/Commands/Upgrade/MigrateToGroups.php
@@ -51,8 +51,8 @@ class MigrateToGroups extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_migrated_to_groups';
- protected $description = 'Migrates a pre-4.7.8 transaction structure to the 4.7.8+ transaction structure.';
- protected $signature = 'firefly-iii:migrate-to-groups {--F|force : Force the migration, even if it fired before.}';
+ protected $description = 'Migrates a pre-4.7.8 transaction structure to the 4.7.8+ transaction structure.';
+ protected $signature = 'firefly-iii:migrate-to-groups {--F|force : Force the migration, even if it fired before.}';
private JournalCLIRepositoryInterface $cliRepository;
private int $count;
private TransactionGroupFactory $groupFactory;
diff --git a/app/Console/Commands/Upgrade/MigrateToRules.php b/app/Console/Commands/Upgrade/MigrateToRules.php
index f85ee4497b..94ec5bd1e0 100644
--- a/app/Console/Commands/Upgrade/MigrateToRules.php
+++ b/app/Console/Commands/Upgrade/MigrateToRules.php
@@ -48,7 +48,7 @@ class MigrateToRules extends Command
protected $description = 'Migrate bills to rules.';
- protected $signature = 'firefly-iii:bills-to-rules {--F|force : Force the execution of this command.}';
+ protected $signature = 'firefly-iii:bills-to-rules {--F|force : Force the execution of this command.}';
private BillRepositoryInterface $billRepository;
private int $count;
private RuleGroupRepositoryInterface $ruleGroupRepository;
diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
index 649263bc7a..18e01b6119 100644
--- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
+++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
@@ -45,8 +45,8 @@ class OtherCurrenciesCorrections extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_other_currencies';
- protected $description = 'Update all journal currency information.';
- protected $signature = 'firefly-iii:other-currencies {--F|force : Force the execution of this command.}';
+ protected $description = 'Update all journal currency information.';
+ protected $signature = 'firefly-iii:other-currencies {--F|force : Force the execution of this command.}';
private array $accountCurrencies;
private AccountRepositoryInterface $accountRepos;
private JournalCLIRepositoryInterface $cliRepos;
diff --git a/app/Console/Commands/Upgrade/TransactionIdentifier.php b/app/Console/Commands/Upgrade/TransactionIdentifier.php
index ac2dad56f0..eb21a358b5 100644
--- a/app/Console/Commands/Upgrade/TransactionIdentifier.php
+++ b/app/Console/Commands/Upgrade/TransactionIdentifier.php
@@ -42,8 +42,8 @@ class TransactionIdentifier extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_transaction_identifier';
- protected $description = 'Fixes transaction identifiers.';
- protected $signature = 'firefly-iii:transaction-identifiers {--F|force : Force the execution of this command.}';
+ protected $description = 'Fixes transaction identifiers.';
+ protected $signature = 'firefly-iii:transaction-identifiers {--F|force : Force the execution of this command.}';
private JournalCLIRepositoryInterface $cliRepository;
private int $count;
diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php
index ab166617b4..a87f658ff8 100644
--- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php
+++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php
@@ -43,8 +43,8 @@ class TransferCurrenciesCorrections extends Command
use ShowsFriendlyMessages;
public const string CONFIG_NAME = '480_transfer_currencies';
- protected $description = 'Updates transfer currency information.';
- protected $signature = 'firefly-iii:transfer-currencies {--F|force : Force the execution of this command.}';
+ protected $description = 'Updates transfer currency information.';
+ protected $signature = 'firefly-iii:transfer-currencies {--F|force : Force the execution of this command.}';
private array $accountCurrencies;
private AccountRepositoryInterface $accountRepos;
private JournalCLIRepositoryInterface $cliRepos;
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 84ccd70489..d62e81247f 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -232,11 +232,11 @@ class Handler extends ExceptionHandler
private function shouldntReportLocal(Throwable $e): bool
{
return null !== Arr::first(
- $this->dontReport,
- static function ($type) use ($e) {
+ $this->dontReport,
+ static function ($type) use ($e) {
return $e instanceof $type;
}
- );
+ );
}
/**
diff --git a/app/Handlers/Events/Model/BudgetLimitHandler.php b/app/Handlers/Events/Model/BudgetLimitHandler.php
index c1bc0d047b..52d9a8f7d3 100644
--- a/app/Handlers/Events/Model/BudgetLimitHandler.php
+++ b/app/Handlers/Events/Model/BudgetLimitHandler.php
@@ -190,8 +190,8 @@ class BudgetLimitHandler
);
// overlap in days:
$limitPeriod = Period::make(
- $budgetLimit->start_date,
- $budgetLimit->end_date,
+ $budgetLimit->start_date,
+ $budgetLimit->end_date,
precision : Precision::DAY(),
boundaries: Boundaries::EXCLUDE_NONE()
);
@@ -236,8 +236,8 @@ class BudgetLimitHandler
return '0';
}
$limitPeriod = Period::make(
- $budgetLimit->start_date,
- $budgetLimit->end_date,
+ $budgetLimit->start_date,
+ $budgetLimit->end_date,
precision : Precision::DAY(),
boundaries: Boundaries::EXCLUDE_NONE()
);
diff --git a/app/Helpers/Collector/Extensions/AttachmentCollection.php b/app/Helpers/Collector/Extensions/AttachmentCollection.php
index 1f9e84894c..4d929fb4db 100644
--- a/app/Helpers/Collector/Extensions/AttachmentCollection.php
+++ b/app/Helpers/Collector/Extensions/AttachmentCollection.php
@@ -56,9 +56,9 @@ trait AttachmentCollection
/** @var array $attachment */
foreach ($transaction['attachments'] as $attachment) {
$result = str_contains(strtolower($attachment['filename']), strtolower($name)) || str_contains(
- strtolower($attachment['title']),
- strtolower($name)
- );
+ strtolower($attachment['title']),
+ strtolower($name)
+ );
if (true === $result) {
return true;
}
@@ -142,9 +142,9 @@ trait AttachmentCollection
/** @var array $attachment */
foreach ($transaction['attachments'] as $attachment) {
$result = !str_contains(strtolower($attachment['filename']), strtolower($name)) && !str_contains(
- strtolower($attachment['title']),
- strtolower($name)
- );
+ strtolower($attachment['title']),
+ strtolower($name)
+ );
if (true === $result) {
return true;
}
@@ -179,9 +179,9 @@ trait AttachmentCollection
/** @var array $attachment */
foreach ($transaction['attachments'] as $attachment) {
$result = !str_ends_with(strtolower($attachment['filename']), strtolower($name)) && !str_ends_with(
- strtolower($attachment['title']),
- strtolower($name)
- );
+ strtolower($attachment['title']),
+ strtolower($name)
+ );
if (true === $result) {
return true;
}
@@ -216,9 +216,9 @@ trait AttachmentCollection
/** @var array $attachment */
foreach ($transaction['attachments'] as $attachment) {
$result = !str_starts_with(strtolower($attachment['filename']), strtolower($name)) && !str_starts_with(
- strtolower($attachment['title']),
- strtolower($name)
- );
+ strtolower($attachment['title']),
+ strtolower($name)
+ );
if (true === $result) {
return true;
}
@@ -246,9 +246,9 @@ trait AttachmentCollection
/** @var array $attachment */
foreach ($transaction['attachments'] as $attachment) {
$result = str_ends_with(strtolower($attachment['filename']), strtolower($name)) || str_ends_with(
- strtolower($attachment['title']),
- strtolower($name)
- );
+ strtolower($attachment['title']),
+ strtolower($name)
+ );
if (true === $result) {
return true;
}
@@ -330,9 +330,9 @@ trait AttachmentCollection
/** @var array $attachment */
foreach ($transaction['attachments'] as $attachment) {
$result = str_starts_with(strtolower($attachment['filename']), strtolower($name)) || str_starts_with(
- strtolower($attachment['title']),
- strtolower($name)
- );
+ strtolower($attachment['title']),
+ strtolower($name)
+ );
if (true === $result) {
return true;
}
diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php
index e082379c76..4a8ce7c181 100644
--- a/app/Http/Controllers/Budget/IndexController.php
+++ b/app/Http/Controllers/Budget/IndexController.php
@@ -135,7 +135,7 @@ class IndexController extends Controller
// get budgeted for default currency:
if (0 === count($availableBudgets)) {
- $budgeted = $this->blRepository->budgeted($start, $end, $defaultCurrency,);
+ $budgeted = $this->blRepository->budgeted($start, $end, $defaultCurrency, );
$spentArr = $this->opsRepository->sumExpenses($start, $end, null, null, $defaultCurrency);
$spent = $spentArr[$defaultCurrency->id]['sum'] ?? '0';
unset($spentArr);
@@ -194,7 +194,7 @@ class IndexController extends Controller
$array['spent'] = $spentArr[$entry->transaction_currency_id]['sum'] ?? '0';
// budgeted in period:
- $budgeted = $this->blRepository->budgeted($entry->start_date, $entry->end_date, $entry->transactionCurrency,);
+ $budgeted = $this->blRepository->budgeted($entry->start_date, $entry->end_date, $entry->transactionCurrency, );
$array['budgeted'] = $budgeted;
$availableBudgets[] = $array;
unset($spentArr);
diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php
index 5533aa02e0..aa29ecd438 100644
--- a/app/Http/Controllers/Json/BoxController.php
+++ b/app/Http/Controllers/Json/BoxController.php
@@ -86,12 +86,12 @@ class BoxController extends Controller
static function (AvailableBudget $availableBudget) use ($currency) { // @phpstan-ignore-line
if ($availableBudget->transaction_currency_id === $currency->id) {
app('log')->debug(sprintf(
- 'Will include AB #%d: from %s-%s amount %s',
- $availableBudget->id,
- $availableBudget->start_date->format('Y-m-d'),
- $availableBudget->end_date->format('Y-m-d'),
- $availableBudget->amount
- ));
+ 'Will include AB #%d: from %s-%s amount %s',
+ $availableBudget->id,
+ $availableBudget->start_date->format('Y-m-d'),
+ $availableBudget->end_date->format('Y-m-d'),
+ $availableBudget->amount
+ ));
return $availableBudget;
}
diff --git a/app/Http/Controllers/Transaction/ShowController.php b/app/Http/Controllers/Transaction/ShowController.php
index f4c1746566..cf67431732 100644
--- a/app/Http/Controllers/Transaction/ShowController.php
+++ b/app/Http/Controllers/Transaction/ShowController.php
@@ -161,9 +161,9 @@ class ShowController extends Controller
$amounts[$symbol]['amount'] = bcadd($amounts[$symbol]['amount'], $transaction['amount']);
if (null !== $transaction['foreign_amount'] && '' !== $transaction['foreign_amount']
&& bccomp(
- '0',
- $transaction['foreign_amount']
- ) !== 0) {
+ '0',
+ $transaction['foreign_amount']
+ ) !== 0) {
// same for foreign currency:
$foreignSymbol = $transaction['foreign_currency_symbol'];
if (!array_key_exists($foreignSymbol, $amounts)) {
diff --git a/app/Models/Account.php b/app/Models/Account.php
index e55bd5a772..376090edf7 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -127,7 +127,7 @@ class Account extends Model
protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];
- protected $hidden = ['encrypted'];
+ protected $hidden = ['encrypted'];
private bool $joinedAccountTypes = false;
/**
diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php
index cfbd363700..ca84cce988 100644
--- a/app/Models/TransactionCurrency.php
+++ b/app/Models/TransactionCurrency.php
@@ -84,7 +84,7 @@ class TransactionCurrency extends Model
public ?bool $userDefault;
public ?bool $userEnabled;
- protected $casts
+ protected $casts
= [
'created_at' => 'datetime',
'updated_at' => 'datetime',
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php
index a6b137d86b..356542d0b2 100644
--- a/app/Repositories/Bill/BillRepository.php
+++ b/app/Repositories/Bill/BillRepository.php
@@ -373,12 +373,12 @@ class BillRepository implements BillRepositoryInterface
return $bill->transactionJournals()
->before($end)->after($start)->get(
- [
+ [
'transaction_journals.id',
'transaction_journals.date',
'transaction_journals.transaction_group_id',
]
- );
+ );
}
/**
diff --git a/app/Repositories/Budget/BudgetLimitRepository.php b/app/Repositories/Budget/BudgetLimitRepository.php
index eed2f8167b..8efc508858 100644
--- a/app/Repositories/Budget/BudgetLimitRepository.php
+++ b/app/Repositories/Budget/BudgetLimitRepository.php
@@ -60,7 +60,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
// same complex where query as below.
->where(
- static function (Builder $q5) use ($start, $end) {
+ static function (Builder $q5) use ($start, $end) {
$q5->where(
static function (Builder $q1) use ($start, $end) {
$q1->where(
@@ -85,7 +85,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
}
);
}
- )
+ )
->where('budget_limits.transaction_currency_id', $currency->id)
->whereNull('budgets.deleted_at')
->where('budgets.active', true)
@@ -252,11 +252,11 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
)
// budget limit start within period
->orWhere(
- static function (Builder $q3) use ($start, $end) {
+ static function (Builder $q3) use ($start, $end) {
$q3->where('budget_limits.start_date', '>=', $start->format('Y-m-d 00:00:00'));
$q3->where('budget_limits.start_date', '<=', $end->format('Y-m-d 23:59:59'));
}
- );
+ );
}
)
->orWhere(
diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.php
index 5ab0375721..b02401cf79 100644
--- a/app/Services/Internal/Update/JournalUpdateService.php
+++ b/app/Services/Internal/Update/JournalUpdateService.php
@@ -497,9 +497,9 @@ class JournalUpdateService
{
$type = $this->transactionJournal->transactionType->type;
if ((
- array_key_exists('bill_id', $this->data)
+ array_key_exists('bill_id', $this->data)
|| array_key_exists('bill_name', $this->data)
- )
+ )
&& TransactionType::WITHDRAWAL === $type
) {
$billId = (int)($this->data['bill_id'] ?? 0);
diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index aed2c5e088..712deef93d 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -89,10 +89,10 @@ class Navigation
if (!array_key_exists($repeatFreq, $functionMap)) {
Log::error(sprintf(
- 'The periodicity %s is unknown. Choose one of available periodicity: %s',
- $repeatFreq,
- implode(', ', array_keys($functionMap))
- ));
+ 'The periodicity %s is unknown. Choose one of available periodicity: %s',
+ $repeatFreq,
+ implode(', ', array_keys($functionMap))
+ ));
return $theDate;
}
@@ -352,12 +352,12 @@ class Navigation
public function diffInPeriods(string $period, int $skip, Carbon $beginning, Carbon $end): int
{
Log::debug(sprintf(
- 'diffInPeriods: %s (skip: %d), between %s and %s.',
- $period,
- $skip,
- $beginning->format('Y-m-d'),
- $end->format('Y-m-d')
- ));
+ 'diffInPeriods: %s (skip: %d), between %s and %s.',
+ $period,
+ $skip,
+ $beginning->format('Y-m-d'),
+ $end->format('Y-m-d')
+ ));
$map = [
'daily' => 'floatDiffInDays',
'weekly' => 'floatDiffInWeeks',
@@ -394,11 +394,11 @@ class Navigation
$parameter = $skip + 1;
$diff = ceil($diff / $parameter) * $parameter;
Log::debug(sprintf(
- 'diffInPeriods: skip is %d, so param is %d, and diff becomes %d',
- $skip,
- $parameter,
- $diff
- ));
+ 'diffInPeriods: skip is %d, so param is %d, and diff becomes %d',
+ $skip,
+ $parameter,
+ $diff
+ ));
}
return (int)$diff;
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index f8baace830..59faf20c14 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -326,15 +326,15 @@ class Steam
$balances[$format] = $currentBalance;
app('log')->debug(sprintf(
- '%s: transaction in %s(!). Conversion rate is %s. %s %s = %s %s',
- $format,
- $currency->code,
- $rate,
- $currency->code,
- $transaction['amount'],
- $native->code,
- $convertedAmount
- ));
+ '%s: transaction in %s(!). Conversion rate is %s. %s %s = %s %s',
+ $format,
+ $currency->code,
+ $rate,
+ $currency->code,
+ $transaction['amount'],
+ $native->code,
+ $convertedAmount
+ ));
}
diff --git a/app/User.php b/app/User.php
index e99fd3aee3..4ce095271c 100644
--- a/app/User.php
+++ b/app/User.php
@@ -416,37 +416,37 @@ class User extends Authenticatable
->where('user_group_id', $userGroup->id)->get();
if (0 === $groupMemberships->count()) {
app('log')->error(sprintf(
- 'User #%d "%s" does not have roles %s in user group #%d "%s"',
- $this->id,
- $this->email,
- implode(', ', $roles),
- $userGroup->id,
- $userGroup->title
- ));
+ 'User #%d "%s" does not have roles %s in user group #%d "%s"',
+ $this->id,
+ $this->email,
+ implode(', ', $roles),
+ $userGroup->id,
+ $userGroup->title
+ ));
return false;
}
foreach ($groupMemberships as $membership) {
app('log')->debug(sprintf(
- 'User #%d "%s" has role "%s" in user group #%d "%s"',
- $this->id,
- $this->email,
- $membership->userRole->title,
- $userGroup->id,
- $userGroup->title
- ));
+ 'User #%d "%s" has role "%s" in user group #%d "%s"',
+ $this->id,
+ $this->email,
+ $membership->userRole->title,
+ $userGroup->id,
+ $userGroup->title
+ ));
if (in_array($membership->userRole->title, $dbRolesTitles, true)) {
app('log')->debug(sprintf('Return true, found role "%s"', $membership->userRole->title));
return true;
}
}
app('log')->error(sprintf(
- 'User #%d "%s" does not have roles %s in user group #%d "%s"',
- $this->id,
- $this->email,
- implode(', ', $roles),
- $userGroup->id,
- $userGroup->title
- ));
+ 'User #%d "%s" does not have roles %s in user group #%d "%s"',
+ $this->id,
+ $this->email,
+ implode(', ', $roles),
+ $userGroup->id,
+ $userGroup->title
+ ));
return false;
}
@@ -696,7 +696,7 @@ class User extends Authenticatable
*/
public function userGroup(): BelongsTo
{
- return $this->belongsTo(UserGroup::class,);
+ return $this->belongsTo(UserGroup::class, );
}
/**