}
}
-
/**
* @param array $formValues
* @return null
if (is_array($formValues[$key])) {
if (!in_array(key($formValues[$key]), CRM_Core_DAO::acceptedSQLOperators(), TRUE)) {
- $formValues[$key] = array('IN' => $formValues[$key]);
+ $formValues[$key] = ['IN' => $formValues[$key]];
}
}
elseif (($htmlType == 'TextArea' ||
($htmlType == 'Text' && $dataType == 'String')
) && strstr($formValues[$key], '%')
) {
- $formValues[$key] = array('LIKE' => $formValues[$key]);
+ $formValues[$key] = ['LIKE' => $formValues[$key]];
}
}
}
$tableName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupID, 'table_name');
// Retrieve the $entityId so we can pass that to the hook.
- $entityID = CRM_Core_DAO::singleValueQuery("SELECT entity_id FROM {$tableName} WHERE id = %1", array(
- 1 => array($customValueID, 'Integer'),
- ));
+ $entityID = CRM_Core_DAO::singleValueQuery("SELECT entity_id FROM {$tableName} WHERE id = %1", [
+ 1 => [$customValueID, 'Integer'],
+ ]);
// delete custom value from corresponding custom value table
$sql = "DELETE FROM {$tableName} WHERE id = {$customValueID}";