Skip to content

Commit

Permalink
refactor: Make next and previous methods use instanced properties
Browse files Browse the repository at this point in the history
  • Loading branch information
atoff committed Jul 30, 2023
1 parent 43de33d commit 5395e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AIRACCycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ public static function current(): static
/** Returns the next AIRAC cycle */
public static function next(): static
{
return static::fromSerial(static::current()->getSerial() + 1);
return static::current()->nextCycle();
}

/** Returns the previous AIRAC cycle */
public static function previous(): static
{
return static::fromSerial(static::current()->getSerial() - 1);
return static::current()->previousCycle();
}

/** Returns the serial of the AIRAC cycle at the given date. Whilst a float is always returned, note that this is an integer if exactly at an effective date, or a float otherwise*/
Expand Down

0 comments on commit 5395e91

Please sign in to comment.