Code cleanup. Moving closer to new release.

This commit is contained in:
James Cole
2016-05-20 17:53:03 +02:00
parent 87f9ca3bb2
commit a74a646777
19 changed files with 248 additions and 191 deletions

View File

@@ -111,9 +111,14 @@ class Navigation
$function = $functionMap[$repeatFreq];
if (isset($modifierMap[$repeatFreq])) {
$currentEnd->$function($modifierMap[$repeatFreq]);
} else {
$currentEnd->$function();
if (in_array($repeatFreq, $subDay)) {
$currentEnd->subDay();
}
return $currentEnd;
}
$currentEnd->$function();
if (in_array($repeatFreq, $subDay)) {
$currentEnd->subDay();
}
@@ -370,11 +375,14 @@ class Navigation
if ($range == '6M') {
if ($start->month >= 7) {
$start->startOfYear()->addMonths(6);
} else {
$start->startOfYear();
return $start;
}
$start->startOfYear();
return $start;
}
throw new FireflyException('updateStartDate cannot handle $range "' . $range . '"');
}