Fix a bunch of phpstan issues.

This commit is contained in:
James Cole
2023-11-28 18:57:10 +01:00
parent b0a39c00ba
commit 1c3cb85a46
31 changed files with 197 additions and 137 deletions

View File

@@ -80,10 +80,10 @@ class FiscalHelper implements FiscalHelperInterface
$startDate = clone $date;
if (true === $this->useCustomFiscalYear) {
$prefStartStr = app('preferences')->get('fiscalYearStart', '01-01')->data;
if(is_array($prefStartStr)) {
if (is_array($prefStartStr)) {
$prefStartStr = '01-01';
}
$prefStartStr = (string) $prefStartStr;
$prefStartStr = (string)$prefStartStr;
[$mth, $day] = explode('-', $prefStartStr);
$startDate->day((int)$day)->month((int)$mth);