// all fieldnames have to be defined and should exist in schema.
foreach ($primaryKey['field'] as $fieldName) {
if (!$fieldName) {
- echo "Invalid field definition for index '$name' in table ${table['name']}\n";
+ echo "Invalid field definition for index '$name' in table {$table['name']}\n";
return;
}
$parenOffset = strpos($fieldName, '(');
$fieldName = substr($fieldName, 0, $parenOffset);
}
if (!array_key_exists($fieldName, $fields)) {
- echo "Missing definition of field '$fieldName' for index '$name' in table ${table['name']}\n";
+ echo "Missing definition of field '$fieldName' for index '$name' in table {$table['name']}\n";
print_r($fields);
exit();
}
$timenow = new Datetime();
if (!$isBackOffice && isset($time_limit)) {
$cancelHours = abs($time_limit);
- $cancelInterval = new DateInterval("PT${cancelHours}H");
+ $cancelInterval = new DateInterval("PT{$cancelHours}H");
$cancelInterval->invert = $time_limit < 0 ? 1 : 0;
$cancelDeadline = (new Datetime($start_date))->sub($cancelInterval);
if ($timenow > $cancelDeadline) {
// unless baseDir is set, so this error condition is more theoretical.
if (empty($this->baseDir) || !is_dir($this->baseDir)) {
$civicrmDestination = urlencode(CRM_Utils_System::url('civicrm/admin/extensions', 'reset=1'));
- $url = CRM_Utils_System::url('civicrm/admin/setting/path', "reset=1&civicrmDestination=${civicrmDestination}");
+ $url = CRM_Utils_System::url('civicrm/admin/setting/path', "reset=1&civicrmDestination={$civicrmDestination}");
$errors[] = array(
'title' => ts('Invalid Base Directory'),
'message' => ts('The extensions directory is not properly set. Please go to the <a href="%1">path setting page</a> and correct it.<br/>',
}
if (empty($this->baseUrl)) {
$civicrmDestination = urlencode(CRM_Utils_System::url('civicrm/admin/extensions', 'reset=1'));
- $url = CRM_Utils_System::url('civicrm/admin/setting/url', "reset=1&civicrmDestination=${civicrmDestination}");
+ $url = CRM_Utils_System::url('civicrm/admin/setting/url', "reset=1&civicrmDestination={$civicrmDestination}");
$errors[] = array(
'title' => ts('Invalid Base URL'),
'message' => ts('The extensions URL is not properly set. Please go to the <a href="%1">URL setting page</a> and correct it.<br/>',
if (!$this->containerDir || !is_dir($this->containerDir) || !is_writable($this->containerDir)) {
$civicrmDestination = urlencode(CRM_Utils_System::url('civicrm/admin/extensions', 'reset=1'));
- $url = CRM_Utils_System::url('civicrm/admin/setting/path', "reset=1&civicrmDestination=${civicrmDestination}");
+ $url = CRM_Utils_System::url('civicrm/admin/setting/path', "reset=1&civicrmDestination={$civicrmDestination}");
$errors[] = array(
'title' => ts('Directory Unwritable'),
'message' => ts("Your extensions directory is not set or is not writable. Click <a href='%1'>here</a> to set the extensions directory.",
// Handle SMS errors: CRM-15426
$job_id = intval($this->id);
$mailing_id = intval($mailing->id);
- CRM_Core_Error::debug_log_message("Failed to send SMS message. Vars: mailing_id: ${mailing_id}, job_id: ${job_id}. Error message follows.");
+ CRM_Core_Error::debug_log_message("Failed to send SMS message. Vars: mailing_id: {$mailing_id}, job_id: {$job_id}. Error message follows.");
CRM_Core_Error::debug_log_message($result->getMessage());
}
else {
// Handle SMS errors: CRM-15426
$job_id = (int) $this->id;
$mailing_id = (int) $mailing->id;
- CRM_Core_Error::debug_log_message("Failed to send SMS message. Vars: mailing_id: ${mailing_id}, job_id: ${job_id}. Error message follows.");
+ CRM_Core_Error::debug_log_message("Failed to send SMS message. Vars: mailing_id: {$mailing_id}, job_id: {$job_id}. Error message follows.");
CRM_Core_Error::debug_log_message($e->getMessage());
}
if ($this->_relField) {
$this->_from = "
FROM civicrm_contact $c
-inner join civicrm_relationship $cr on {$c}.id = ${cr}.contact_id_b OR {$c}.id = ${cr}.contact_id_a
-inner join civicrm_case $cc on ${cc}.id = ${cr}.case_id
-inner join civicrm_relationship_type $crt on ${crt}.id=${cr}.relationship_type_id
-inner join civicrm_case_contact $ccc on ${ccc}.case_id = ${cc}.id
-inner join civicrm_contact $c2 on ${c2}.id=${ccc}.contact_id
+inner join civicrm_relationship $cr on {$c}.id = {$cr}.contact_id_b OR {$c}.id = {$cr}.contact_id_a
+inner join civicrm_case $cc on {$cc}.id = {$cr}.case_id
+inner join civicrm_relationship_type $crt on {$crt}.id={$cr}.relationship_type_id
+inner join civicrm_case_contact $ccc on {$ccc}.case_id = {$cc}.id
+inner join civicrm_contact $c2 on {$c2}.id={$ccc}.contact_id
";
}
else {
$this->_from = "
FROM civicrm_case $cc
-inner join civicrm_case_contact $ccc on ${ccc}.case_id = ${cc}.id
-inner join civicrm_contact $c2 on ${c2}.id=${ccc}.contact_id
+inner join civicrm_case_contact $ccc on {$ccc}.case_id = {$cc}.id
+inner join civicrm_contact $c2 on {$c2}.id={$ccc}.contact_id
";
}
}
foreach ($include_dirs as $include_dir) {
foreach ([$camelName, 'Generic'] as $name) {
$action_dir = implode(DIRECTORY_SEPARATOR,
- [$include_dir, 'api', "v${version}", $name]);
+ [$include_dir, 'api', "v{$version}", $name]);
// see note above in getEntityNames about open_basedir
if (!\CRM_Utils_File::isDir($action_dir)) {
continue;
$profile = $this->callAPISuccess('UFGroup', 'create', [
'group_type' => 'Contact',
'title' => "Billing fields: $name",
- 'name' => "${name}_billing",
+ 'name' => "{$name}_billing",
]);
$this->callAPISuccess('UFField', 'create', [
SELECT SUM(fi.amount) total
FROM civicrm_financial_item fi
INNER JOIN civicrm_line_item li ON li.id = fi.entity_id AND fi.entity_table = 'civicrm_line_item'
- WHERE li.entity_table = 'civicrm_participant' AND li.entity_id = ${participantId}
+ WHERE li.entity_table = 'civicrm_participant' AND li.entity_id = {$participantId}
";
$dao = CRM_Core_DAO::executeQuery($query);
$isValid = $validator->validate($signature, $case['validateParams']);
if ($isValid !== $case['isValid']) {
- $this->fail("Case ${caseId}: Mismatch: " . var_export($case, TRUE));
+ $this->fail("Case {$caseId}: Mismatch: " . var_export($case, TRUE));
}
$this->assertTrue(TRUE, 'Validation yielded expected result');
}