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 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
*/