mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Reformat various code.
This commit is contained in:
@@ -77,7 +77,7 @@ trait CalculateXOccurrences
|
||||
$mutator = clone $date;
|
||||
$total = 0;
|
||||
$attempts = 0;
|
||||
$dayOfMonth = (int)$moment;
|
||||
$dayOfMonth = (int) $moment;
|
||||
if ($mutator->day > $dayOfMonth) {
|
||||
// day has passed already, add a month.
|
||||
$mutator->addMonth();
|
||||
@@ -155,7 +155,7 @@ trait CalculateXOccurrences
|
||||
// monday = 1
|
||||
// sunday = 7
|
||||
$mutator->addDay(); // always assume today has passed.
|
||||
$dayOfWeek = (int)$moment;
|
||||
$dayOfWeek = (int) $moment;
|
||||
if ($mutator->dayOfWeekIso > $dayOfWeek) {
|
||||
// day has already passed this week, add one week:
|
||||
$mutator->addWeek();
|
||||
|
@@ -82,7 +82,7 @@ trait CalculateXOccurrencesSince
|
||||
$mutator = clone $date;
|
||||
$total = 0;
|
||||
$attempts = 0;
|
||||
$dayOfMonth = (int)$moment;
|
||||
$dayOfMonth = (int) $moment;
|
||||
$dayOfMonth = 0 === $dayOfMonth ? 1 : $dayOfMonth;
|
||||
if ($mutator->day > $dayOfMonth) {
|
||||
Log::debug(sprintf('%d is after %d, add a month. Mutator is now', $mutator->day, $dayOfMonth));
|
||||
@@ -169,7 +169,7 @@ trait CalculateXOccurrencesSince
|
||||
// sunday = 7
|
||||
// Removed assumption today has passed, see issue https://github.com/firefly-iii/firefly-iii/issues/4798
|
||||
//$mutator->addDay(); // always assume today has passed.
|
||||
$dayOfWeek = (int)$moment;
|
||||
$dayOfWeek = (int) $moment;
|
||||
if ($mutator->dayOfWeekIso > $dayOfWeek) {
|
||||
// day has already passed this week, add one week:
|
||||
$mutator->addWeek();
|
||||
|
Reference in New Issue
Block a user