Fix phpstan messages.

This commit is contained in:
James Cole
2022-12-30 20:25:04 +01:00
parent ee0116f112
commit 445804a7f1
47 changed files with 233 additions and 287 deletions

View File

@@ -654,17 +654,17 @@ class Navigation
return $fiscalHelper->endOfFiscalYear($end);
}
switch ($range) {
default:
break;
case 'last7':
case 'last30':
case 'last90':
case 'last365':
case 'YTD':
case 'QTD':
case 'MTD':
return $end;
$list = [
'last7',
'last30',
'last90',
'last365',
'YTD',
'QTD',
'MTD',
];
if (in_array($range, $list, true)) {
return $end;
}
throw new FireflyException(sprintf('updateEndDate cannot handle range "%s"', $range));