src/models/Plan.php
public function isOnSamePaymentCycleAs(Plan $plan): bool
    {
        $thisPlanData = Json::decode($this->planData);
        $otherPlanData = Json::decode($plan->planData);

        return $thisPlanData['plan']['interval'] === $otherPlanData['plan']['interval'] && $thisPlanData['plan']['interval_count'] === $otherPlanData['plan']['interval_count'];
    }
public function isOnSamePaymentCycleAs(Plan $plan): bool
    {
        $thisPlanData = Json::decode($this->planData);
        $otherPlanData = Json::decode($plan->planData);

        return $thisPlanData['plan']['interval'] === $otherPlanData['plan']['interval'] && $thisPlanData['plan']['interval_count'] === $otherPlanData['plan']['interval_count'];
    }
public function isOnSamePaymentCycleAs ( Plan $ plan ) : bool { $ thisPlanData = Json :: decode ( $ this -> planData ) ; $ otherPlanData = Json :: decode ( $ plan -> planData ) ; return $ thisPlanData [ 'plan' ] [ 'interval' ] === $ otherPlanData [ 'plan' ] [ 'interval' ] && $ thisPlanData [ 'plan' ] [ 'interval_count' ] === $ otherPlanData [ 'plan' ] [ 'interval_count' ] ; }
Returns true if this plan is on the same payment cycle as another plan.

@param Plan $plan
@return bool
Returns true if this plan is on the same payment cycle as another plan .