Skip to content

Commit

Permalink
MAE-318: Change OfflinePaymentPlanBuilder to a trait
Browse files Browse the repository at this point in the history
  • Loading branch information
ahed-compucorp committed Feb 17, 2021
1 parent cab148d commit 1c3d595
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?php

use CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_PaymentPlan as OfflineAutoRenewalPaymentPlanQueueBuilder;
use CRM_MembershipExtras_Queue_Builder_Base as BaseQueueBuilder;
use CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_PaymentPlanTrait as OfflineAutoRenewalPaymentPlanQueueBuilderTrait;
use CRM_MembershipExtras_Queue_Task_OfflineAutoRenewal_RenewMultipleInstalmentPlans as OfflineRenewMultipleInstalmentPlansTask;

/**
* Adds payment plans with multiple instalments that are ready to
* be renewed to the queue.
*/
class CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_MultipleInstalmentPlan extends OfflineAutoRenewalPaymentPlanQueueBuilder {
class CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_MultipleInstalmentPlan extends BaseQueueBuilder {
use OfflineAutoRenewalPaymentPlanQueueBuilderTrait;

protected $taskCallback = [OfflineRenewMultipleInstalmentPlansTask::class, 'run'];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?php

use CRM_MembershipExtras_Queue_Builder_Base as BaseQueueBuilder;

/**
* Adds payment plans queue.
* Trait CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_PaymentPlanTrait
*/
class CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_PaymentPlan extends BaseQueueBuilder {
trait CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_PaymentPlanTrait {

/**
* Maps contribution status names to their corresponding ID's.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?php

use CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_PaymentPlan as OfflineAutoRenewalPaymentPlanQueueBuilder;
use CRM_MembershipExtras_Queue_Builder_Base as BaseQueueBuilder;
use CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_PaymentPlanTrait as OfflineAutoRenewalPaymentPlanQueueBuilderTrait;
use CRM_MembershipExtras_Queue_Task_OfflineAutoRenewal_RenewSingleInstalmentPlans as OfflineRenewSingleInstalmentPlansTask;

/**
* Adds payment plans with a single instalment that are ready to
* be renewed to the queue.
*/
class CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_SingleInstalmentPlan extends OfflineAutoRenewalPaymentPlanQueueBuilder {
class CRM_MembershipExtras_Queue_Builder_OfflineAutoRenewal_SingleInstalmentPlan extends BaseQueueBuilder {
use OfflineAutoRenewalPaymentPlanQueueBuilderTrait;

protected $taskCallback = [OfflineRenewSingleInstalmentPlansTask::class, 'run'];

Expand Down

0 comments on commit 1c3d595

Please sign in to comment.