Various PSR12 code cleanup

This commit is contained in:
James Cole
2022-12-29 19:42:26 +01:00
parent dbf3e76ecc
commit 6cfdc58cb1
415 changed files with 7462 additions and 6874 deletions

View File

@@ -35,9 +35,9 @@ trait CalculateRangeOccurrences
/**
* Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences.
*
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
*
* @return array
*/
@@ -59,10 +59,10 @@ trait CalculateRangeOccurrences
/**
* Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences.
*
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
*
* @return array
*
@@ -71,7 +71,7 @@ trait CalculateRangeOccurrences
{
$return = [];
$attempts = 0;
$dayOfMonth = (int) $moment;
$dayOfMonth = (int)$moment;
if ($start->day > $dayOfMonth) {
// day has passed already, add a month.
$start->addMonth();
@@ -92,10 +92,10 @@ trait CalculateRangeOccurrences
/**
* Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences.
*
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
*
* @return array
*/
@@ -124,10 +124,10 @@ trait CalculateRangeOccurrences
/**
* Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences.
*
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
*
* @return array
*
@@ -139,7 +139,7 @@ trait CalculateRangeOccurrences
Log::debug('Rep is weekly.');
// monday = 1
// sunday = 7
$dayOfWeek = (int) $moment;
$dayOfWeek = (int)$moment;
Log::debug(sprintf('DoW in repetition is %d, in mutator is %d', $dayOfWeek, $start->dayOfWeekIso));
if ($start->dayOfWeekIso > $dayOfWeek) {
// day has already passed this week, add one week:
@@ -168,10 +168,10 @@ trait CalculateRangeOccurrences
/**
* Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences.
*
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
* @param Carbon $start
* @param Carbon $end
* @param int $skipMod
* @param string $moment
*
* @return array
*