Skip to content

Commit 17dcfdd

Browse files
committed
PHPCS fixes
1 parent 2301d46 commit 17dcfdd

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

CRM/Contract/Form/Modify.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -524,31 +524,31 @@ public function postProcess() {
524524
// The following fields to be submitted in all cases
525525
$submitted = $this->exportValues();
526526
$params = [
527-
'id' => $this->get('id'),
528-
'action' => $this->modify_action,
529-
'medium_id' => $submitted['activity_medium'],
530-
'note' => $submitted['activity_details'],
531-
]
532-
+ array_intersect_key(
533-
$submitted,
534-
array_flip(
535-
[
536-
'membership_type_id',
537-
'payment_option',
538-
'recurring_contribution',
539-
'iban',
540-
'bic',
541-
'payment_amount',
542-
'payment_frequency',
543-
'cycle_day',
544-
'account_holder',
545-
'defer_payment_start',
546-
'campaign_id',
547-
'cancel_reason',
548-
'resume_date',
549-
]
550-
)
551-
);
527+
'id' => $this->get('id'),
528+
'action' => $this->modify_action,
529+
'medium_id' => $submitted['activity_medium'],
530+
'note' => $submitted['activity_details'],
531+
]
532+
+ array_intersect_key(
533+
$submitted,
534+
array_flip(
535+
[
536+
'membership_type_id',
537+
'payment_option',
538+
'recurring_contribution',
539+
'iban',
540+
'bic',
541+
'payment_amount',
542+
'payment_frequency',
543+
'cycle_day',
544+
'account_holder',
545+
'defer_payment_start',
546+
'campaign_id',
547+
'cancel_reason',
548+
'resume_date',
549+
]
550+
)
551+
);
552552

553553
//If the date was set, convert it to the necessary format
554554
if ($submitted['activity_date']) {

Civi/Contract/Api4/Action/Contract/ModifyFullAction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Civi\Api4\ContributionRecur;
2424
use Civi\Api4\Generic\BasicUpdateAction;
2525
use Civi\Api4\Membership;
26-
use Civi\Contract\PaymentContract;
2726

2827
class ModifyFullAction extends BasicUpdateAction {
2928

@@ -40,7 +39,9 @@ protected function validateValues() {
4039
/**
4140
* @inheritDoc
4241
*/
42+
// phpcs:disable Generic.Metrics.CyclomaticComplexity.MaxExceeded, Drupal.WhiteSpace.ScopeIndent.IncorrectExact
4343
protected function writeRecord($item) {
44+
// phpcs:enable
4445
$membership = Membership::get(FALSE)
4546
->addSelect('contact_id')
4647
->addWhere('id', '=', $item['id'])

0 commit comments

Comments
 (0)