PHPstan fixes.

This commit is contained in:
James Cole
2023-11-05 08:15:17 +01:00
parent ff599795d3
commit c1cc71f85c
48 changed files with 101 additions and 166 deletions

View File

@@ -249,7 +249,7 @@ trait ModelInformation
$values[$index] = $notes->text;
}
foreach ($journalTriggers as $index => $trigger) {
foreach ($journalTriggers as $ii => $trigger) {
try {
$string = view(
'rules.partials.trigger',
@@ -257,14 +257,13 @@ trait ModelInformation
'oldTrigger' => $trigger,
'oldValue' => $values[$index],
'oldChecked' => false,
'count' => $index + 1,
'count' => $ii + 1,
'triggers' => $triggers,
]
)->render();
} catch (Throwable $e) {
app('log')->debug(sprintf('Throwable was thrown in getTriggersForJournal(): %s', $e->getMessage()));
app('log')->debug($e->getTraceAsString());
$string = '';
throw new FireflyException('Could not render trigger', 0, $e);
}
if ('' !== $string) {