mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix various phpstan issues.
This commit is contained in:
@@ -53,7 +53,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
app('log')->debug(sprintf('Searching for account named "%s" (of user #%d) of the following type(s)', $name, $this->user->id), ['types' => $types]);
|
||||
|
||||
$query->where('accounts.name', $name);
|
||||
/** @var Account $account */
|
||||
/** @var Account|null $account */
|
||||
$account = $query->first(['accounts.*']);
|
||||
if (null === $account) {
|
||||
app('log')->debug(sprintf('There is no account with name "%s" of types', $name), $types);
|
||||
|
@@ -262,13 +262,10 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
|
||||
if (null === $result) {
|
||||
app('log')->debug('Grabbing default currency for this user...');
|
||||
/** @var TransactionCurrency|null $result */
|
||||
$result = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
}
|
||||
|
||||
if (null === $result) {
|
||||
app('log')->debug('Grabbing EUR as fallback.');
|
||||
$result = $this->findByCode('EUR');
|
||||
}
|
||||
app('log')->debug(sprintf('Final result: %s', $result->code));
|
||||
if (false === $result->enabled) {
|
||||
app('log')->debug(sprintf('Also enabled currency %s', $result->code));
|
||||
|
Reference in New Issue
Block a user