Skip to content

Commit

Permalink
Remove unnecessary end date check.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Jun 5, 2024
1 parent 7d647a6 commit f9d41f1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Subscriptions/SubscriptionPhase.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,10 +685,6 @@ public static function align( self $phase, \DateTimeInterface $align_date ) {
$alignment_phase->set_end_date( $alignment_end_date );
$alignment_phase->set_alignment_rate( $alignment_difference->days / $regular_difference->days );

if ( null === $alignment_phase->get_end_date() ) {
throw new \Exception( 'The align phase should always end because this phase exists for one period.' );
}

$phase->set_start_date( $alignment_end_date );

if ( null !== $phase->end_date ) {
Expand Down

0 comments on commit f9d41f1

Please sign in to comment.