Some generic code refactoring.

This commit is contained in:
James Cole
2019-06-21 19:10:02 +02:00
parent fb1af395f9
commit 2d3d7f7720
67 changed files with 920 additions and 603 deletions

View File

@@ -24,7 +24,7 @@ namespace FireflyIII\Support;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\FiscalHelperInterface;
use FireflyIII\Helpers\Fiscal\FiscalHelperInterface;
use Log;
/**
@@ -90,7 +90,7 @@ class Navigation
$months = ['1M', 'month', 'monthly'];
$difference = $date->month - $theDate->month;
if (2 === $difference && $date->day > 0 && \in_array($repeatFreq, $months, true)) {
if (2 === $difference && $date->day > 0 && in_array($repeatFreq, $months, true)) {
$date->subDays($date->day);
}
@@ -227,7 +227,7 @@ class Navigation
if (isset($modifierMap[$repeatFreq])) {
$currentEnd->$function($modifierMap[$repeatFreq]);
if (\in_array($repeatFreq, $subDay, true)) {
if (in_array($repeatFreq, $subDay, true)) {
$currentEnd->subDay();
}
$currentEnd->endOfDay();
@@ -236,7 +236,7 @@ class Navigation
}
$currentEnd->$function();
$currentEnd->endOfDay();
if (\in_array($repeatFreq, $subDay, true)) {
if (in_array($repeatFreq, $subDay, true)) {
$currentEnd->subDay();
}