mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 06:01:21 +00:00
Various PSR12 code cleanup
This commit is contained in:
@@ -35,9 +35,9 @@ trait CalculateXOccurrences
|
||||
* Calculates the number of daily occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip
|
||||
* over $skipMod -1 recurrences.
|
||||
*
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -63,10 +63,10 @@ trait CalculateXOccurrences
|
||||
* Calculates the number of monthly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip
|
||||
* over $skipMod -1 recurrences.
|
||||
*
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -76,7 +76,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();
|
||||
@@ -100,10 +100,10 @@ trait CalculateXOccurrences
|
||||
* Calculates the number of NDOM occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip
|
||||
* over $skipMod -1 recurrences.
|
||||
*
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -138,10 +138,10 @@ trait CalculateXOccurrences
|
||||
* Calculates the number of weekly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip
|
||||
* over $skipMod -1 recurrences.
|
||||
*
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -154,7 +154,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();
|
||||
@@ -180,10 +180,10 @@ trait CalculateXOccurrences
|
||||
* Calculates the number of yearly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip
|
||||
* over $skipMod -1 recurrences.
|
||||
*
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
* @param int $skipMod
|
||||
* @param string $moment
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user