protected function getDiscountForSwitchToMonthly(Plan $currentPlan, Plan $plan)
    {
        return (object) [
            'amount' => $plan->price,
            'numberOfBillingCycles' => floor(
                $this->moneyRemainingOnYearlyPlan($currentPlan) / $plan->price
            ),
        ];
    }
protected function getDiscountForSwitchToMonthly(Plan $currentPlan, Plan $plan)
    {
        return (object) [
            'amount' => $plan->price,
            'numberOfBillingCycles' => floor(
                $this->moneyRemainingOnYearlyPlan($currentPlan) / $plan->price
            ),
        ];
    }
protected function getDiscountForSwitchToMonthly ( Plan $ currentPlan , Plan $ plan ) { return ( object ) [ 'amount' => $ plan -> price , 'numberOfBillingCycles' => floor ( $ this -> moneyRemainingOnYearlyPlan ( $ currentPlan ) / $ plan -> price ) , ] ; }
Get the discount to apply when switching to a monthly plan.

@param  \Braintree\Plan  $currentPlan
@param  \Braintree\Plan  $plan
@return object
Get the discount to apply when switching to a monthly plan .