Skip to content

Commit

Permalink
Merge pull request #730 from Project60/deprecatedSyntax
Browse files Browse the repository at this point in the history
Replace deprecated `${}` syntax for referencing variables in strings
  • Loading branch information
bjendres authored Aug 19, 2024
2 parents b00fad4 + ebb35a7 commit 0f4fd8e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CRM/Sepa/BAO/SEPATransactionGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static function adjustCollectionDate($txgroup_id, $latest_submission_date) {
return "Bad date adjustment given!";
}

$notice_period = (int) CRM_Sepa_Logic_Settings::getSetting("batching.${txgroup['type']}.notice", $txgroup['sdd_creditor_id']);
$notice_period = (int) CRM_Sepa_Logic_Settings::getSetting("batching.{$txgroup['type']}.notice", $txgroup['sdd_creditor_id']);
$new_collection_date = date('YmdHis', strtotime("$latest_submission_date + $notice_period days"));
CRM_Sepa_Logic_Batching::deferCollectionDate($new_collection_date, $txgroup['sdd_creditor_id']);
$new_latest_submission_date = date('YmdHis', strtotime("$latest_submission_date"));
Expand Down
4 changes: 2 additions & 2 deletions CRM/Sepa/Logic/Batching.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ protected static function syncGroups($calculated_groups, $existing_groups, $mode
// this group does not yet exist -> create

// find unused reference
$reference = "TXG-${creditor_id}-${mode}-${collection_date}";
$reference = "TXG-{$creditor_id}-{$mode}-{$collection_date}";
$counter = 0;
while (self::referenceExists($reference)) {
$counter += 1;
$reference = "TXG-${creditor_id}-${mode}-${collection_date}--".$counter;
$reference = "TXG-{$creditor_id}-{$mode}-{$collection_date}--".$counter;
}

// call the hook
Expand Down
2 changes: 1 addition & 1 deletion CRM/Sepa/Page/CreateMandate.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function run() {
CRM_Utils_System::setTitle(ts('Create SEPA Mandate', array('domain' => 'org.project60.sepa')));
if (isset($_REQUEST['mandate_type'])) {
$contact_id = $_REQUEST['contact_id'];
$this->assign("back_url", CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=${contact_id}&selectedChild=contribute"));
$this->assign("back_url", CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$contact_id}&selectedChild=contribute"));

$errors = $this->validateParameters($_REQUEST['mandate_type']);
if (count($errors) > 0) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/SepaCustomisationHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static function create_mandate(&$mandate_parameters) {
/**
* This hook is called when a new transaction group is generated
*
* The default implementation is "TXG-${creditor_id}-${mode}-${collection_date}"
* The default implementation is "TXG-{$creditor_id}-{$mode}-{$collection_date}"
*
* Be aware the the reference has to be unique. You will have to use suffixes
* if your preferred reference is already in use.
Expand Down

0 comments on commit 0f4fd8e

Please sign in to comment.