Fix various phpstan things

This commit is contained in:
James Cole
2023-11-29 06:30:35 +01:00
parent 1c3cb85a46
commit b9feb0aa71
19 changed files with 77 additions and 78 deletions

View File

@@ -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,
]