Code cleanup.

This commit is contained in:
James Cole
2018-04-02 14:42:07 +02:00
parent f96f38b172
commit 7d02d0f762
55 changed files with 200 additions and 281 deletions

View File

@@ -73,8 +73,8 @@ class FiscalHelper implements FiscalHelperInterface
$startDate = clone $date;
if (true === $this->useCustomFiscalYear) {
$prefStartStr = Preferences::get('fiscalYearStart', '01-01')->data;
list($mth, $day) = explode('-', $prefStartStr);
$startDate->month(intval($mth))->day(intval($day));
[$mth, $day] = explode('-', $prefStartStr);
$startDate->month((int)$mth)->day((int)$day);
// if start date is after passed date, sub 1 year.
if ($startDate > $date) {