First part of a large code cleanup commit.

This commit is contained in:
James Cole
2019-02-12 21:49:28 +01:00
parent b273af341c
commit e0d87aa11e
70 changed files with 336 additions and 354 deletions

View File

@@ -184,6 +184,7 @@ trait CalculateRangeOccurrences
return $return;
}
/**
* Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences.
*

View File

@@ -76,10 +76,10 @@ trait CalculateXOccurrences
*/
protected function getXMonthlyOccurrences(Carbon $date, int $count, int $skipMod, string $moment): array
{
$return = [];
$mutator = clone $date;
$total = 0;
$attempts = 0;
$return = [];
$mutator = clone $date;
$total = 0;
$attempts = 0;
$dayOfMonth = (int)$moment;
if ($mutator->day > $dayOfMonth) {
// day has passed already, add a month.