protected function getDiscountForSwitchToMonthly($currentPlan, $plan) { return (object) ['amount' => $plan->price, 'numberOfBillingCycles' => floor($this->moneyRemainingOnYearlyPlan($currentPlan) / $plan->price)]; }