mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Fix various phpstan things
This commit is contained in:
@@ -64,6 +64,10 @@ trait RenderPartialViews
|
||||
$accountRepos = app(AccountRepositoryInterface::class);
|
||||
$account = $accountRepos->find((int)$attributes['accountId']);
|
||||
|
||||
if(null === $budget || null === $account) {
|
||||
throw new FireflyException('Could not render popup.report.balance-amount because budget or account is null.');
|
||||
}
|
||||
|
||||
$journals = $popupHelper->balanceForBudget($budget, $account, $attributes);
|
||||
|
||||
try {
|
||||
@@ -330,7 +334,7 @@ trait RenderPartialViews
|
||||
if ('user_action' !== $entry->trigger_type) {
|
||||
$count = ($index + 1);
|
||||
try {
|
||||
$rootOperator = OperatorQuerySearch::getRootOperator($entry->trigger_type);
|
||||
$rootOperator = OperatorQuerySearch::getRootOperator((string) $entry->trigger_type);
|
||||
if (str_starts_with($rootOperator, '-')) {
|
||||
$rootOperator = substr($rootOperator, 1);
|
||||
}
|
||||
@@ -340,7 +344,7 @@ trait RenderPartialViews
|
||||
'oldTrigger' => $rootOperator,
|
||||
'oldValue' => $entry->trigger_value,
|
||||
'oldChecked' => $entry->stop_processing,
|
||||
'oldProhibited' => str_starts_with($entry->trigger_type, '-'),
|
||||
'oldProhibited' => str_starts_with((string) $entry->trigger_type, '-'),
|
||||
'count' => $count,
|
||||
'triggers' => $triggers,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user