From 92fcb95fbd9114b128e44d19b8208e20e0ae3742 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 21:52:59 -0800 Subject: [PATCH] INFRA-132 - Spaces around "." --- CRM/ACL/Form/WordPress/Permissions.php | 4 +-- CRM/Activity/Import/Form/DataSource.php | 2 +- CRM/Activity/Page/AJAX.php | 34 +++++++++---------- CRM/Badge/Form/Layout.php | 2 +- CRM/Batch/BAO/Batch.php | 8 ++--- CRM/Batch/Form/Entry.php | 2 +- CRM/Campaign/Page/DashBoard.php | 2 +- CRM/Case/Form/CaseView.php | 12 +++---- CRM/Contact/BAO/Group.php | 2 +- CRM/Contact/BAO/Relationship.php | 2 +- CRM/Contact/Form/Inline/Email.php | 2 +- CRM/Contact/Form/Inline/IM.php | 2 +- CRM/Contact/Form/Inline/OpenID.php | 2 +- CRM/Contact/Form/Inline/Phone.php | 2 +- CRM/Contact/Selector.php | 2 +- CRM/Contribute/Form/AdditionalInfo.php | 2 +- CRM/Contribute/Form/AdditionalPayment.php | 2 +- CRM/Contribute/Form/Contribution/Main.php | 4 +-- CRM/Contribute/Form/ManagePremiums.php | 4 +-- CRM/Contribute/Form/Task/PDFLetterCommon.php | 4 +-- CRM/Contribute/Import/Form/DataSource.php | 2 +- CRM/Contribute/Import/Form/MapField.php | 4 +-- CRM/Contribute/PseudoConstant.php | 2 +- CRM/Core/BAO/ActionSchedule.php | 4 +-- CRM/Core/BAO/Navigation.php | 2 +- CRM/Core/BAO/Setting.php | 2 +- CRM/Core/BAO/Tag.php | 2 +- CRM/Core/CodeGen/Main.php | 2 +- CRM/Core/CodeGen/Specification.php | 2 +- CRM/Core/CodeGen/Util/Template.php | 2 +- CRM/Core/Error.php | 4 +-- CRM/Core/Form/RecurringEntity.php | 12 +++---- CRM/Core/Form/Renderer.php | 2 +- CRM/Core/Page/AJAX.php | 2 +- CRM/Core/Payment/AuthorizeNetIPN.php | 2 +- CRM/Core/Payment/BaseIPN.php | 4 +-- CRM/Core/Payment/PaymentExpress.php | 2 +- CRM/Core/PseudoConstant.php | 2 +- CRM/Core/Smarty/plugins/function.crmAPI.php | 2 +- .../plugins/prefilter.resetExtScope.php | 2 +- CRM/Custom/Import/Form/DataSource.php | 2 +- CRM/Custom/Import/Parser/Api.php | 2 +- CRM/Event/BAO/Query.php | 2 +- CRM/Event/Cart/Form/Checkout/Payment.php | 2 +- CRM/Event/Form/ManageEvent/Registration.php | 2 +- CRM/Event/Form/ManageEvent/Repeat.php | 2 +- CRM/Event/Form/Participant.php | 2 +- CRM/Event/Form/ParticipantFeeSelection.php | 4 +-- CRM/Event/Import/Form/DataSource.php | 2 +- CRM/Financial/BAO/ExportFormat.php | 6 ++-- CRM/Financial/BAO/ExportFormat/CSV.php | 4 +-- CRM/Financial/BAO/ExportFormat/IIF.php | 6 ++-- CRM/Financial/Form/FinancialBatch.php | 4 +-- CRM/Financial/Form/FinancialTypeAccount.php | 2 +- CRM/Financial/Page/AJAX.php | 10 +++--- CRM/Financial/Page/FinancialTypeAccount.php | 2 +- CRM/Import/DataSource/CSV.php | 2 +- CRM/Mailing/BAO/Mailing.php | 6 ++-- CRM/Mailing/BAO/Query.php | 2 +- CRM/Member/Form/Membership.php | 2 +- CRM/Member/Form/MembershipBlock.php | 2 +- CRM/Member/Import/Form/DataSource.php | 2 +- CRM/Price/BAO/PriceField.php | 6 ++-- CRM/Price/Form/Field.php | 2 +- .../Page/MultipleRecordFieldsListing.php | 2 +- CRM/Report/Form/Contact/LoggingSummary.php | 8 ++--- CRM/Upgrade/Incremental/php/FourFour.php | 12 +++---- CRM/Upgrade/Incremental/php/FourThree.php | 4 +-- CRM/Upgrade/Incremental/php/FourTwo.php | 2 +- CRM/Utils/Cache/SerializeCache.php | 8 ++--- CRM/Utils/Mail/EmailProcessor.php | 2 +- CRM/Utils/PDF/Utils.php | 2 +- CRM/Utils/REST.php | 2 +- CRM/Utils/String.php | 6 ++-- CRM/Utils/System/Joomla.php | 4 +-- api/v3/Contact.php | 2 +- api/v3/Generic/Setvalue.php | 2 +- api/v3/Profile.php | 8 ++--- api/v3/utils.php | 2 +- .../BAO/ContactType/ContactSearchTest.php | 6 ++-- .../BAO/ContactType/ContactTypeTest.php | 8 ++--- tests/phpunit/CRM/Core/ErrorTest.php | 4 +-- .../CRM/Core/Payment/PayPalProIPNTest.php | 2 +- tests/phpunit/CRM/Extension/BrowserTest.php | 10 +++--- tests/phpunit/CRM/Extension/ManagerTest.php | 6 ++-- .../CRM/Financial/BAO/FinancialItemTest.php | 2 +- tests/phpunit/CiviTest/CiviReportTestCase.php | 2 +- .../Activity/ContactContextAddTest.php | 2 +- .../WebTest/Case/ActivityToCaseTest.php | 12 +++---- .../phpunit/WebTest/Case/AddCaseTypeTest.php | 4 +-- .../AdvancedSearchedRelatedContactTest.php | 8 ++--- .../WebTest/Contact/CustomDataAddTest.php | 8 ++--- .../phpunit/WebTest/Contact/GroupAddTest.php | 2 +- .../WebTest/Contact/MergeContactsTest.php | 22 ++++++------ .../WebTest/Contact/RelationshipAddTest.php | 2 +- .../Contribute/ContactContextAddTest.php | 4 +-- .../Contribute/OnBehalfOfOrganization.php | 16 ++++----- .../WebTest/Contribute/StandaloneAddTest.php | 4 +-- .../Contribute/UpdateContributionTest.php | 16 ++++----- tests/phpunit/WebTest/Event/AddEventTest.php | 2 +- .../phpunit/WebTest/Event/AddPricesetTest.php | 6 ++-- .../WebTest/Event/ParticipantCountTest.php | 4 +-- .../WebTest/Event/PricesetMaxCountTest.php | 28 +++++++-------- .../phpunit/WebTest/Event/TellAFriendTest.php | 2 +- tests/phpunit/WebTest/Export/ContactTest.php | 10 +++--- .../Financial/FinancialAccountTest.php | 6 ++-- .../Financial/FinancialAccountTypeTest.php | 4 +-- .../WebTest/Import/AddressImportTest.php | 2 +- .../OfflineMembershipAddPricesetTest.php | 6 ++-- .../OnlineMembershipAddPricesetTest.php | 6 ++-- .../WebTest/Member/StandaloneAddTest.php | 2 +- .../Profile/MultiRecordProfileAddTest.php | 14 ++++---- tests/phpunit/WebTest/Profile/SearchTest.php | 2 +- .../WebTest/Report/LoggingReportTest.php | 2 +- tests/phpunit/api/v3/ActionScheduleTest.php | 4 +-- tests/phpunit/api/v3/ReportTemplateTest.php | 2 +- .../api/v3/TaxContributionPageTest.php | 16 ++++----- 117 files changed, 278 insertions(+), 278 deletions(-) diff --git a/CRM/ACL/Form/WordPress/Permissions.php b/CRM/ACL/Form/WordPress/Permissions.php index 17790a9b5f..a6abf1bb46 100644 --- a/CRM/ACL/Form/WordPress/Permissions.php +++ b/CRM/ACL/Form/WordPress/Permissions.php @@ -64,7 +64,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form { if (!empty($roleObj->capabilities)) { foreach ($roleObj->capabilities as $ckey => $cname) { if (array_key_exists($ckey, $permissionsArray)) { - $elementName = $role.'['.$ckey.']'; + $elementName = $role . '[' . $ckey . ']'; $defaults[$elementName] = 1; } } @@ -73,7 +73,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form { // Compose the checkbox array for each role, to assign to form $rolePerms[$role] = $permissionsArray; foreach ($rolePerms[$role] as $key => $value) { - $elementName = $role.'['.$key.']'; + $elementName = $role . '[' . $key . ']'; $this->add('checkbox', $elementName, $value); } $roles[$role] = $name; diff --git a/CRM/Activity/Import/Form/DataSource.php b/CRM/Activity/Import/Form/DataSource.php index c026cba134..db08ae6ad3 100644 --- a/CRM/Activity/Import/Form/DataSource.php +++ b/CRM/Activity/Import/Form/DataSource.php @@ -59,7 +59,7 @@ class CRM_Activity_Import_Form_DataSource extends CRM_Core_Form { //Setting Upload File Size $config = CRM_Core_Config::singleton(); - $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE); + $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE); $uploadSize = round(($uploadFileSize / (1024 * 1024)), 2); $this->assign('uploadSize', $uploadSize); diff --git a/CRM/Activity/Page/AJAX.php b/CRM/Activity/Page/AJAX.php index 9a96968ebf..f563c51b8d 100644 --- a/CRM/Activity/Page/AJAX.php +++ b/CRM/Activity/Page/AJAX.php @@ -92,7 +92,7 @@ class CRM_Activity_Page_AJAX { //CRM-14466 initialize variable to avoid php notice $sortSQL = ""; if ($sort && $sortOrder) { - $sortSQL = $sort .' '.$sortOrder; + $sortSQL = $sort . ' ' . $sortOrder; } // get the activities related to given case @@ -129,7 +129,7 @@ class CRM_Activity_Page_AJAX { $params = $_POST; if ($sort && $sortOrder) { - $sortSQL = $sort .' '.$sortOrder; + $sortSQL = $sort . ' ' . $sortOrder; } // Retrieve ALL client relationships @@ -162,8 +162,8 @@ class CRM_Activity_Page_AJAX { // after sort we can update username fields to be a url foreach ($clientRelationships as $key => $value) { - $clientRelationships[$key]['name'] = ''.$clientRelationships[$key]['name'].''; + $clientRelationships[$key]['name'] = '' . $clientRelationships[$key]['name'] . ''; } $iFilteredTotal = $iTotal = $params['total'] = count($allClientRelationships); @@ -194,7 +194,7 @@ class CRM_Activity_Page_AJAX { $params = $_POST; if ($sort && $sortOrder) { - $sortSQL = $sort .' '.$sortOrder; + $sortSQL = $sort . ' ' . $sortOrder; } $caseRelationships = CRM_Case_BAO_Case::getCaseRoles($contactID, $caseID); @@ -270,12 +270,12 @@ class CRM_Activity_Page_AJAX { list($typeLabel) = explode('<', $row['relation']); // view user links if (!empty($row['cid'])) { - $row['name'] = ''.$row['name'].''; + $row['name'] = '' . $row['name'] . ''; } // email column links/icon if ($row['email']) { - $row['email'] = ''; + $row['email'] = ''; } // edit links $row['actions'] = ''; @@ -285,18 +285,18 @@ class CRM_Activity_Page_AJAX { switch ($row['source']) { case 'caseRel': $row['actions'] = - ''. - ''. - ''. - ''. - ''. + '' . + '' . + '' . + '' . + '' . ''; break; case 'caseRoles': $row['actions'] = - ''. - ''. + '' . + '' . ''; break; } @@ -477,10 +477,10 @@ class CRM_Activity_Page_AJAX { //Check if recurring activity if (CRM_Utils_Array::value('is_recurring_activity', $value)) { if ($key == $value['is_recurring_activity']) { - $activities[$key]['activity_type'] = $activities[$key]['activity_type'].'
Recurring Activity - (Parent)'; + $activities[$key]['activity_type'] = $activities[$key]['activity_type'] . '
Recurring Activity - (Parent)'; } else { - $activities[$key]['activity_type'] = $activities[$key]['activity_type'].'
Recurring Activity - (Child)'; + $activities[$key]['activity_type'] = $activities[$key]['activity_type'] . '
Recurring Activity - (Child)'; } } } diff --git a/CRM/Badge/Form/Layout.php b/CRM/Badge/Form/Layout.php index 7a9f8689d2..4379559175 100644 --- a/CRM/Badge/Form/Layout.php +++ b/CRM/Badge/Form/Layout.php @@ -54,7 +54,7 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form { $resources = CRM_Core_Resources::singleton(); $resources->addSetting( array( - 'kcfinderPath' => $config->userFrameworkResourceURL .'packages' .DIRECTORY_SEPARATOR + 'kcfinderPath' => $config->userFrameworkResourceURL . 'packages' . DIRECTORY_SEPARATOR ) ); $resources->addScriptFile('civicrm', 'templates/CRM/Badge/Form/Layout.js', 1, 'html-header'); diff --git a/CRM/Batch/BAO/Batch.php b/CRM/Batch/BAO/Batch.php index f3b895a042..3a389e200f 100755 --- a/CRM/Batch/BAO/Batch.php +++ b/CRM/Batch/BAO/Batch.php @@ -305,7 +305,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch { "' name='check_" . $object->id . "' value='1' data-status_id='" . - $values['status_id']."' class='select-row'>"; + $values['status_id'] . "' class='select-row'>"; switch ($batchStatusByName[$values['status_id']]) { case 'Open': @@ -655,7 +655,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch { // action is taken depending upon the mode $select = 'civicrm_financial_trxn.id '; if (!empty($returnValues)) { - $select .= " , ".implode(' , ', $returnValues); + $select .= " , " . implode(' , ', $returnValues); } $orderBy = " ORDER BY civicrm_financial_trxn.id"; @@ -780,7 +780,7 @@ WHERE {$where} public static function getBatchNames($batchIds) { $query = 'SELECT id, title FROM civicrm_batch - WHERE id IN ('. $batchIds . ')'; + WHERE id IN (' . $batchIds . ')'; $batches = array(); $dao = CRM_Core_DAO::executeQuery($query); @@ -800,7 +800,7 @@ WHERE {$where} public static function getBatchStatuses($batchIds) { $query = 'SELECT id, status_id FROM civicrm_batch - WHERE id IN ('.$batchIds.')'; + WHERE id IN (' . $batchIds . ')'; $batches = array(); $dao = CRM_Core_DAO::executeQuery($query); diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 18600211b8..fc2d9622fd 100755 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -492,7 +492,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { // build line item params $this->_priceSet['fields'][$priceFieldID]['options'][$priceFieldValueID]['amount'] = $value['total_amount']; - $value['price_'. $priceFieldID] = 1; + $value['price_' . $priceFieldID] = 1; $lineItem = array(); CRM_Price_BAO_PriceSet::processAmount($this->_priceSet['fields'], $value, $lineItem[$priceSetId]); diff --git a/CRM/Campaign/Page/DashBoard.php b/CRM/Campaign/Page/DashBoard.php index 472fb14c7c..d1eb133931 100644 --- a/CRM/Campaign/Page/DashBoard.php +++ b/CRM/Campaign/Page/DashBoard.php @@ -332,7 +332,7 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page { $surveysData[$sid]['is_default'] = $isDefault; if ($surveysData[$sid]['result_id']) { - $resultSet = '' . ts('Result Set') . ''; + $resultSet = '' . ts('Result Set') . ''; $surveysData[$sid]['result_id'] = $resultSet; } else { diff --git a/CRM/Case/Form/CaseView.php b/CRM/Case/Form/CaseView.php index 6bc55a23cf..dc9d69b09c 100644 --- a/CRM/Case/Form/CaseView.php +++ b/CRM/Case/Form/CaseView.php @@ -506,7 +506,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { foreach ($caseRelationships as $key => & $value) { $reporters[$value['cid']] = $value['name'] . " ( {$value['relation']} )"; } - $form->add('select', 'reporter_id', ts('Reporter/Role'), $reporters, FALSE, array('id' => 'reporter_id_'.$form->_caseID)); + $form->add('select', 'reporter_id', ts('Reporter/Role'), $reporters, FALSE, array('id' => 'reporter_id_' . $form->_caseID)); // take all case activity types for search filter, CRM-7187 $aTypesFilter = array(); @@ -518,17 +518,17 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { } $aTypesFilter = $aTypesFilter + $aTypes; asort($aTypesFilter); - $form->add('select', 'activity_type_filter_id', ts('Activity Type'), array('' => ts('- select activity type -')) + $aTypesFilter, FALSE, array('id' => 'activity_type_filter_id_'.$form->_caseID)); + $form->add('select', 'activity_type_filter_id', ts('Activity Type'), array('' => ts('- select activity type -')) + $aTypesFilter, FALSE, array('id' => 'activity_type_filter_id_' . $form->_caseID)); $activityStatus = CRM_Core_PseudoConstant::activityStatus(); - $form->add('select', 'status_id', ts('Status'), array("" => ts(' - any status - ')) + $activityStatus, FALSE, array('id' => 'status_id_'.$form->_caseID)); + $form->add('select', 'status_id', ts('Status'), array("" => ts(' - any status - ')) + $activityStatus, FALSE, array('id' => 'status_id_' . $form->_caseID)); // activity dates - $form->addDate('activity_date_low_'.$form->_caseID, ts('Activity Dates - From'), FALSE, array('formatType' => 'searchDate')); - $form->addDate('activity_date_high_'.$form->_caseID, ts('To'), FALSE, array('formatType' => 'searchDate')); + $form->addDate('activity_date_low_' . $form->_caseID, ts('Activity Dates - From'), FALSE, array('formatType' => 'searchDate')); + $form->addDate('activity_date_high_' . $form->_caseID, ts('To'), FALSE, array('formatType' => 'searchDate')); if (CRM_Core_Permission::check('administer CiviCRM')) { - $form->add('checkbox', 'activity_deleted', ts('Deleted Activities'), '', FALSE, array('id' => 'activity_deleted_'.$form->_caseID)); + $form->add('checkbox', 'activity_deleted', ts('Deleted Activities'), '', FALSE, array('id' => 'activity_deleted_' . $form->_caseID)); } } } diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 39b79063b0..760ea39fba 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -756,7 +756,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { foreach ($groupIds as $gId) { $title[] = $allGroups[$gId]; } - $groupList[$id]['group_name'] .= '
'.ts('Child of').': ' . implode(', ', $title) . '
'; + $groupList[$id]['group_name'] .= '
' . ts('Child of') . ': ' . implode(', ', $title) . '
'; $value['class'] = array_diff($value['class'], array('crm-row-parent')); } $value['class'][] = 'crm-entity'; diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index c023513d29..ba544051b8 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -1818,7 +1818,7 @@ AND cc.sort_name LIKE '%$name%'"; FALSE, $values['cid'] ); - $contactRelationships[$relationshipId]['name'] = $icon.' '.CRM_Utils_System::href( + $contactRelationships[$relationshipId]['name'] = $icon . ' ' . CRM_Utils_System::href( $values['name'], 'civicrm/contact/view', "reset=1&cid={$values['cid']}"); diff --git a/CRM/Contact/Form/Inline/Email.php b/CRM/Contact/Form/Inline/Email.php index a6e623d564..2e4d668ff4 100644 --- a/CRM/Contact/Form/Inline/Email.php +++ b/CRM/Contact/Form/Inline/Email.php @@ -125,7 +125,7 @@ class CRM_Contact_Form_Inline_Email extends CRM_Contact_Form_Inline { } if (count($hasPrimary) > 1) { - $errors["email[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one email can be marked as primary.'); + $errors["email[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one email can be marked as primary.'); } } return $errors; diff --git a/CRM/Contact/Form/Inline/IM.php b/CRM/Contact/Form/Inline/IM.php index bc583ea486..698362e5c3 100644 --- a/CRM/Contact/Form/Inline/IM.php +++ b/CRM/Contact/Form/Inline/IM.php @@ -127,7 +127,7 @@ class CRM_Contact_Form_Inline_IM extends CRM_Contact_Form_Inline { } if (count($hasPrimary) > 1) { - $errors["im[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one IM can be marked as primary.'); + $errors["im[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one IM can be marked as primary.'); } } return $errors; diff --git a/CRM/Contact/Form/Inline/OpenID.php b/CRM/Contact/Form/Inline/OpenID.php index 0f7bf65c33..8a79fa730b 100644 --- a/CRM/Contact/Form/Inline/OpenID.php +++ b/CRM/Contact/Form/Inline/OpenID.php @@ -127,7 +127,7 @@ class CRM_Contact_Form_Inline_OpenID extends CRM_Contact_Form_Inline { } if (count($hasPrimary) > 1) { - $errors["openid[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one OpenID can be marked as primary.'); + $errors["openid[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one OpenID can be marked as primary.'); } } return $errors; diff --git a/CRM/Contact/Form/Inline/Phone.php b/CRM/Contact/Form/Inline/Phone.php index 9a61f729ca..9edd86d248 100644 --- a/CRM/Contact/Form/Inline/Phone.php +++ b/CRM/Contact/Form/Inline/Phone.php @@ -128,7 +128,7 @@ class CRM_Contact_Form_Inline_Phone extends CRM_Contact_Form_Inline { } if (count($hasPrimary) > 1) { - $errors["phone[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one phone can be marked as primary.'); + $errors["phone[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one phone can be marked as primary.'); } } return $errors; diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index 4f6b911543..9ae3d33293 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -1066,7 +1066,7 @@ SELECT DISTINCT 'civicrm_contact', contact_a.id, contact_a.id, '$cacheKey', cont //update pre/next cache using single insert query if (!empty($insertValues)) { $sql = 'INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, cacheKey, data ) VALUES -'.implode(',', $insertValues); +' . implode(',', $insertValues); $result = CRM_Core_DAO::executeQuery($sql); } diff --git a/CRM/Contribute/Form/AdditionalInfo.php b/CRM/Contribute/Form/AdditionalInfo.php index e45757fb63..5578c80797 100644 --- a/CRM/Contribute/Form/AdditionalInfo.php +++ b/CRM/Contribute/Form/AdditionalInfo.php @@ -503,7 +503,7 @@ class CRM_Contribute_Form_AdditionalInfo { 'toName' => $contributorDisplayName, 'toEmail' => $contributorEmail, 'isTest' => $form->_mode == 'test', - 'PDFFilename' => ts('receipt').'.pdf', + 'PDFFilename' => ts('receipt') . '.pdf', 'isEmailPdf' => $isEmailPdf, ) ); diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index 2267a54c77..1bbd022802 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -692,7 +692,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract 'groupName' => 'msg_tpl_workflow_contribution', 'valueName' => 'payment_or_refund_notification', 'contactId' => $this->_contactId, - 'PDFFilename' => ts('notification').'.pdf', + 'PDFFilename' => ts('notification') . '.pdf', ); // try to send emails only if email id is present diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 4cacae0c13..929fa14009 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -1263,14 +1263,14 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu if ($is_quick_config) { foreach ($this->_values['fee'] as $key => & $val) { if ($val['name'] == 'other_amount' && $val['html_type'] == 'Text' && array_key_exists('price_'.$key, $params) ) { - $params['price_'.$key] = CRM_Utils_Rule::cleanMoney($params['price_'.$key]); //Clean out any currency symbols + $params['price_' . $key] = CRM_Utils_Rule::cleanMoney($params['price_' . $key]); //Clean out any currency symbols if ($params['price_'.$key] != 0) { foreach ($val['options'] as $optionKey => & $options) { $options['amount'] = CRM_Utils_Array::value('price_'.$key, $params); break; } } - $params['price_'.$key] = 1; + $params['price_' . $key] = 1; break; } } diff --git a/CRM/Contribute/Form/ManagePremiums.php b/CRM/Contribute/Form/ManagePremiums.php index 813052315a..d72cb47b3e 100644 --- a/CRM/Contribute/Form/ManagePremiums.php +++ b/CRM/Contribute/Form/ManagePremiums.php @@ -363,7 +363,7 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form { private function _resizeImage($filename, $resizedName, $width, $height) { // figure out the new filename $pathParts = pathinfo($filename); - $newFilename = $pathParts['dirname']."/".$pathParts['filename'].$resizedName.".".$pathParts['extension']; + $newFilename = $pathParts['dirname'] . "/" . $pathParts['filename'] . $resizedName . "." . $pathParts['extension']; // get image about original image $imageInfo = getimagesize($filename); @@ -396,7 +396,7 @@ class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form { // return the URL to link to $config = CRM_Core_Config::singleton(); - return $config->imageUploadURL.basename($newFilename); + return $config->imageUploadURL . basename($newFilename); } } diff --git a/CRM/Contribute/Form/Task/PDFLetterCommon.php b/CRM/Contribute/Form/Task/PDFLetterCommon.php index 7d2e6e99a3..fe086d97e0 100644 --- a/CRM/Contribute/Form/Task/PDFLetterCommon.php +++ b/CRM/Contribute/Form/Task/PDFLetterCommon.php @@ -165,8 +165,8 @@ class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDF public static function isHtmlTokenInTableCell($token, $entity, $textToSearch) { $tokenToMatch = $entity . '.' . $token; $dontCare = array(); - $within = preg_match_all("|maxFileSize.'m', TRUE); + $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE); $uploadSize = round(($uploadFileSize / (1024 * 1024)), 2); $this->assign('uploadSize', $uploadSize); diff --git a/CRM/Contribute/Import/Form/MapField.php b/CRM/Contribute/Import/Form/MapField.php index 445dc45ba1..2312392dfa 100644 --- a/CRM/Contribute/Import/Form/MapField.php +++ b/CRM/Contribute/Import/Form/MapField.php @@ -289,8 +289,8 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField { ); } if (!empty($mapperKeysValues) && $mapperKeysValues[$i][0] == 'soft_credit') { - $js .= "cj('#mapper_".$i."_1').val($mapperKeysValues[$i][1]);\n"; - $js .= "cj('#mapper_".$i."_2').val($mapperKeysValues[$i][2]);\n"; + $js .= "cj('#mapper_" . $i . "_1').val($mapperKeysValues[$i][1]);\n"; + $js .= "cj('#mapper_" . $i . "_2').val($mapperKeysValues[$i][2]);\n"; } } $sel->setOptions(array($sel1, $sel2, $sel3, $sel4)); diff --git a/CRM/Contribute/PseudoConstant.php b/CRM/Contribute/PseudoConstant.php index 3e64203922..5cd2a80d8d 100644 --- a/CRM/Contribute/PseudoConstant.php +++ b/CRM/Contribute/PseudoConstant.php @@ -160,7 +160,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant { public static function &financialAccount($id = NULL, $financialAccountTypeId = NULL, $retrieveColumn = 'name', $key = 'id') { $condition = NULL; if ($financialAccountTypeId) { - $condition = " financial_account_type_id = ". $financialAccountTypeId; + $condition = " financial_account_type_id = " . $financialAccountTypeId; } $cacheKey = "{$id}_{$financialAccountTypeId}_{$retrieveColumn}_{$key}"; if (!isset(self::$financialAccount[$cacheKey])) { diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index 17de29d0b3..c04ba29995 100644 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -1207,7 +1207,7 @@ reminder.action_schedule_id = %1"; $date = $operator . "({$dateField}, INTERVAL {$actionSchedule->start_action_offset} {$actionSchedule->start_action_unit})"; $startDateClause[] = "'{$now}' >= {$date}"; if ($mapping->entity == 'civicrm_participant') { - $startDateClause[] = $operator. "({$now}, INTERVAL 1 DAY ) {$op} " . $dateField; + $startDateClause[] = $operator . "({$now}, INTERVAL 1 DAY ) {$op} " . $dateField; } else { $startDateClause[] = "DATE_SUB({$now}, INTERVAL 1 DAY ) <= {$date}"; @@ -1390,7 +1390,7 @@ WHERE m.owner_membership_id IS NOT NULL AND } if (!empty($excludeIds)) { - $clause = "AND {$field} NOT IN ( " .implode(', ', $excludeIds) . ' ) '; + $clause = "AND {$field} NOT IN ( " . implode(', ', $excludeIds) . ' ) '; return $clause; } return NULL; diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php index a012d72d94..169b2dfb0a 100644 --- a/CRM/Core/BAO/Navigation.php +++ b/CRM/Core/BAO/Navigation.php @@ -630,7 +630,7 @@ ORDER BY parent_id, weight"; "; //
  • tag doesn't need to be closed } diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index ecbe53cfa3..ae9af0d1a4 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -663,7 +663,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { $settingsMetadata = CRM_Core_BAO_Cache::getItem('CiviCRM setting Spec', 'All', $componentID); if (empty($settingsMetadata)) { global $civicrm_root; - $metaDataFolders = array($civicrm_root. '/settings'); + $metaDataFolders = array($civicrm_root . '/settings'); CRM_Utils_Hook::alterSettingsFolders($metaDataFolders); $settingsMetadata = self::loadSettingsMetaDataFolders($metaDataFolders); CRM_Core_BAO_Cache::setItem($settingsMetadata,'CiviCRM setting Spec', 'All', $componentID); diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index 23f4dc30c1..0a81bde29a 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -304,7 +304,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { $formattedTags = array(); foreach ($tags as $key => $tag) { if (!empty($tag[2])) { - $key = $tag[2]. "-" . $key; + $key = $tag[2] . "-" . $key; } $formattedTags[$key] = $tag[0] . $tag[1]; } diff --git a/CRM/Core/CodeGen/Main.php b/CRM/Core/CodeGen/Main.php index f359e76716..567c466f23 100644 --- a/CRM/Core/CodeGen/Main.php +++ b/CRM/Core/CodeGen/Main.php @@ -76,7 +76,7 @@ class CRM_Core_CodeGen_Main { unlink($this->digestPath); } - echo "\ncivicrm_domain.version := ". $this->db_version . "\n\n"; + echo "\ncivicrm_domain.version := " . $this->db_version . "\n\n"; if ($this->buildVersion < 1.1) { echo "The Database is not compatible for this version"; exit(); diff --git a/CRM/Core/CodeGen/Specification.php b/CRM/Core/CodeGen/Specification.php index 37678b34bb..b15d3208d8 100644 --- a/CRM/Core/CodeGen/Specification.php +++ b/CRM/Core/CodeGen/Specification.php @@ -19,7 +19,7 @@ class CRM_Core_CodeGen_Specification { public function parse($schemaPath, $buildVersion) { $this->buildVersion = $buildVersion; - echo "Parsing schema description ".$schemaPath."\n"; + echo "Parsing schema description " . $schemaPath . "\n"; $dbXML = CRM_Core_CodeGen_Util_Xml::parse($schemaPath); // print_r( $dbXML ); diff --git a/CRM/Core/CodeGen/Util/Template.php b/CRM/Core/CodeGen/Util/Template.php index 9924f6dcbf..1fc02d62d1 100644 --- a/CRM/Core/CodeGen/Util/Template.php +++ b/CRM/Core/CodeGen/Util/Template.php @@ -50,7 +50,7 @@ class CRM_Core_CodeGen_Util_Template { } foreach ($inputs as $infile) { // FIXME: does not beautify. Document. - file_put_contents($outpath, $this->smarty->fetch($infile) ."\n", FILE_APPEND); + file_put_contents($outpath, $this->smarty->fetch($infile) . "\n", FILE_APPEND); } } diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 6a6026699b..e34c6fa1ef 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -739,11 +739,11 @@ class CRM_Core_Error extends PEAR_ErrorStack { break; case 'string': - $args[] = '"' . CRM_Utils_String::ellipsify(addcslashes((string) $arg, "\r\n\t\""), $maxArgLen). '"'; + $args[] = '"' . CRM_Utils_String::ellipsify(addcslashes((string) $arg, "\r\n\t\""), $maxArgLen) . '"'; break; case 'array': - $args[] = '(Array:'.count($arg).')'; + $args[] = '(Array:' . count($arg) . ')'; break; case 'object': diff --git a/CRM/Core/Form/RecurringEntity.php b/CRM/Core/Form/RecurringEntity.php index d08158e21a..a8818fe0c8 100644 --- a/CRM/Core/Form/RecurringEntity.php +++ b/CRM/Core/Form/RecurringEntity.php @@ -93,7 +93,7 @@ class CRM_Core_Form_RecurringEntity { } } if ($entityTable) { - CRM_Core_OptionValue::getValues(array('name' => $entityTable.'_repeat_exclude_dates_'.self::$_parentEntityId), $optionValue); + CRM_Core_OptionValue::getValues(array('name' => $entityTable . '_repeat_exclude_dates_' . self::$_parentEntityId), $optionValue); $excludeOptionValues = array(); if (!empty($optionValue)) { foreach ($optionValue as $key => $val) { @@ -180,7 +180,7 @@ class CRM_Core_Form_RecurringEntity { $form->add('select', 'repetition_frequency_interval', ts('Repeats every:'), $numericOptions, '', array('style' => 'width:55px;')); $form->addDateTime('repetition_start_date', ts('Repetition Start Date'), FALSE, array('formatType' => 'activityDateTime')); foreach ($dayOfTheWeek as $key => $val) { - $startActionCondition[] = $form->createElement('checkbox', $key, NULL, substr($val." ", 0, 3)); + $startActionCondition[] = $form->createElement('checkbox', $key, NULL, substr($val . " ", 0, 3)); } $form->addGroup($startActionCondition, 'start_action_condition', ts('Repeats on')); $roptionTypes = array( @@ -358,7 +358,7 @@ class CRM_Core_Form_RecurringEntity { //Check if there exists any values for this option group $optionGroupIdExists = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', - $type.'_repeat_exclude_dates_'.$params['parent_entity_id'], + $type . '_repeat_exclude_dates_' . $params['parent_entity_id'], 'id', 'name' ); @@ -367,8 +367,8 @@ class CRM_Core_Form_RecurringEntity { } $optionGroupParams = array( - 'name' => $type.'_repeat_exclude_dates_'.$actionScheduleObj->entity_value, - 'title' => $type.' recursion', + 'name' => $type . '_repeat_exclude_dates_' . $actionScheduleObj->entity_value, + 'title' => $type . ' recursion', 'is_reserved' => 0, 'is_active' => 1 ); @@ -383,7 +383,7 @@ class CRM_Core_Form_RecurringEntity { 'label' => CRM_Utils_Date::processDate($val), 'value' => CRM_Utils_Date::processDate($val), 'name' => $opGroup->name, - 'description' => 'Used for recurring '.$type, + 'description' => 'Used for recurring ' . $type, 'weight' => CRM_Utils_Weight::updateOtherWeights('CRM_Core_DAO_OptionValue', $oldWeight, CRM_Utils_Array::value('weight', $params), $fieldValues), 'is_active' => 1 ); diff --git a/CRM/Core/Form/Renderer.php b/CRM/Core/Form/Renderer.php index 9422f0adf0..97107e32b2 100644 --- a/CRM/Core/Form/Renderer.php +++ b/CRM/Core/Form/Renderer.php @@ -266,7 +266,7 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty { $display[] = $val['label']; } - $el['html'] = implode('; ', $display) . ''; + $el['html'] = implode('; ', $display) . ''; } /** diff --git a/CRM/Core/Page/AJAX.php b/CRM/Core/Page/AJAX.php index cec7e7dd8a..4b3564a2fe 100644 --- a/CRM/Core/Page/AJAX.php +++ b/CRM/Core/Page/AJAX.php @@ -206,7 +206,7 @@ class CRM_Core_Page_AJAX { public static function setJsHeaders() { // Encourage browsers to cache for a long time - 1 year $year = 60 * 60 * 24 * 364; - header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $year)); + header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $year)); header('Content-Type: application/javascript'); header("Cache-Control: max-age=$year, public"); } diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index 276aa491d0..01b3769400 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -270,7 +270,7 @@ INNER JOIN civicrm_contribution co ON co.contribution_recur_id = cr.id $ids['contact'] = $contRecur->contact_id; } if (!$ids['contributionRecur']) { - CRM_Core_Error::debug_log_message("Could not find contributionRecur id: ".print_r($input, TRUE)); + CRM_Core_Error::debug_log_message("Could not find contributionRecur id: " . print_r($input, TRUE)); echo "Failure: Could not find contributionRecur

    "; exit(); } diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index 9499243306..d0b2baf462 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -92,7 +92,7 @@ class CRM_Core_Payment_BaseIPN { $contact = new CRM_Contact_BAO_Contact(); $contact->id = $ids['contact']; if (!$contact->find(TRUE)) { - CRM_Core_Error::debug_log_message("Could not find contact record: {$ids['contact']} in IPN request: ".print_r($input, TRUE)); + CRM_Core_Error::debug_log_message("Could not find contact record: {$ids['contact']} in IPN request: " . print_r($input, TRUE)); echo "Failure: Could not find contact record: {$ids['contact']}

    "; return FALSE; } @@ -101,7 +101,7 @@ class CRM_Core_Payment_BaseIPN { $contribution = new CRM_Contribute_BAO_Contribution(); $contribution->id = $ids['contribution']; if (!$contribution->find(TRUE)) { - CRM_Core_Error::debug_log_message("Could not find contribution record: {$contribution->id} in IPN request: ".print_r($input, TRUE)); + CRM_Core_Error::debug_log_message("Could not find contribution record: {$contribution->id} in IPN request: " . print_r($input, TRUE)); echo "Failure: Could not find contribution record for {$contribution->id}

    "; return FALSE; } diff --git a/CRM/Core/Payment/PaymentExpress.php b/CRM/Core/Payment/PaymentExpress.php index ffe15b8abb..22d3788994 100644 --- a/CRM/Core/Payment/PaymentExpress.php +++ b/CRM/Core/Payment/PaymentExpress.php @@ -224,7 +224,7 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment { 'MerchantReference' => $merchantRef, 'TxnData1' => $params['qfKey'], 'TxnData2' => $privateData, - 'TxnData3' => $component . ",".$this->_paymentProcessor['id'], + 'TxnData3' => $component . "," . $this->_paymentProcessor['id'], 'TxnType' => 'Purchase', // Leave this empty for now, causes an error with DPS if we populate it 'TxnId' => '', diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 21d5dcdbb1..fa8f5602ea 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -1473,7 +1473,7 @@ WHERE id = %1"; * @return array - array of all payment processor types */ public static function &paymentProcessorType($all = FALSE, $id = NULL, $return = 'title') { - $cacheKey = $id . '_' .$return; + $cacheKey = $id . '_' . $return; if (empty(self::$paymentProcessorType[$cacheKey])) { self::populate(self::$paymentProcessorType[$cacheKey], 'CRM_Financial_DAO_PaymentProcessorType', $all, $return, 'is_active', NULL, "is_default, $return", 'id'); } diff --git a/CRM/Core/Smarty/plugins/function.crmAPI.php b/CRM/Core/Smarty/plugins/function.crmAPI.php index 1177c2f482..973fec9817 100644 --- a/CRM/Core/Smarty/plugins/function.crmAPI.php +++ b/CRM/Core/Smarty/plugins/function.crmAPI.php @@ -62,7 +62,7 @@ function smarty_function_crmAPI($params, &$smarty) { } if (!empty($result['is_error'])) { - $smarty->trigger_error("{crmAPI} ".$result["error_message"]); + $smarty->trigger_error("{crmAPI} " . $result["error_message"]); } if (!array_key_exists('var', $params)) { diff --git a/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php b/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php index 79f4799a48..2415b84ce8 100644 --- a/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php +++ b/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php @@ -8,5 +8,5 @@ function smarty_prefilter_resetExtScope($tpl_source, &$smarty) { return '{crmScope extensionKey=""}' . $tpl_source - .'{/crmScope}'; + . '{/crmScope}'; } diff --git a/CRM/Custom/Import/Form/DataSource.php b/CRM/Custom/Import/Form/DataSource.php index 8668eadbd3..e883decf0a 100644 --- a/CRM/Custom/Import/Form/DataSource.php +++ b/CRM/Custom/Import/Form/DataSource.php @@ -89,7 +89,7 @@ class CRM_Custom_Import_Form_DataSource extends CRM_Core_Form { //Setting Upload File Size $config = CRM_Core_Config::singleton(); - $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE); + $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE); $uploadSize = round(($uploadFileSize / (1024 * 1024)), 2); $this->assign('uploadSize', $uploadSize); diff --git a/CRM/Custom/Import/Parser/Api.php b/CRM/Custom/Import/Parser/Api.php index 4559c7ca13..55b0dbe35f 100644 --- a/CRM/Custom/Import/Parser/Api.php +++ b/CRM/Custom/Import/Parser/Api.php @@ -157,7 +157,7 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser { CRM_Contact_Import_Parser_Contact::formatCommonData($this->_params, $formatted, $formatted); foreach ($formatted['custom'] as $key => $val) { - $this->_params['custom_'.$key] = $val[-1]['value']; + $this->_params['custom_' . $key] = $val[-1]['value']; } $this->_params['skipRecentView'] = TRUE; $this->_params['check_permissions'] = TRUE; diff --git a/CRM/Event/BAO/Query.php b/CRM/Event/BAO/Query.php index 35ab118480..c343efef6e 100644 --- a/CRM/Event/BAO/Query.php +++ b/CRM/Event/BAO/Query.php @@ -284,7 +284,7 @@ class CRM_Event_BAO_Query { } if (!empty($allEventIds)) { $op = "IN"; - $value = "(".implode(",", $allEventIds).")"; + $value = "(" . implode(",", $allEventIds) . ")"; } } $query->_where[$grouping][] = "civicrm_event.id $op {$value}"; diff --git a/CRM/Event/Cart/Form/Checkout/Payment.php b/CRM/Event/Cart/Form/Checkout/Payment.php index 00471494a4..8b9dbf8e54 100644 --- a/CRM/Event/Cart/Form/Checkout/Payment.php +++ b/CRM/Event/Cart/Form/Checkout/Payment.php @@ -360,7 +360,7 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { 'pay_later_receipt' => $this->pay_later_receipt, ), 'valueName' => 'event_registration_receipt', - 'PDFFilename' => ts('confirmation').'.pdf', + 'PDFFilename' => ts('confirmation') . '.pdf', ); $template_params_to_copy = array( 'billing_name', diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index 27e277f301..ef2cc42541 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -359,7 +359,7 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent public function buildMultipleProfileBottom(&$form, $count, $prefix = '', $label = 'Include Profile', $configs = NULL) { extract((is_null($configs)) ? self::getProfileSelectorTypes() : $configs); $element = $prefix . "custom_post_id_multiple[$count]"; - $label .= '
    '.ts('(bottom of page)'); + $label .= '
    ' . ts('(bottom of page)'); $form->addProfileSelector($element, $label, $allowCoreTypes, $allowSubTypes, $profileEntities, TRUE); } diff --git a/CRM/Event/Form/ManageEvent/Repeat.php b/CRM/Event/Form/ManageEvent/Repeat.php index 767cc0b35c..bb442f8244 100644 --- a/CRM/Event/Form/ManageEvent/Repeat.php +++ b/CRM/Event/Form/ManageEvent/Repeat.php @@ -47,7 +47,7 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { $query = " SELECT * FROM civicrm_event - WHERE id IN (".implode(",", $allEventIds).") + WHERE id IN (" . implode(",", $allEventIds) . ") ORDER BY start_date asc "; diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index b59b617799..cc714c9c89 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1655,7 +1655,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment 'valueName' => 'event_offline_receipt', 'contactId' => $contactID, 'isTest' => (bool) CRM_Utils_Array::value('is_test', $this->_defaultValues), - 'PDFFilename' => ts('confirmation').'.pdf', + 'PDFFilename' => ts('confirmation') . '.pdf', ); // try to send emails only if email id is present diff --git a/CRM/Event/Form/ParticipantFeeSelection.php b/CRM/Event/Form/ParticipantFeeSelection.php index 66e3099d64..f96fc73e89 100644 --- a/CRM/Event/Form/ParticipantFeeSelection.php +++ b/CRM/Event/Form/ParticipantFeeSelection.php @@ -136,7 +136,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form { else { foreach ($priceFieldId as $key => $value) { if (!empty($value) && ($this->_values['fee'][$value]['html_type'] == 'Radio' || $this->_values['fee'][$value]['html_type'] == 'Select') && !$this->_values['fee'][$value]['is_required']) { - $defaults[$this->_participantId]['price_'.array_keys($this->_values['fee'])[$key]] = 0; + $defaults[$this->_participantId]['price_' . array_keys($this->_values['fee'])[$key]] = 0; } } } @@ -369,7 +369,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form { 'valueName' => 'event_offline_receipt', 'contactId' => $this->_contactId, 'isTest' => FALSE, - 'PDFFilename' => ts('confirmation').'.pdf', + 'PDFFilename' => ts('confirmation') . '.pdf', ); // try to send emails only if email id is present diff --git a/CRM/Event/Import/Form/DataSource.php b/CRM/Event/Import/Form/DataSource.php index 58b2bdfe5e..da3e3f00fa 100644 --- a/CRM/Event/Import/Form/DataSource.php +++ b/CRM/Event/Import/Form/DataSource.php @@ -59,7 +59,7 @@ class CRM_Event_Import_Form_DataSource extends CRM_Core_Form { //Setting Upload File Size $config = CRM_Core_Config::singleton(); - $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE); + $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE); $uploadSize = round(($uploadFileSize / (1024 * 1024)), 2); $this->assign('uploadSize', $uploadSize); diff --git a/CRM/Financial/BAO/ExportFormat.php b/CRM/Financial/BAO/ExportFormat.php index bd8a1b8155..6d14587708 100644 --- a/CRM/Financial/BAO/ExportFormat.php +++ b/CRM/Financial/BAO/ExportFormat.php @@ -197,14 +197,14 @@ class CRM_Financial_BAO_ExportFormat { $details = '

    ' . ts('Record:') . ' ' . $values['title'] . '

    ' . ts('Description:') . '

    ' . ts('Created By:') . " $createdBy" . '

    ' . ts('Created Date:') . ' ' . $values['created_date'] . '

    ' . ts('Last Modified By:') . ' ' . $modifiedBy . '

    ' . ts('Payment Instrument:') . ' ' . $values['payment_instrument_id'] . '

    '; $subject = ''; if (!empty($values['total'])) { - $subject .= ts('Total') . '['. CRM_Utils_Money::format($values['total']) .'],'; + $subject .= ts('Total') . '[' . CRM_Utils_Money::format($values['total']) . '],'; } if (!empty($values['item_count'])) { - $subject .= ' ' . ts('Count') . '['. $values['item_count'] .'],'; + $subject .= ' ' . ts('Count') . '[' . $values['item_count'] . '],'; } //create activity. - $subject .= ' ' . ts('Batch') . '['. $values['title'] .']'; + $subject .= ' ' . ts('Batch') . '[' . $values['title'] . ']'; $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'); $activityParams = array( 'activity_type_id' => array_search('Export Accounting Batch', $activityTypes), diff --git a/CRM/Financial/BAO/ExportFormat/CSV.php b/CRM/Financial/BAO/ExportFormat/CSV.php index 69f80bf158..3959f3fcb1 100644 --- a/CRM/Financial/BAO/ExportFormat/CSV.php +++ b/CRM/Financial/BAO/ExportFormat/CSV.php @@ -134,8 +134,8 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat */ public function putFile($export) { $config = CRM_Core_Config::singleton(); - $fileName = $config->uploadDir.'Financial_Transactions_'.$this->_batchIds.'_'.date('YmdHis').'.'.$this->getFileExtension(); - $this->_downloadFile[] = $config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($fileName)); + $fileName = $config->uploadDir . 'Financial_Transactions_' . $this->_batchIds . '_' . date('YmdHis') . '.' . $this->getFileExtension(); + $this->_downloadFile[] = $config->customFileUploadDir . CRM_Utils_File::cleanFileName(basename($fileName)); $out = fopen($fileName, 'w'); fputcsv($out, $export['headers']); unset($export['headers']); diff --git a/CRM/Financial/BAO/ExportFormat/IIF.php b/CRM/Financial/BAO/ExportFormat/IIF.php index 56a8315b02..5043255088 100644 --- a/CRM/Financial/BAO/ExportFormat/IIF.php +++ b/CRM/Financial/BAO/ExportFormat/IIF.php @@ -82,8 +82,8 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat */ public function putFile($out) { $config = CRM_Core_Config::singleton(); - $fileName = $config->uploadDir.'Financial_Transactions_'.$this->_batchIds.'_'.date('YmdHis').'.'.$this->getFileExtension(); - $this->_downloadFile[] = $config->customFileUploadDir.CRM_Utils_File::cleanFileName(basename($fileName)); + $fileName = $config->uploadDir . 'Financial_Transactions_' . $this->_batchIds . '_' . date('YmdHis') . '.' . $this->getFileExtension(); + $this->_downloadFile[] = $config->customFileUploadDir . CRM_Utils_File::cleanFileName(basename($fileName)); $buffer = fopen($fileName, 'w'); fwrite($buffer, $out); fclose($buffer); @@ -263,7 +263,7 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat 'trxn_date' => $this->format($itemDAO->transaction_date, 'date'), 'spl_id' => $this->format($itemDAO->financial_item_id), 'account_name' => $this->format($itemDAO->account_name), - 'amount' => '-' .$this->format($itemDAO->amount, 'money'), + 'amount' => '-' . $this->format($itemDAO->amount, 'money'), 'contact_name' => $this->format($itemDAO->contact_name), 'payment_instrument' => $this->format($itemDAO->payment_instrument), 'description' => $this->format($itemDAO->description), diff --git a/CRM/Financial/Form/FinancialBatch.php b/CRM/Financial/Form/FinancialBatch.php index 5d75a9b3e5..02dab2fd5b 100644 --- a/CRM/Financial/Form/FinancialBatch.php +++ b/CRM/Financial/Form/FinancialBatch.php @@ -91,7 +91,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { if (isset($this->_id)) { $this->_title = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $this->_id, 'title'); - CRM_Utils_System::setTitle($this->_title .' - '.ts('Accounting Batch')); + CRM_Utils_System::setTitle($this->_title . ' - ' . ts('Accounting Batch')); $this->assign('batchTitle', $this->_title); $contactID = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $this->_id, 'created_id'); $contactName = CRM_Contact_BAO_Contact::displayName($contactID); @@ -245,7 +245,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form { //create activity. $activityParams = array( 'activity_type_id' => array_search($activityTypeName, $activityTypes), - 'subject' => $batch->title ."- Batch", + 'subject' => $batch->title . "- Batch", 'status_id' => 2, 'priority_id' => 2, 'activity_date_time' => date('YmdHis'), diff --git a/CRM/Financial/Form/FinancialTypeAccount.php b/CRM/Financial/Form/FinancialTypeAccount.php index bf22b304b0..22df3bb1c5 100644 --- a/CRM/Financial/Form/FinancialTypeAccount.php +++ b/CRM/Financial/Form/FinancialTypeAccount.php @@ -106,7 +106,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { if ($this->_id) { $financialAccount = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_EntityFinancialAccount', $this->_id, 'financial_account_id'); $fieldTitle = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialAccount', $financialAccount, 'name'); - CRM_Utils_System::setTitle($fieldTitle . ' - '. ts('Financial Type Accounts')); + CRM_Utils_System::setTitle($fieldTitle . ' - ' . ts('Financial Type Accounts')); } $breadCrumb = array( diff --git a/CRM/Financial/Page/AJAX.php b/CRM/Financial/Page/AJAX.php index 26c0f4aefa..d219cdf29a 100644 --- a/CRM/Financial/Page/AJAX.php +++ b/CRM/Financial/Page/AJAX.php @@ -368,13 +368,13 @@ class CRM_Financial_Page_AJAX { } $row[$financialItem->id][$columnKey] = $financialItem->$columnKey; if ($columnKey == 'sort_name' && $financialItem->$columnKey) { - $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=".$financialItem->contact_id); - $row[$financialItem->id][$columnKey] = ''.$financialItem->$columnKey.''; + $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=" . $financialItem->contact_id); + $row[$financialItem->id][$columnKey] = '' . $financialItem->$columnKey . ''; } elseif ($columnKey == 'payment_method' && $financialItem->$columnKey) { $row[$financialItem->id][$columnKey] = CRM_Core_OptionGroup::getLabel('payment_instrument', $financialItem->$columnKey); if ($row[$financialItem->id][$columnKey] == 'Check') { - $row[$financialItem->id][$columnKey] = $row[$financialItem->id][$columnKey].' ('.$financialItem->check_number.')'; + $row[$financialItem->id][$columnKey] = $row[$financialItem->id][$columnKey] . ' (' . $financialItem->check_number . ')'; } } elseif ($columnKey == 'amount' && $financialItem->$columnKey) { @@ -390,7 +390,7 @@ class CRM_Financial_Page_AJAX { if ($statusID == CRM_Core_OptionGroup::getValue('batch_status', 'Open')) { if (isset($notPresent)) { $js = "enableActions('x')"; - $row[$financialItem->id]['check'] = ""; + $row[$financialItem->id]['check'] = ""; $row[$financialItem->id]['action'] = CRM_Core_Action::formLink( CRM_Financial_Form_BatchTransaction::links(), NULL, @@ -408,7 +408,7 @@ class CRM_Financial_Page_AJAX { } else { $js = "enableActions('y')"; - $row[$financialItem->id]['check'] = ""; + $row[$financialItem->id]['check'] = ""; $row[$financialItem->id]['action'] = CRM_Core_Action::formLink( CRM_Financial_Page_BatchTransaction::links(), NULL, diff --git a/CRM/Financial/Page/FinancialTypeAccount.php b/CRM/Financial/Page/FinancialTypeAccount.php index cd58c099ee..d7f9b29bde 100644 --- a/CRM/Financial/Page/FinancialTypeAccount.php +++ b/CRM/Financial/Page/FinancialTypeAccount.php @@ -134,7 +134,7 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page { if ($this->_aid) { $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' ")); $this->_title = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $this->_aid, 'name'); - CRM_Utils_System::setTitle($this->_title .' - '.ts('Assigned Financial Accounts')); + CRM_Utils_System::setTitle($this->_title . ' - ' . ts('Assigned Financial Accounts')); $financialAccountType = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialAccount', 'financial_account_type_id'); $accountRelationship = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship'); $dao->copyValues($params); diff --git a/CRM/Import/DataSource/CSV.php b/CRM/Import/DataSource/CSV.php index 854a26891c..52d5e26e58 100644 --- a/CRM/Import/DataSource/CSV.php +++ b/CRM/Import/DataSource/CSV.php @@ -68,7 +68,7 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource { $config = CRM_Core_Config::singleton(); - $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE); + $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE); $uploadSize = round(($uploadFileSize / (1024 * 1024)), 2); $form->assign('uploadSize', $uploadSize); $form->add('File', 'uploadFile', ts('Import Data File'), 'size=30 maxlength=255', TRUE); diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 1e0f2afe9b..48aa7e62f9 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -2955,9 +2955,9 @@ AND m.id = %1 "reset=1&cid={$values['creator_id']}"); //CRM-12814 - $contactMailings[$mailingId]['openstats'] = "Opens: ". - CRM_Utils_Array::value($values['mailing_id'], $openCounts, 0). - "
    Clicks: ". + $contactMailings[$mailingId]['openstats'] = "Opens: " . + CRM_Utils_Array::value($values['mailing_id'], $openCounts, 0) . + "
    Clicks: " . CRM_Utils_Array::value($values['mailing_id'], $clickCounts, 0); $actionLinks = array( diff --git a/CRM/Mailing/BAO/Query.php b/CRM/Mailing/BAO/Query.php index d7bd9f489a..fe17e97464 100644 --- a/CRM/Mailing/BAO/Query.php +++ b/CRM/Mailing/BAO/Query.php @@ -467,7 +467,7 @@ class CRM_Mailing_BAO_Query { if (is_array($value)) { $query->_where[$grouping][] = "$tableName.$fieldName $op (" . implode(',', $value) . ")"; - $query->_qill[$grouping][] = "$fieldTitle $op ". implode(', ', array_intersect_key($valueTitles, array_flip($value))); + $query->_qill[$grouping][] = "$fieldTitle $op " . implode(', ', array_intersect_key($valueTitles, array_flip($value))); } else { $query->_qill[$grouping][] = $fieldTitle . ' - ' . $valueTitles[$value]; diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 7a6eb5d91c..054e10836b 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1856,7 +1856,7 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; 'from' => $receiptFrom, 'toName' => $form->_contributorDisplayName, 'toEmail' => $form->_contributorEmail, - 'PDFFilename' => ts('receipt').'.pdf', + 'PDFFilename' => ts('receipt') . '.pdf', 'isEmailPdf' => $isEmailPdf, 'contributionId' => $formValues['contribution_id'], 'isTest' => (bool) ($form->_action & CRM_Core_Action::PREVIEW) diff --git a/CRM/Member/Form/MembershipBlock.php b/CRM/Member/Form/MembershipBlock.php index 5291faa142..a522f76b75 100644 --- a/CRM/Member/Form/MembershipBlock.php +++ b/CRM/Member/Form/MembershipBlock.php @@ -93,7 +93,7 @@ class CRM_Member_Form_MembershipBlock extends CRM_Contribute_Form_ContributionPa foreach ($options as $k => $v) { $newMembershipType[$v['membership_type_id']] = 1; if (!empty($defaults['auto_renew'])) { - $defaults["auto_renew_".$v['membership_type_id']] = $defaults['auto_renew'][$v['membership_type_id']]; + $defaults["auto_renew_" . $v['membership_type_id']] = $defaults['auto_renew'][$v['membership_type_id']]; } } $defaults['membership_type'] = $newMembershipType; diff --git a/CRM/Member/Import/Form/DataSource.php b/CRM/Member/Import/Form/DataSource.php index e30f0225fa..08203a2f9a 100644 --- a/CRM/Member/Import/Form/DataSource.php +++ b/CRM/Member/Import/Form/DataSource.php @@ -59,7 +59,7 @@ class CRM_Member_Import_Form_DataSource extends CRM_Core_Form { //Setting Upload File Size $config = CRM_Core_Config::singleton(); - $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m', TRUE); + $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize . 'm', TRUE); $uploadSize = round(($uploadFileSize / (1024 * 1024)), 2); $this->assign('uploadSize', $uploadSize); diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 8730182b90..6976f7a7f6 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -384,7 +384,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { } else { $opt['label'] = '' . $opt['label'] . '' . '' . CRM_Utils_Money::format($opt[$valueFieldName]) . ''; - $opt['label'] .= ' + '. CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . ''; + $opt['label'] .= ' + ' . CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . ''; } } else { @@ -536,7 +536,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { ); if ($is_pay_later) { $txtcheck[$opId] =& $qf->createElement('text', $opId, $opt['label'], array('size' => '4')); - $qf->addGroup($txtcheck, 'txt-'.$elementName, $label); + $qf->addGroup($txtcheck, 'txt-' . $elementName, $label); } // CRM-6902 - Add "max" option for a price set field if (in_array($opId, $freezeOptions)) { @@ -794,7 +794,7 @@ WHERE id IN (" . implode(',', array_keys($priceFields)) . ')'; } else { $label = CRM_Utils_Money::format($opt[$valueFieldName]); - $label .= ' + '. CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . ''; + $label .= ' + ' . CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . ''; } return $label; diff --git a/CRM/Price/Form/Field.php b/CRM/Price/Form/Field.php index 5ba917df3c..c9286ec92d 100644 --- a/CRM/Price/Form/Field.php +++ b/CRM/Price/Form/Field.php @@ -269,7 +269,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form { //Financial Type $this->add( 'select', - 'option_financial_type_id['.$i.']', + 'option_financial_type_id[' . $i . ']', ts('Financial Type'), array('' => ts('- select -')) + $financialType ); diff --git a/CRM/Profile/Page/MultipleRecordFieldsListing.php b/CRM/Profile/Page/MultipleRecordFieldsListing.php index 00ad9c2876..fda8627877 100644 --- a/CRM/Profile/Page/MultipleRecordFieldsListing.php +++ b/CRM/Profile/Page/MultipleRecordFieldsListing.php @@ -365,7 +365,7 @@ class CRM_Profile_Page_MultipleRecordFieldsListing extends CRM_Core_Page_Basic { 'key' => CRM_Core_Key::get('civicrm/ajax/customvalue'), ); $links[CRM_Core_Action::DELETE]['url'] = '#'; - $links[CRM_Core_Action::DELETE]['extra'] = ' data-delete_params="'. htmlspecialchars(json_encode($deleteData)) .'"'; + $links[CRM_Core_Action::DELETE]['extra'] = ' data-delete_params="' . htmlspecialchars(json_encode($deleteData)) . '"'; $links[CRM_Core_Action::DELETE]['class'] = 'delete-custom-row'; } if (!empty($pageCheckSum)) { diff --git a/CRM/Report/Form/Contact/LoggingSummary.php b/CRM/Report/Form/Contact/LoggingSummary.php index 607bda814e..415471ae78 100644 --- a/CRM/Report/Form/Contact/LoggingSummary.php +++ b/CRM/Report/Form/Contact/LoggingSummary.php @@ -205,13 +205,13 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary { $date = CRM_Utils_Date::isoToMysql($row['log_civicrm_entity_log_date']); if ('Update' == CRM_Utils_Array::value('log_civicrm_entity_log_action', $row)) { - $q = "reset=1&log_conn_id={$row['log_civicrm_entity_log_conn_id']}&log_date=". $date; + $q = "reset=1&log_conn_id={$row['log_civicrm_entity_log_conn_id']}&log_date=" . $date; if ($this->cid) { $q .= '&cid=' . $this->cid; } - $q .= (!empty($row['log_civicrm_entity_altered_contact'])) ? '&alteredName='.$row['log_civicrm_entity_altered_contact'] : ''; - $q .= (!empty($row['altered_by_contact_display_name'])) ? '&alteredBy='.$row['altered_by_contact_display_name'] : ''; - $q .= (!empty($row['log_civicrm_entity_log_user_id'])) ? '&alteredById='.$row['log_civicrm_entity_log_user_id'] : ''; + $q .= (!empty($row['log_civicrm_entity_altered_contact'])) ? '&alteredName=' . $row['log_civicrm_entity_altered_contact'] : ''; + $q .= (!empty($row['altered_by_contact_display_name'])) ? '&alteredBy=' . $row['altered_by_contact_display_name'] : ''; + $q .= (!empty($row['log_civicrm_entity_log_user_id'])) ? '&alteredById=' . $row['log_civicrm_entity_log_user_id'] : ''; $url1 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}&snippet=4§ion=2&layout=overlay", FALSE, TRUE); $url2 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}§ion=2", FALSE, TRUE); diff --git a/CRM/Upgrade/Incremental/php/FourFour.php b/CRM/Upgrade/Incremental/php/FourFour.php index 7746f1bbcf..b6129522a0 100644 --- a/CRM/Upgrade/Incremental/php/FourFour.php +++ b/CRM/Upgrade/Incremental/php/FourFour.php @@ -106,7 +106,7 @@ WHERE ceft.entity_table = 'civicrm_contribution' AND cft.payment_instrument_id I } } if ($rev == '4.4.6') { - $postUpgradeMessage .= '

    '. ts('Your contact image urls have been upgraded. If your contact image urls did not follow the standard format for image Urls they have not been upgraded. Please check the log to see image urls that were not upgraded.'); + $postUpgradeMessage .= '

    ' . ts('Your contact image urls have been upgraded. If your contact image urls did not follow the standard format for image Urls they have not been upgraded. Please check the log to see image urls that were not upgraded.'); } } @@ -311,7 +311,7 @@ ALTER TABLE civicrm_dashboard } elseif ($urlElements[1] == 'report') { $url = explode('&', $urlElements[3]); - $name = 'report/' .$url[0]; + $name = 'report/' . $url[0]; } $values .= " WHEN {$dashboard->id} THEN '{$name}' @@ -336,7 +336,7 @@ ALTER TABLE civicrm_dashboard * @param $rev */ public function upgrade_4_4_6($rev) { - $sql = "SELECT count(*) AS count FROM INFORMATION_SCHEMA.STATISTICS where ". + $sql = "SELECT count(*) AS count FROM INFORMATION_SCHEMA.STATISTICS where " . "TABLE_SCHEMA = database() AND INDEX_NAME = 'index_image_url' AND TABLE_NAME = 'civicrm_contact';"; $dao = CRM_Core_DAO::executeQuery($sql); $dao->fetch(); @@ -386,12 +386,12 @@ ALTER TABLE civicrm_dashboard if (substr($imageURL, 0, $baselen) == $baseurl) { $photo = basename($dao->image_url); $config = CRM_Core_Config::singleton(); - $fullpath = $config->customFileUploadDir.$photo; + $fullpath = $config->customFileUploadDir . $photo; if (file_exists($fullpath)) { // For anyone who upgraded 4.4.6 release (eg 4.4.0=>4.4.6), the $newImageUrl incorrectly used backend URLs. // For anyone who skipped 4.4.6 (eg 4.4.0=>4.4.7), the $newImageUrl correctly uses frontend URLs self::setContactImageUrl($dao->id, - CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$photo, TRUE, NULL, TRUE, TRUE)); + CRM_Utils_System::url('civicrm/contact/imagefile', 'photo=' . $photo, TRUE, NULL, TRUE, TRUE)); } else{ $failures[$dao->id] = $dao->image_url; @@ -470,7 +470,7 @@ ALTER TABLE civicrm_dashboard $imageUrlParts = parse_url($imageUrl); parse_str($imageUrlParts['query'], $imageUrlQuery); self::setContactImageUrl($dao->id, - CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$imageUrlQuery['photo'], TRUE, NULL, TRUE, TRUE)); + CRM_Utils_System::url('civicrm/contact/imagefile', 'photo=' . $imageUrlQuery['photo'], TRUE, NULL, TRUE, TRUE)); } } return TRUE; diff --git a/CRM/Upgrade/Incremental/php/FourThree.php b/CRM/Upgrade/Incremental/php/FourThree.php index c0d63cbe38..e6f15176bc 100644 --- a/CRM/Upgrade/Incremental/php/FourThree.php +++ b/CRM/Upgrade/Incremental/php/FourThree.php @@ -166,7 +166,7 @@ WHERE entity_value = '' OR entity_value IS NULL } if (!empty($reminder)) { $list = "
      " . $list . "
    "; - $postUpgradeMessage .= '
    ' .ts("Scheduled Reminders must be linked to one or more 'entities' (Events, Event Templates, Activity Types, Membership Types). The following reminders are not configured properly and will not be run. Please review them and update or delete them: %1", array(1 => $list)); + $postUpgradeMessage .= '
    ' . ts("Scheduled Reminders must be linked to one or more 'entities' (Events, Event Templates, Activity Types, Membership Types). The following reminders are not configured properly and will not be run. Please review them and update or delete them: %1", array(1 => $list)); } } if ($rev == '4.3.beta2') { @@ -1111,7 +1111,7 @@ cfi.financial_account_id = %4, cfi.description = %5, cli.financial_type_id = %6 WHERE cfi.entity_table = 'civicrm_line_item' -AND cli.entity_table = 'civicrm_contribution' AND cli.id IN (" . implode(',', $value). ');'; +AND cli.entity_table = 'civicrm_contribution' AND cli.id IN (" . implode(',', $value) . ');'; $params = array( 1 => array($financialTrxn[$key]['label'], 'String'), 2 => array($financialTrxn[$key]['price_field_id'], 'Integer'), diff --git a/CRM/Upgrade/Incremental/php/FourTwo.php b/CRM/Upgrade/Incremental/php/FourTwo.php index ec4141b05b..ec5f51bec0 100644 --- a/CRM/Upgrade/Incremental/php/FourTwo.php +++ b/CRM/Upgrade/Incremental/php/FourTwo.php @@ -130,7 +130,7 @@ INNER JOIN civicrm_price_field cpf ON cpf.id = cpfv.price_field_id and cpf.id != INNER JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id AND cps.name <>'default_membership_type_amount' "; $dao = CRM_Core_DAO::executeQuery($query); if ($dao->N) { - $preUpgradeMessage .= "
    ". ts('We have identified extraneous data in your database that a previous upgrade likely introduced. We STRONGLY recommend making a backup of your site before continuing. We also STRONGLY suggest fixing this issue with unneeded records BEFORE you upgrade. You can find more information about this issue and the way to fix it by visiting http://forum.civicrm.org/index.php/topic,26181.0.html.') .""; + $preUpgradeMessage .= "
    " . ts('We have identified extraneous data in your database that a previous upgrade likely introduced. We STRONGLY recommend making a backup of your site before continuing. We also STRONGLY suggest fixing this issue with unneeded records BEFORE you upgrade. You can find more information about this issue and the way to fix it by visiting http://forum.civicrm.org/index.php/topic,26181.0.html.') . ""; } } diff --git a/CRM/Utils/Cache/SerializeCache.php b/CRM/Utils/Cache/SerializeCache.php index 086c9e7f02..f00e3c8a8f 100644 --- a/CRM/Utils/Cache/SerializeCache.php +++ b/CRM/Utils/Cache/SerializeCache.php @@ -54,9 +54,9 @@ class CRM_Utils_Cache_SerializeCache implements CRM_Utils_Cache_Interface { */ public function fileName ($key) { if (strlen($key) > 50) { - return CIVICRM_TEMPLATE_COMPILEDIR ."CRM_".md5($key).".php"; + return CIVICRM_TEMPLATE_COMPILEDIR . "CRM_" . md5($key) . ".php"; } - return CIVICRM_TEMPLATE_COMPILEDIR .$key.".php"; + return CIVICRM_TEMPLATE_COMPILEDIR . $key . ".php"; } /** @@ -85,7 +85,7 @@ class CRM_Utils_Cache_SerializeCache implements CRM_Utils_Cache_Interface { return; } $this->_cache[$key] = $value; - file_put_contents($this->fileName($key), "fileName($key), "name); } catch(Exception$e) { - $message = ts('Could not connect to MailStore for ') . $dao->username . '@' . $dao->server .'

    '; + $message = ts('Could not connect to MailStore for ') . $dao->username . '@' . $dao->server . '

    '; $message .= ts('Error message: '); $message .= '

    ' . $e->getMessage() . '

    '; CRM_Core_Error::fatal($message); diff --git a/CRM/Utils/PDF/Utils.php b/CRM/Utils/PDF/Utils.php index 59ec9c5295..0f5ac5b1da 100644 --- a/CRM/Utils/PDF/Utils.php +++ b/CRM/Utils/PDF/Utils.php @@ -164,7 +164,7 @@ class CRM_Utils_PDF_Utils { // close and output the PDF $pdf->Close(); - $pdf_file = 'CiviLetter'.'.pdf'; + $pdf_file = 'CiviLetter' . '.pdf'; $pdf->Output($pdf_file, 'D'); CRM_Utils_System::civiExit(1); } diff --git a/CRM/Utils/REST.php b/CRM/Utils/REST.php index 546ad41986..a499f62e01 100644 --- a/CRM/Utils/REST.php +++ b/CRM/Utils/REST.php @@ -480,7 +480,7 @@ class CRM_Utils_REST { $entity = _civicrm_api_get_camel_name($request[2]); $tplfile = _civicrm_api_get_camel_name($request[3]); - $tpl = 'CRM/'.$entity.'/Page/Inline/'.$tplfile.'.tpl'; + $tpl = 'CRM/' . $entity . '/Page/Inline/' . $tplfile . '.tpl'; $smarty = CRM_Core_Smarty::singleton(); CRM_Utils_System::setTitle("$entity::$tplfile inline $tpl"); if (!$smarty->template_exists($tpl)) { diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index 8b031fede1..0379bf0eac 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -711,10 +711,10 @@ class CRM_Utils_String { $offset = floor(($len - $maskCount) / 2); $masked = substr($user, 0, $offset) - .str_repeat($maskChar, $maskCount) - .substr($user, $maskCount + $offset); + . str_repeat($maskChar, $maskCount) + . substr($user, $maskCount + $offset); - return ($masked.'@'.$domain); + return ($masked . '@' . $domain); } /** diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index a96fff7e29..1e1691a783 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -785,7 +785,7 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { //CRM-14872 append destination if (!empty($destination)) { - $loginURL .= '&return='.urlencode(base64_encode($destination)); + $loginURL .= '&return=' . urlencode(base64_encode($destination)); } return $loginURL; } @@ -818,7 +818,7 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { $destination = NULL; if ($args) { // append destination so user is returned to form they came from after login - $args = 'reset=1'.$args; + $args = 'reset=1' . $args; $destination = CRM_Utils_System::url(CRM_Utils_System::currentPath(), $args, TRUE, NULL, TRUE, TRUE); } diff --git a/api/v3/Contact.php b/api/v3/Contact.php index d960023fcc..281897beb8 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -362,7 +362,7 @@ function _civicrm_api3_contact_check_params(&$params, $dupeCheck = TRUE, $dupeEr $ids = CRM_Dedupe_Finder::dupesByParams($dedupeParams, $params['contact_type'], 'Unsupervised', array()); if (count($ids) > 0) { - throw new API_Exception("Found matching contacts: ". implode(',', $ids), "duplicate", array("ids" => $ids)); + throw new API_Exception("Found matching contacts: " . implode(',', $ids), "duplicate", array("ids" => $ids)); } } diff --git a/api/v3/Generic/Setvalue.php b/api/v3/Generic/Setvalue.php index f7545a1287..7e6c705a66 100644 --- a/api/v3/Generic/Setvalue.php +++ b/api/v3/Generic/Setvalue.php @@ -83,7 +83,7 @@ function civicrm_api3_generic_setValue($apiRequest) { break; default: - return civicrm_api3_create_error("Param '$field' is of a type not managed yet (".$def['type']."). Join the API team and help us implement it", array('error_code' => 'NOT_IMPLEMENTED')); + return civicrm_api3_create_error("Param '$field' is of a type not managed yet (" . $def['type'] . "). Join the API team and help us implement it", array('error_code' => 'NOT_IMPLEMENTED')); } $dao_name = _civicrm_api3_get_DAO($entity); diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 2ff39b940d..a3df2cb68b 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -457,16 +457,16 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) { } if (!empty($result['api.email.get.1']['count'])) { - $values['billing-email'. '-' . $locationTypeID] = $result['api.email.get.1']['values'][0]['email']; + $values['billing-email' . '-' . $locationTypeID] = $result['api.email.get.1']['values'][0]['email']; } elseif(!empty($result['api.email.get.2']['count'])) { - $values['billing-email'. '-' . $locationTypeID] = $result['api.email.get.2']['values'][0]['email']; + $values['billing-email' . '-' . $locationTypeID] = $result['api.email.get.2']['values'][0]['email']; } else{ - $values['billing-email'. '-' . $locationTypeID] = $result['email']; + $values['billing-email' . '-' . $locationTypeID] = $result['email']; } // return both variants of email to reflect inconsistencies in form layer - $values['email'. '-' . $locationTypeID] = $values['billing-email'. '-' . $locationTypeID]; + $values['email' . '-' . $locationTypeID] = $values['billing-email' . '-' . $locationTypeID]; return $values; } diff --git a/api/v3/utils.php b/api/v3/utils.php index aa19df80ae..b16b49cb07 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -780,7 +780,7 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $ $legacyreturnProperties[substr($n, 7)] = $v; } elseif ($n == 'id') { - $inputParams[$entity. '_id'] = $v; + $inputParams[$entity . '_id'] = $v; } elseif (in_array($n, $otherVars)) { } diff --git a/tests/phpunit/CRM/Contact/BAO/ContactType/ContactSearchTest.php b/tests/phpunit/CRM/Contact/BAO/ContactType/ContactSearchTest.php index c232424923..603e07c416 100644 --- a/tests/phpunit/CRM/Contact/BAO/ContactType/ContactSearchTest.php +++ b/tests/phpunit/CRM/Contact/BAO/ContactType/ContactSearchTest.php @@ -9,7 +9,7 @@ class CRM_Contact_BAO_ContactType_ContactSearchTest extends CiviUnitTestCase { public function setUp() { parent::setUp(); - $students = 'indivi_student'.substr(sha1(rand()), 0, 7); + $students = 'indivi_student' . substr(sha1(rand()), 0, 7); $params = array( 'label' => $students, 'name' => $students, @@ -20,7 +20,7 @@ class CRM_Contact_BAO_ContactType_ContactSearchTest extends CiviUnitTestCase { $result = CRM_Contact_BAO_ContactType::add($params); $this->student = $params['name']; - $parents = 'indivi_parent'.substr(sha1(rand()), 0, 7); + $parents = 'indivi_parent' . substr(sha1(rand()), 0, 7); $params = array( 'label' => $parents, 'name' => $parents, @@ -31,7 +31,7 @@ class CRM_Contact_BAO_ContactType_ContactSearchTest extends CiviUnitTestCase { $result = CRM_Contact_BAO_ContactType::add($params); $this->parent = $params['name']; - $orgs = 'org_sponsor'.substr(sha1(rand()), 0, 7); + $orgs = 'org_sponsor' . substr(sha1(rand()), 0, 7); $params = array( 'label' => $orgs, 'name' => $orgs, diff --git a/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTypeTest.php b/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTypeTest.php index 12d25544e2..c1c649aea6 100644 --- a/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTypeTest.php +++ b/tests/phpunit/CRM/Contact/BAO/ContactType/ContactTypeTest.php @@ -8,7 +8,7 @@ class CRM_Contact_BAO_ContactType_ContactTypeTest extends CiviUnitTestCase { public function setUp() { parent::setUp(); - $labelsub1 = 'sub1_individual'.substr(sha1(rand()), 0, 7); + $labelsub1 = 'sub1_individual' . substr(sha1(rand()), 0, 7); $params = array( 'label' => $labelsub1, 'name' => $labelsub1, @@ -19,7 +19,7 @@ class CRM_Contact_BAO_ContactType_ContactTypeTest extends CiviUnitTestCase { $result = CRM_Contact_BAO_ContactType::add($params); $this->subTypesIndividual[] = $params['name']; - $labelsub2 = 'sub2_individual'.substr(sha1(rand()), 0, 7); + $labelsub2 = 'sub2_individual' . substr(sha1(rand()), 0, 7); $params = array( 'label' => $labelsub2, 'name' => $labelsub2, @@ -30,7 +30,7 @@ class CRM_Contact_BAO_ContactType_ContactTypeTest extends CiviUnitTestCase { $result = CRM_Contact_BAO_ContactType::add($params); $this->subTypesIndividual[] = $params['name']; - $labelsub = 'sub_organization'.substr(sha1(rand()), 0, 7); + $labelsub = 'sub_organization' . substr(sha1(rand()), 0, 7); $params = array( 'label' => $labelsub, 'name' => $labelsub, @@ -41,7 +41,7 @@ class CRM_Contact_BAO_ContactType_ContactTypeTest extends CiviUnitTestCase { $result = CRM_Contact_BAO_ContactType::add($params); $this->subTypesOrganization[] = $params['name']; - $labelhousehold = 'sub_household'.substr(sha1(rand()), 0, 7); + $labelhousehold = 'sub_household' . substr(sha1(rand()), 0, 7); $params = array( 'label' => $labelhousehold, 'name' => $labelhousehold, diff --git a/tests/phpunit/CRM/Core/ErrorTest.php b/tests/phpunit/CRM/Core/ErrorTest.php index d13c267983..4314a47348 100644 --- a/tests/phpunit/CRM/Core/ErrorTest.php +++ b/tests/phpunit/CRM/Core/ErrorTest.php @@ -87,8 +87,8 @@ class CRM_Core_ErrorTest extends CiviUnitTestCase { */ public function assertLogRegexp($pattern) { $config = CRM_Core_Config::singleton(); - $logFiles = glob($config->configAndLogDir.'/CiviCRM*.log'); - $this->assertEquals(1, count($logFiles), 'Expect to find 1 file matching: ' . $config->configAndLogDir.'/CiviCRM*log*/'); + $logFiles = glob($config->configAndLogDir . '/CiviCRM*.log'); + $this->assertEquals(1, count($logFiles), 'Expect to find 1 file matching: ' . $config->configAndLogDir . '/CiviCRM*log*/'); foreach ($logFiles as $logFile) { $this->assertRegexp($pattern, file_get_contents($logFile)); } diff --git a/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php b/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php index 4b9555d653..79fc643132 100644 --- a/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php @@ -305,7 +305,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase { 'mc_gross' => '15.00', 'payment_date' => '03:59:05 Jul 14, 2013 PDT', 'rp_invoice_id' => 'i=' . $this->_invoiceID - .'&m=contribute&c=' + . '&m=contribute&c=' . $this->_contactID . '&r=' . $this->_contributionRecurID . '&b=' . $this->_contributionID . '&p=' . $this->_contributionPageID, diff --git a/tests/phpunit/CRM/Extension/BrowserTest.php b/tests/phpunit/CRM/Extension/BrowserTest.php index dc600fa133..eae44d0c5a 100644 --- a/tests/phpunit/CRM/Extension/BrowserTest.php +++ b/tests/phpunit/CRM/Extension/BrowserTest.php @@ -22,21 +22,21 @@ class CRM_Extension_BrowserTest extends CiviUnitTestCase { } public function testCheckRequirements_BadCachedir_false() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', FALSE); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', FALSE); $this->assertEquals(TRUE, $browser->isEnabled()); $reqs = $browser->checkRequirements(); $this->assertEquals(1, count($reqs)); } public function testCheckRequirements_BadCachedir_nonexistent() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', '/tot/all/yin/v/alid'); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', '/tot/all/yin/v/alid'); $this->assertEquals(TRUE, $browser->isEnabled()); $reqs = $browser->checkRequirements(); $this->assertEquals(1, count($reqs)); } public function testGetExtensions_good() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); $this->assertEquals(TRUE, $browser->isEnabled()); $this->assertEquals(array(), $browser->checkRequirements()); $exts = $browser->getExtensions(); @@ -50,7 +50,7 @@ class CRM_Extension_BrowserTest extends CiviUnitTestCase { } public function testGetExtension_good() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); $this->assertEquals(TRUE, $browser->isEnabled()); $this->assertEquals(array(), $browser->checkRequirements()); @@ -60,7 +60,7 @@ class CRM_Extension_BrowserTest extends CiviUnitTestCase { } public function testGetExtension_nonexistent() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) .'/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); $this->assertEquals(TRUE, $browser->isEnabled()); $this->assertEquals(array(), $browser->checkRequirements()); diff --git a/tests/phpunit/CRM/Extension/ManagerTest.php b/tests/phpunit/CRM/Extension/ManagerTest.php index 51b327e312..00070ee907 100644 --- a/tests/phpunit/CRM/Extension/ManagerTest.php +++ b/tests/phpunit/CRM/Extension/ManagerTest.php @@ -415,10 +415,10 @@ class CRM_Extension_ManagerTest extends CiviUnitTestCase { $basedir = $this->createTempDir('ext-'); mkdir("$basedir/weird"); mkdir("$basedir/weird/foobar"); - file_put_contents("$basedir/weird/foobar/info.xml", "oddball"); + file_put_contents("$basedir/weird/foobar/info.xml", "oddball"); // not needed for now // file_put_contents("$basedir/weird/bar/oddball.php", "oddball"); + file_put_contents("$basedir/weird/whizbang/info.xml", "oddball"); // not needed for now // file_put_contents("$basedir/weird/whizbang/oddball.php", "createTempDir('ext-dl-'); - file_put_contents("$basedir/info.xml", "$file"); + file_put_contents("$basedir/info.xml", "$file"); file_put_contents("$basedir/$file.php", " 'Donations'.substr(sha1(rand()), 0, 7), + 'name' => 'Donations' . substr(sha1(rand()), 0, 7), 'is_deductible' => 0, 'is_active' => 1, ); diff --git a/tests/phpunit/CiviTest/CiviReportTestCase.php b/tests/phpunit/CiviTest/CiviReportTestCase.php index aa2187202f..14faf22118 100644 --- a/tests/phpunit/CiviTest/CiviReportTestCase.php +++ b/tests/phpunit/CiviTest/CiviReportTestCase.php @@ -146,7 +146,7 @@ class CiviReportTestCase extends CiviUnitTestCase { $this->assertEquals( count($actualCsvArray[$intKey]), count($expectedCsvArray[$intKey]), - 'Arrays have different number of columns at row ' . $intKey . '; in line ' . __LINE__. '; data: ' . $rowData + 'Arrays have different number of columns at row ' . $intKey . '; in line ' . __LINE__ . '; data: ' . $rowData ); $this->assertEquals($expectedCsvArray[$intKey], $strVal); } diff --git a/tests/phpunit/WebTest/Activity/ContactContextAddTest.php b/tests/phpunit/WebTest/Activity/ContactContextAddTest.php index 5b3a33ad4d..e7238d6e83 100644 --- a/tests/phpunit/WebTest/Activity/ContactContextAddTest.php +++ b/tests/phpunit/WebTest/Activity/ContactContextAddTest.php @@ -221,7 +221,7 @@ class WebTest_Activity_ContactContextAddTest extends CiviSeleniumTestCase { $this->clickLink('_qf_Search_refresh'); - $targetContacts = array("Summerson, ". $firstName1, "Andersonnn, ". $firstName2, "Anderson, ". $firstName3); + $targetContacts = array("Summerson, " . $firstName1, "Andersonnn, " . $firstName2, "Anderson, " . $firstName3); //check whether separate activities are created for the target contacts foreach ($targetContacts as $contact) { diff --git a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php index fd07cfc3d7..6133c2f106 100644 --- a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php +++ b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php @@ -299,17 +299,17 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { $this->waitForElementPresent('_qf_CaseView_cancel-bottom'); $id = $this->urlArg('id'); - $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody/tr[1]/td[2]"); + $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]"); - $this->click("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody/tr[1]/td[2]//a[text()='{$subject}']"); + $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]//a[text()='{$subject}']"); $this->waitForElementPresent('ActivityView'); $this->waitForElementPresent("css=table#crm-activity-view-table tr.crm-case-activityview-form-block-groupTitle"); $this->assertElementContainsText('crm-activity-view-table', "$textField"); $this->click("xpath=//span[@class='ui-button-icon-primary ui-icon ui-icon-closethick']"); - $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody/tr[1]/td[2]"); + $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]"); - $this->click("xpath=//div[@id='activities']//table[@id='case_id_".$id."']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/a[text()='Scheduled']"); + $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/a[text()='Scheduled']"); $this->waitForElementPresent("xpath=//html/body/div[7]"); $this->waitForElementPresent('activity_change_status'); @@ -321,8 +321,8 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { $this->click("xpath=//table[@class='caseSelector']/tbody//tr/td[2]/a[text()='{$contactName}']/../../td[9]/span/a[text()='Manage']"); $this->waitForElementPresent('_qf_CaseView_cancel-bottom'); $id2 = $this->urlArg('id'); - $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_".$id2."']/tbody/tr[1]/td[2]"); - $this->click("xpath=//div[@id='activities']//table[@id='case_id_".$id2."']//a[text()='{$subject}']"); + $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id2 . "']/tbody/tr[1]/td[2]"); + $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id2 . "']//a[text()='{$subject}']"); $this->waitForElementPresent('ActivityView'); $this->waitForElementPresent("css=table#crm-activity-view-table tr.crm-case-activityview-form-block-groupTitle"); } diff --git a/tests/phpunit/WebTest/Case/AddCaseTypeTest.php b/tests/phpunit/WebTest/Case/AddCaseTypeTest.php index 49083679eb..ca1f891b95 100644 --- a/tests/phpunit/WebTest/Case/AddCaseTypeTest.php +++ b/tests/phpunit/WebTest/Case/AddCaseTypeTest.php @@ -54,7 +54,7 @@ class WebTest_Case_AddCaseTypeTest extends CiviSeleniumTestCase { $this->openCiviPage('a/#/caseType/new'); - $caseTypeLabel = "Case Type". substr(sha1(rand()), 0, 7); + $caseTypeLabel = "Case Type" . substr(sha1(rand()), 0, 7); $this->waitForElementPresent('title'); $this->type('title', $caseTypeLabel); @@ -123,7 +123,7 @@ class WebTest_Case_AddCaseTypeTest extends CiviSeleniumTestCase { $this->click("xpath=//table/tbody//tr/td[1][text()='{$caseTypeLabel}']/../td[5]/span/a[text()='Edit']"); $this->waitForElementPresent("xpath=//div[@class='crm-submit-buttons']/span/input[@value='Save']"); - $editCaseTypeLabel = "Case Type Edit". substr(sha1(rand()), 0, 7); + $editCaseTypeLabel = "Case Type Edit" . substr(sha1(rand()), 0, 7); $this->waitForElementPresent('title'); $this->type('title', $editCaseTypeLabel); diff --git a/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php b/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php index c5cbb4101e..f3dcadacdc 100644 --- a/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php +++ b/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php @@ -137,7 +137,7 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes $this->click("_qf_AddToGroup_next-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->waitForText('crm-notification-container', "Added Contacts to ".$groupName); + $this->waitForText('crm-notification-container', "Added Contacts to " . $groupName); $this->waitForText('crm-notification-container', '2 contacts added to group'); $this->_testSearchResult($relType); } @@ -311,14 +311,14 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes $Ndate = date('F jS, Y h:i:s A', mktime(0, 0, 0, date('m'), date('d') + 1, date('Y'))); //create a contact and return the contact id - $firstNameSoft = "John_".substr(sha1(rand()), 0, 5); - $lastNameSoft = "Doe_".substr(sha1(rand()), 0, 5); + $firstNameSoft = "John_" . substr(sha1(rand()), 0, 5); + $lastNameSoft = "Doe_" . substr(sha1(rand()), 0, 5); $this->webtestAddContact($firstNameSoft, $lastNameSoft); $cid = $this->urlArg('cid'); //advance search for created contacts $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh'); - $this->type('sort_name', $lastNameSoft.', '.$firstNameSoft); + $this->type('sort_name', $lastNameSoft . ', ' . $firstNameSoft); $this->click('changeLog'); $this->waitForElementPresent("log_date_low"); $this->select("log_date_relative", "value=0"); diff --git a/tests/phpunit/WebTest/Contact/CustomDataAddTest.php b/tests/phpunit/WebTest/Contact/CustomDataAddTest.php index b874177b2b..799e057c75 100644 --- a/tests/phpunit/WebTest/Contact/CustomDataAddTest.php +++ b/tests/phpunit/WebTest/Contact/CustomDataAddTest.php @@ -270,11 +270,11 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase { //contact details section //fill in first name - $firstName = 'Jimmy'.substr(sha1(rand()), 0, 7); + $firstName = 'Jimmy' . substr(sha1(rand()), 0, 7); $this->type('first_name', $firstName); //fill in last name - $lastName = 'Page'.substr(sha1(rand()), 0, 7); + $lastName = 'Page' . substr(sha1(rand()), 0, 7); $this->type('last_name', $lastName); //fill in email id @@ -284,7 +284,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase { $this->type("phone_1_phone", "2222-4444"); $this->click("xpath=//table//tr/td/label[text()=\"$customField\"]"); - $value = "custom".rand(); + $value = "custom" . rand(); $this->type("xpath=//table//tr/td/label[text()=\"$customField\"]/../following-sibling::td/input", $value); //check for matching contact @@ -317,7 +317,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=//ul[@id='actions']/li[2]/a/span"); $this->clickLink("xpath=//ul[@id='actions']/li[2]/a/span"); $this->click("xpath=//table//tr/td/label[text()=\"$customField\"]"); - $value1 = "custom_1".rand(); + $value1 = "custom_1" . rand(); $this->type("xpath=//table//tr/td/label[text()=\"$customField\"]/../following-sibling::td/input", $value1); $this->click("_qf_Contact_upload_view-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); diff --git a/tests/phpunit/WebTest/Contact/GroupAddTest.php b/tests/phpunit/WebTest/Contact/GroupAddTest.php index d79c2b4d38..3eb09cb810 100644 --- a/tests/phpunit/WebTest/Contact/GroupAddTest.php +++ b/tests/phpunit/WebTest/Contact/GroupAddTest.php @@ -242,7 +242,7 @@ class WebTest_Contact_GroupAddTest extends CiviSeleniumTestCase { //Create contact. $group = "Advisory Board"; - $firstName = "Adams".substr(sha1(rand()), 0, 4); + $firstName = "Adams" . substr(sha1(rand()), 0, 4); $lastName = substr(sha1(rand()), 0, 4); $email = "{$lastName}.{$firstName}@example.org"; $this->type('first_name', $firstName); diff --git a/tests/phpunit/WebTest/Contact/MergeContactsTest.php b/tests/phpunit/WebTest/Contact/MergeContactsTest.php index 21d8685cd6..c5b03066ef 100644 --- a/tests/phpunit/WebTest/Contact/MergeContactsTest.php +++ b/tests/phpunit/WebTest/Contact/MergeContactsTest.php @@ -204,7 +204,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { $this->openCiviPage("contact/add", "reset=1&ct=Individual"); $this->waitForElementPresent('_qf_Contact_cancel-bottom'); //fill in first name - $firstName = "Anderson".substr(sha1(rand()), 0, 4); + $firstName = "Anderson" . substr(sha1(rand()), 0, 4); $this->type('first_name', $firstName); //fill in last name @@ -226,7 +226,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { $this->openCiviPage("contact/add", "reset=1&ct=Individual"); $this->waitForElementPresent('_qf_Contact_cancel-bottom'); - $fName = "John".substr(sha1(rand()), 0, 4); + $fName = "John" . substr(sha1(rand()), 0, 4); $this->type('first_name', $fName); $lName = substr(sha1(rand()), 0, 4); $this->type('last_name', $lName); @@ -504,9 +504,9 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { // add contact1 and its duplicate //first name - $firstName = "Kerry".substr(sha1(rand()), 0, 7); + $firstName = "Kerry" . substr(sha1(rand()), 0, 7); //last name - $lastName = "King".substr(sha1(rand()), 0, 7); + $lastName = "King" . substr(sha1(rand()), 0, 7); $this->_createContacts($firstName, $lastName); //add contact2 and its duplicate @@ -514,11 +514,11 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { $this->openCiviPage("contact/add", "reset=1&ct=Individual"); //fill in first name - $firstName1 = "Kurt".substr(sha1(rand()), 0, 7); + $firstName1 = "Kurt" . substr(sha1(rand()), 0, 7); $this->type('first_name', $firstName1); //fill in last name - $lastName1 = "Cobain".substr(sha1(rand()), 0, 7); + $lastName1 = "Cobain" . substr(sha1(rand()), 0, 7); $this->type('last_name', $lastName1); //fill in email id @@ -576,16 +576,16 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { // add contact3 and its duplicate //fill in first name - $firstName2 = "David".substr(sha1(rand()), 0, 7); + $firstName2 = "David" . substr(sha1(rand()), 0, 7); //fill in last name - $lastName2 = "Gilmour".substr(sha1(rand()), 0, 7); + $lastName2 = "Gilmour" . substr(sha1(rand()), 0, 7); $this->_createContacts($firstName2, $lastName2); // add contact4 and its duplicate //fill in first name - $firstName3 = "Dave".substr(sha1(rand()), 0, 7); + $firstName3 = "Dave" . substr(sha1(rand()), 0, 7); //fill in last name - $lastName3 = "Mustaine".substr(sha1(rand()), 0, 7); + $lastName3 = "Mustaine" . substr(sha1(rand()), 0, 7); $this->_createContacts($firstName3, $lastName3); // Find and Merge Contacts with Supervised Rule @@ -765,7 +765,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { $this->webtestLogin(); // build organisation name - $orgnaizationName = 'org_'.substr(sha1(rand()), 0, 7); + $orgnaizationName = 'org_' . substr(sha1(rand()), 0, 7); $contactIds = array(); // create organization and its duplicate diff --git a/tests/phpunit/WebTest/Contact/RelationshipAddTest.php b/tests/phpunit/WebTest/Contact/RelationshipAddTest.php index f200fdb267..292bee2cc7 100644 --- a/tests/phpunit/WebTest/Contact/RelationshipAddTest.php +++ b/tests/phpunit/WebTest/Contact/RelationshipAddTest.php @@ -187,7 +187,7 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase { //test for individual contact and household subtype contact //relationship - $typeb = "Household__". $householdSubtypeName; + $typeb = "Household__" . $householdSubtypeName; //create a relationship type between different contact types $params = array( diff --git a/tests/phpunit/WebTest/Contribute/ContactContextAddTest.php b/tests/phpunit/WebTest/Contribute/ContactContextAddTest.php index 83310dd7ad..cd7458f501 100644 --- a/tests/phpunit/WebTest/Contribute/ContactContextAddTest.php +++ b/tests/phpunit/WebTest/Contribute/ContactContextAddTest.php @@ -49,8 +49,8 @@ class WebTest_Contribute_ContactContextAddTest extends CiviSeleniumTestCase { // We're using Quick Add block on the main page for this. $firstName = substr(sha1(rand()), 0, 7); // Add new Financial Account - $orgName = 'Alberta '.substr(sha1(rand()), 0, 7); - $financialAccountTitle = 'Financial Account '.substr(sha1(rand()), 0, 4); + $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7); + $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4); $financialAccountDescription = "{$financialAccountTitle} Description"; $accountingCode = 1033; $financialAccountType = 'Asset'; diff --git a/tests/phpunit/WebTest/Contribute/OnBehalfOfOrganization.php b/tests/phpunit/WebTest/Contribute/OnBehalfOfOrganization.php index 577bef100e..262463b564 100644 --- a/tests/phpunit/WebTest/Contribute/OnBehalfOfOrganization.php +++ b/tests/phpunit/WebTest/Contribute/OnBehalfOfOrganization.php @@ -236,14 +236,14 @@ class WebTest_Contribute_OnBehalfOfOrganization extends CiviSeleniumTestCase { $this->click("link=Add Field"); $this->waitForElementPresent('_qf_Field_next-bottom'); $this->select('field_name[0]', 'value=Membership'); - $label = $checkboxFieldLabel.' :: '. $customGroupTitle; + $label = $checkboxFieldLabel . ' :: ' . $customGroupTitle; $this->select('field_name[1]', "label=$label"); $this->click('field_name[1]'); $this->click('_qf_Field_next_new-bottom'); $this->waitForPageToLoad($this->getTimeoutMsec()); $this->select('field_name[0]', 'value=Membership'); - $label = $radioFieldLabel.' :: '. $customGroupTitle; + $label = $radioFieldLabel . ' :: ' . $customGroupTitle; $this->select('field_name[1]', "label=$label"); $this->click('field_name[1]'); $this->click('_qf_Field_next-bottom'); @@ -251,8 +251,8 @@ class WebTest_Contribute_OnBehalfOfOrganization extends CiviSeleniumTestCase { $this->assertTrue($this->isTextPresent("Your CiviCRM Profile Field '{$radioFieldLabel}' has been saved to 'On Behalf Of Organization'.")); //create organisation - $orgName = "Org WebAccess ". substr(sha1(rand()), 0, 7); - $orgEmail = "org". substr(sha1(rand()), 0, 7) . "@web.com"; + $orgName = "Org WebAccess " . substr(sha1(rand()), 0, 7); + $orgEmail = "org" . substr(sha1(rand()), 0, 7) . "@web.com"; $this->webtestAddOrganization($orgName, $orgEmail); $this->waitForPageToLoad($this->getTimeoutMsec()); @@ -482,8 +482,8 @@ class WebTest_Contribute_OnBehalfOfOrganization extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); //create organisation - $orgName = "Org WebAccess ". substr(sha1(rand()), 0, 7); - $orgEmail = "org". substr(sha1(rand()), 0, 7) . "@web.com"; + $orgName = "Org WebAccess " . substr(sha1(rand()), 0, 7); + $orgEmail = "org" . substr(sha1(rand()), 0, 7) . "@web.com"; $this->webtestAddOrganization($orgName, $orgEmail); $this->waitForPageToLoad($this->getTimeoutMsec()); @@ -564,8 +564,8 @@ class WebTest_Contribute_OnBehalfOfOrganization extends CiviSeleniumTestCase { $this->webtestLogin(); //create organisation - $orgName = "Org WebAccess ". substr(sha1(rand()), 0, 7); - $orgEmail = "org". substr(sha1(rand()), 0, 7) . "@web.com"; + $orgName = "Org WebAccess " . substr(sha1(rand()), 0, 7); + $orgEmail = "org" . substr(sha1(rand()), 0, 7) . "@web.com"; $contactSubType = 'Sponsor'; $this->webtestAddOrganization($orgName, $orgEmail, $contactSubType); diff --git a/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php b/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php index 00c00d5c60..071c3f815c 100644 --- a/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php +++ b/tests/phpunit/WebTest/Contribute/StandaloneAddTest.php @@ -44,8 +44,8 @@ class WebTest_Contribute_StandaloneAddTest extends CiviSeleniumTestCase { $this->webtestAddContact($softCreditFname, $softCreditLname, FALSE); // Add new Financial Account - $orgName = 'Alberta '.substr(sha1(rand()), 0, 7); - $financialAccountTitle = 'Financial Account '.substr(sha1(rand()), 0, 4); + $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7); + $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4); $financialAccountDescription = "{$financialAccountTitle} Description"; $accountingCode = 1033; $financialAccountType = 'Asset'; diff --git a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php index eaf03ff857..4c4067eb77 100755 --- a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php @@ -114,13 +114,13 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { $from = 'Premiums'; $to = 'Premiums inventory'; $financialType = array( - 'name' => 'Test Financial'.substr(sha1(rand()), 0, 7), + 'name' => 'Test Financial' . substr(sha1(rand()), 0, 7), 'is_reserved' => 1, 'is_deductible' => 1, ); $this->addeditFinancialType($financialType); - $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']"); - $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']"); + $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']"); + $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']"); $this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']"); $this->clickAjaxLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom"); $this->select("account_relationship", "label=Premiums Inventory Account is"); @@ -128,7 +128,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { $this->select("financial_account_id", "label=$to"); $this->clickAjaxLink("_qf_FinancialTypeAccount_next-botttom", "xpath=//a[@id='newfinancialTypeAccount']"); - $premiumName = 'Premium'.substr(sha1(rand()), 0, 7); + $premiumName = 'Premium' . substr(sha1(rand()), 0, 7); $amount = 500; $sku = 'SKU'; $price = 300; @@ -138,7 +138,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { $this->addPremium($premiumName, $sku, $amount, $price, $cost, $financialType['name']); //add second premium - $premiumName2 = 'Premium'.substr(sha1(rand()), 0, 7); + $premiumName2 = 'Premium' . substr(sha1(rand()), 0, 7); $amount2 = 600; $sku2 = 'SKU'; $price2 = 200; @@ -190,8 +190,8 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { 'is_deductible' => 1, ); $this->addeditFinancialType($financialType); - $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']"); - $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='".$financialType['name']."']/../td[7]/span/a[text()='Accounts']"); + $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']"); + $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td[text()='" . $financialType['name'] . "']/../td[7]/span/a[text()='Accounts']"); $this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']"); $this->clickLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom", FALSE); @@ -244,7 +244,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { public function testChangePaymentInstrument() { $this->webtestLogin(); - $label = 'TEST'.substr(sha1(rand()), 0, 7); + $label = 'TEST' . substr(sha1(rand()), 0, 7); $amount = 100.00; $financialAccount = CRM_Contribute_PseudoConstant::financialAccount(); $to = array_search('Accounts Receivable', $financialAccount); diff --git a/tests/phpunit/WebTest/Event/AddEventTest.php b/tests/phpunit/WebTest/Event/AddEventTest.php index 750f331043..7937f91222 100644 --- a/tests/phpunit/WebTest/Event/AddEventTest.php +++ b/tests/phpunit/WebTest/Event/AddEventTest.php @@ -952,7 +952,7 @@ WHERE ceft.entity_id = %1 AND ceft.entity_table = 'civicrm_contribution'"; $this->type('first_name', $firstName); //fill in last name - $lastName = 'Recuron'.substr(sha1(rand()), 0, 7); + $lastName = 'Recuron' . substr(sha1(rand()), 0, 7); $this->type('last_name', $contactName); $email = $firstName . '@example.com'; $this->type('email-Primary', $email); diff --git a/tests/phpunit/WebTest/Event/AddPricesetTest.php b/tests/phpunit/WebTest/Event/AddPricesetTest.php index 2b37cf18fa..90f065836f 100644 --- a/tests/phpunit/WebTest/Event/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Event/AddPricesetTest.php @@ -179,7 +179,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { break; } $this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom'); - $this->waitForText('crm-notification-container', "Price Field '".$label."' has been saved."); + $this->waitForText('crm-notification-container', "Price Field '" . $label . "' has been saved."); } } @@ -459,7 +459,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { // Adding contact with randomized first name (so we can then select that contact when creating event registration) // We're using Quick Add block on the main page for this. $firstName = substr(sha1(rand()), 0, 7); - $lastName = 'Anderson'. substr(sha1(rand()), 0, 7); + $lastName = 'Anderson' . substr(sha1(rand()), 0, 7); $this->webtestAddContact($firstName, $lastName, TRUE); $contactName = "$lastName, $firstName"; $displayName = "$firstName $lastName"; @@ -515,7 +515,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { // Adding contact with randomized first name (so we can then select that contact when creating event registration) // We're using Quick Add block on the main page for this. $firstName = substr(sha1(rand()), 0, 7); - $lastName = 'Anderson'. substr(sha1(rand()), 0, 7); + $lastName = 'Anderson' . substr(sha1(rand()), 0, 7); $this->webtestAddContact($firstName, $lastName, TRUE); $contactName = "$lastName, $firstName"; $displayName = "$firstName $lastName"; diff --git a/tests/phpunit/WebTest/Event/ParticipantCountTest.php b/tests/phpunit/WebTest/Event/ParticipantCountTest.php index 07d34b3e4a..59890c9784 100644 --- a/tests/phpunit/WebTest/Event/ParticipantCountTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantCountTest.php @@ -73,7 +73,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5)); $this->type('email-Primary', $email); // fill billing details and register @@ -90,7 +90,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->click("xpath=//input[@class='crm-form-radio']"); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5)); $this->type('email-Primary', $email); // fill billing details and register diff --git a/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php b/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php index 98d4ffc685..5bcd5f9eab 100644 --- a/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php +++ b/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php @@ -170,7 +170,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->select("price_{$selectFieldId}", "value={$selectFieldOp1}"); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -198,7 +198,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { // exceed maximun count for text field, check for form rule $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -366,7 +366,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -396,7 +396,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { // check for form rule $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -564,7 +564,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '7'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -585,7 +585,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '6'); $this->type('first_name', 'Mary Add 2'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -606,7 +606,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary Add 2'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -650,7 +650,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -681,7 +681,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary Add 1'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -856,7 +856,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '7'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -877,7 +877,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '6'); $this->type('first_name', 'Mary Add 1'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -898,7 +898,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary Add 2'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -942,7 +942,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -973,7 +973,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary Add 1'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); diff --git a/tests/phpunit/WebTest/Event/TellAFriendTest.php b/tests/phpunit/WebTest/Event/TellAFriendTest.php index 276e8f33a1..5ba8143da8 100644 --- a/tests/phpunit/WebTest/Event/TellAFriendTest.php +++ b/tests/phpunit/WebTest/Event/TellAFriendTest.php @@ -75,7 +75,7 @@ class WebTest_Event_TellAFriendTest extends CiviSeleniumTestCase { $this->open($registerUrl); $this->waitForElementPresent('_qf_Register_upload-bottom'); - $firstName = 'Jane' .substr(sha1(rand()), 0, 7); + $firstName = 'Jane' . substr(sha1(rand()), 0, 7); $lastName = 'Doe' . substr(sha1(rand()), 0, 7); $this->type('first_name', "$firstName"); $this->type('last_name', "$lastName"); diff --git a/tests/phpunit/WebTest/Export/ContactTest.php b/tests/phpunit/WebTest/Export/ContactTest.php index 72ebb4a37a..32c1c92536 100644 --- a/tests/phpunit/WebTest/Export/ContactTest.php +++ b/tests/phpunit/WebTest/Export/ContactTest.php @@ -122,9 +122,9 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase { 1 => array( 'First Name' => $firstContactName, 'Last Name' => 'Smith', - 'Email' => ''.strtolower($emailContactFirst).'', + 'Email' => '' . strtolower($emailContactFirst) . '', 'Sort Name' => $sortFirstName, - 'Display Name' => $prefixLabelContactFrst.' '.$displayFirstName.' '.$suffixLabelContactFrst, + 'Display Name' => $prefixLabelContactFrst . ' ' . $displayFirstName . ' ' . $suffixLabelContactFrst, 'Individual Prefix' => $prefixLabelContactFrst, 'Individual Suffix' => $suffixLabelContactFrst, 'Gender' => $genderLabelContactFrst, @@ -132,9 +132,9 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase { 2 => array( 'First Name' => $secondContactName, 'Last Name' => 'John', - 'Email' => ''.strtolower($emailContactSecond).'', + 'Email' => '' . strtolower($emailContactSecond) . '', 'Sort Name' => $sortSecondName, - 'Display Name' => $prefixLabelContactScnd.' '.$displaySecondName.' '.$suffixLabelContactScnd, + 'Display Name' => $prefixLabelContactScnd . ' ' . $displaySecondName . ' ' . $suffixLabelContactScnd, 'Individual Prefix' => $prefixLabelContactScnd, 'Individual Suffix' => $suffixLabelContactScnd, 'Gender' => $genderLabelContactScnd, @@ -441,7 +441,7 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase { $prefix = rand(1, 4); $suffix = rand(1, 8); $gender = rand(1, 3); - $genderLabel = "civicrm_gender_".$genderLabelArray[$gender]."_$gender"; + $genderLabel = "civicrm_gender_" . $genderLabelArray[$gender] . "_$gender"; $this->select("prefix_id", "value=$prefix"); $this->select("suffix_id", "value=$suffix"); $this->click("demographics"); diff --git a/tests/phpunit/WebTest/Financial/FinancialAccountTest.php b/tests/phpunit/WebTest/Financial/FinancialAccountTest.php index d81dfde532..1f5a94bdf1 100644 --- a/tests/phpunit/WebTest/Financial/FinancialAccountTest.php +++ b/tests/phpunit/WebTest/Financial/FinancialAccountTest.php @@ -39,9 +39,9 @@ class WebTest_Financial_FinancialAccountTest extends CiviSeleniumTestCase { $this->webtestLogin(); // Add new Financial Account - $orgName = 'Alberta '.substr(sha1(rand()), 0, 7); + $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7); $uniqueName = explode(" ", $orgName); - $financialAccountTitle = 'Financial Account '.substr(sha1(rand()), 0, 4); + $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4); $financialAccountDescription = "{$financialAccountTitle} Description"; $accountingCode = 1033; $financialAccountType = 'Liability'; @@ -96,7 +96,7 @@ class WebTest_Financial_FinancialAccountTest extends CiviSeleniumTestCase { $financialAccountType = 'Liability'; if ($orgNameEdit) { - $orgNameEdit = 'NGO '.substr(sha1(rand()), 0, 7); + $orgNameEdit = 'NGO ' . substr(sha1(rand()), 0, 7); $this->webtestAddOrganization($orgNameEdit); $uniqueName = explode(" ", $orgNameEdit); } diff --git a/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php b/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php index e2e6ff774f..7e0f209275 100644 --- a/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php +++ b/tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php @@ -41,7 +41,7 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase { $this->webtestLogin(); //Add new Financial Type - $financialType['name'] = 'FinancialType '.substr(sha1(rand()), 0, 4); + $financialType['name'] = 'FinancialType ' . substr(sha1(rand()), 0, 4); $financialType['is_deductible'] = TRUE; $financialType['is_reserved'] = FALSE; $this->addeditFinancialType($financialType); @@ -92,7 +92,7 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase { //edit financial type $financialType['oldname'] = $financialType['name']; - $financialType['name'] = 'Edited FinancialType '.substr(sha1(rand()), 0, 4); + $financialType['name'] = 'Edited FinancialType ' . substr(sha1(rand()), 0, 4); $financialType['is_deductible'] = TRUE; $financialType['is_reserved'] = FALSE; $this->addeditFinancialType($financialType, 'Edit'); diff --git a/tests/phpunit/WebTest/Import/AddressImportTest.php b/tests/phpunit/WebTest/Import/AddressImportTest.php index a04925b129..96067f6dbe 100644 --- a/tests/phpunit/WebTest/Import/AddressImportTest.php +++ b/tests/phpunit/WebTest/Import/AddressImportTest.php @@ -297,7 +297,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase { public function _createMultipleValueCustomField($customFieldName, $type) { $this->type('label', $customFieldName); $this->select("data_type[0]", "value=0"); - $this->select("data_type[1]", "value=".$type); + $this->select("data_type[1]", "value=" . $type); $this->type("option_label_1", "label1"); $this->type("option_value_1", "label1"); $this->type("option_label_2", "label2"); diff --git a/tests/phpunit/WebTest/Member/OfflineMembershipAddPricesetTest.php b/tests/phpunit/WebTest/Member/OfflineMembershipAddPricesetTest.php index f478790972..66f16aeefd 100644 --- a/tests/phpunit/WebTest/Member/OfflineMembershipAddPricesetTest.php +++ b/tests/phpunit/WebTest/Member/OfflineMembershipAddPricesetTest.php @@ -108,19 +108,19 @@ class WebTest_Member_OfflineMembershipAddPricesetTest extends CiviSeleniumTestCa $this->select('html_type', "value={$fields[1]}"); $options = array( 1 => array( - 'label' => $memTypeTitle1."_1", + 'label' => $memTypeTitle1 . "_1", 'membership_type_id' => $memTypeId1, 'amount' => 50.00, 'membership_num_terms' => 1, ), 2 => array( - 'label' => $memTypeTitle1."_2", + 'label' => $memTypeTitle1 . "_2", 'membership_type_id' => $memTypeId1, 'amount' => 90.00, 'membership_num_terms' => 2, ), 3 => array( - 'label' => $memTypeTitle1."_3", + 'label' => $memTypeTitle1 . "_3", 'membership_type_id' => $memTypeId1, 'amount' => 120.00, 'membership_num_terms' => 3, diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php index 26c5e13fe3..8df6770af0 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php @@ -119,19 +119,19 @@ class WebTest_Member_OnlineMembershipAddPricesetTest extends CiviSeleniumTestCas $this->select('html_type', "value={$fields[1]}"); $options = array( 1 => array( - 'label' => $memTypeTitle1."_1", + 'label' => $memTypeTitle1 . "_1", 'membership_type_id' => $memTypeId1, 'amount' => 50.00, 'membership_num_terms' => 1, ), 2 => array( - 'label' => $memTypeTitle1."_2", + 'label' => $memTypeTitle1 . "_2", 'membership_type_id' => $memTypeId1, 'amount' => 90.00, 'membership_num_terms' => 2, ), 3 => array( - 'label' => $memTypeTitle1."_3", + 'label' => $memTypeTitle1 . "_3", 'membership_type_id' => $memTypeId1, 'amount' => 120.00, 'membership_num_terms' => 3, diff --git a/tests/phpunit/WebTest/Member/StandaloneAddTest.php b/tests/phpunit/WebTest/Member/StandaloneAddTest.php index ddc81015a3..5928e09522 100644 --- a/tests/phpunit/WebTest/Member/StandaloneAddTest.php +++ b/tests/phpunit/WebTest/Member/StandaloneAddTest.php @@ -143,7 +143,7 @@ class WebTest_Member_StandaloneAddTest extends CiviSeleniumTestCase { // verify soft credit data $expected = array( - '1' => $giftMemberfirstName.' Memberson', + '1' => $giftMemberfirstName . ' Memberson', '2' => $totalAmount, '3' => 'Gift', '4' => 'Donation', diff --git a/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php b/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php index 742014dc8d..c281f74490 100644 --- a/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php +++ b/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php @@ -123,7 +123,7 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase { $this->select('field_name[0]', 'value=Contact'); $this->click("//option[@value='Contact']"); $this->click('field_name_1'); - $this->select('field_name_1', 'label='.$params['textFieldLabel'].' :: '.$params['customGroupTitle']); + $this->select('field_name_1', 'label=' . $params['textFieldLabel'] . ' :: ' . $params['customGroupTitle']); if ($checkMultiRecord) { $this->click('is_multi_summary'); } @@ -143,7 +143,7 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase { $this->select('field_name[0]', 'value=Contact'); $this->click("//option[@value='Contact']"); $this->click('field_name_1'); - $this->select('field_name_1', 'label='.$params['selectFieldLabel'].' :: '.$params['customGroupTitle']); + $this->select('field_name_1', 'label=' . $params['selectFieldLabel'] . ' :: ' . $params['customGroupTitle']); if ($checkMultiRecord) { $this->click('is_multi_summary'); } @@ -239,12 +239,12 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase { $this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='Edit']"); $this->waitForElementPresent("xpath=//div[@class='ui-dialog-content ui-widget-content modal-dialog crm-ajax-container']/form/div[2]//div[@id='crm-profile-block']"); $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/thead/tr/th[1]", preg_quote($params['textFieldLabel'])); - $this->type("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']", $recordNew['text'].'edit'); + $this->type("//div[@id='crm-profile-block']/div/div[2]/input[@class='crm-form-text required']", $recordNew['text'] . 'edit'); $this->click("css=.ui-dialog-buttonset button[data-identifier=_qf_Edit_next]"); - $this->waitForText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", $recordNew['text'].'edit'); + $this->waitForText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", $recordNew['text'] . 'edit'); $editalertText = $this->getAlert(); $this->assertEquals("Thank you. Your information has been saved.", $editalertText); - $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", preg_quote($recordNew['text'].'edit')); + $this->verifyText("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr[1]/td[1]", preg_quote($recordNew['text'] . 'edit')); // Check the delete functionality $this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='Delete']"); @@ -256,7 +256,7 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase { $this->assertEquals("Deleted Your record has been deleted.", $delText); $this->click("//div[@id='custom--table-wrapper']/div/div/table/tbody/tr/td[3]/span/a[text()='View']"); - $this->waitForText("css=.ui-dialog-title", 'View '.$params['customGroupTitle'] . ' Record'); + $this->waitForText("css=.ui-dialog-title", 'View ' . $params['customGroupTitle'] . ' Record'); $this->assertElementContainsText("css=.ui-dialog-content.crm-ajax-container", $params['textFieldLabel']); if ($checkSearchable) { $this->verifyElementNotPresent("//div[@id='profile-dialog']/div/div/div/div/div[1]/div[2]/a"); @@ -380,7 +380,7 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase { $this->type('first_name', $params['firstname']); $params['lastname'] = 'Anderson' . substr(sha1(rand()), 0, 3); $this->type('last_name', $params['lastname']); - $params['email'] = $params['firstname'].$params['lastname'].'@exa.com'; + $params['email'] = $params['firstname'] . $params['lastname'] . '@exa.com'; $this->type('email-Primary', $params['email']); $this->waitForElementPresent("//div[@id='crm-profile-block']//div/div[2]/select"); $this->select("//div[@id='crm-profile-block']//div/div[2]/select", 'value=1'); diff --git a/tests/phpunit/WebTest/Profile/SearchTest.php b/tests/phpunit/WebTest/Profile/SearchTest.php index 2e1cc5208d..d399f0f562 100644 --- a/tests/phpunit/WebTest/Profile/SearchTest.php +++ b/tests/phpunit/WebTest/Profile/SearchTest.php @@ -165,7 +165,7 @@ class WebTest_Profile_SearchTest extends CiviSeleniumTestCase { $uselink = explode('?', $this->getAttribute("xpath=//*[@id='field_page']/div[1]/a[4]@href")); $this->openCiviPage('profile/create', "$uselink[1]", '_qf_Edit_next'); $lastName = substr(sha1(rand()), 0, 7); - $orgName = 'Organisation'.substr(sha1(rand()), 0, 7); + $orgName = 'Organisation' . substr(sha1(rand()), 0, 7); // Fill Last Name $this->type('last_name', $lastName); diff --git a/tests/phpunit/WebTest/Report/LoggingReportTest.php b/tests/phpunit/WebTest/Report/LoggingReportTest.php index 8a28e6130e..66d974adfe 100644 --- a/tests/phpunit/WebTest/Report/LoggingReportTest.php +++ b/tests/phpunit/WebTest/Report/LoggingReportTest.php @@ -161,7 +161,7 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=//div[@class='view-content']//div[@class='action-link']/a"); $this->click("xpath=//div[@class='view-content']//div[@class='action-link']/a"); $this->waitForElementPresent("_qf_Case_cancel-bottom"); - $this->type('activity_subject', "subject".rand()); + $this->type('activity_subject', "subject" . rand()); $this->select('case_type_id', 'value=1'); $this->click('_qf_Case_upload-bottom'); $this->waitForElementPresent("xpath=//form[@id='Search']/div[2]/div/table/tbody/tr[2]/td[9]/span[1]/a[1][text()='Manage']"); diff --git a/tests/phpunit/api/v3/ActionScheduleTest.php b/tests/phpunit/api/v3/ActionScheduleTest.php index 63536847e4..ee2a248da8 100644 --- a/tests/phpunit/api/v3/ActionScheduleTest.php +++ b/tests/phpunit/api/v3/ActionScheduleTest.php @@ -60,7 +60,7 @@ class api_v3_ActionScheduleTest extends CiviUnitTestCase { $scheduledStatus = CRM_Core_OptionGroup::getValue('activity_status', 'Scheduled', 'name'); $mappingId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionMapping', 'activity_type', 'id', 'entity_value'); $activityTypeId = CRM_Core_OptionGroup::getValue('activity_type', "Meeting", 'name'); - $title = "simpleActionSchedule".substr(sha1(rand()), 0, 7); + $title = "simpleActionSchedule" . substr(sha1(rand()), 0, 7); $params = array( 'title' => $title, 'recipient' => $assigneeID, @@ -98,7 +98,7 @@ class api_v3_ActionScheduleTest extends CiviUnitTestCase { $scheduledStatus = CRM_Core_OptionGroup::getValue('activity_status', 'Scheduled', 'name'); $mappingId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionMapping', 'activity_type', 'id', 'entity_value'); $activityTypeId = CRM_Core_OptionGroup::getValue('activity_type', "Meeting", 'name'); - $title = "simpleActionSchedule".substr(sha1(rand()), 0, 7); + $title = "simpleActionSchedule" . substr(sha1(rand()), 0, 7); $params = array( 'title' => $title, 'recipient' => $assigneeID, diff --git a/tests/phpunit/api/v3/ReportTemplateTest.php b/tests/phpunit/api/v3/ReportTemplateTest.php index d06a1a6862..43e6d3c3f4 100644 --- a/tests/phpunit/api/v3/ReportTemplateTest.php +++ b/tests/phpunit/api/v3/ReportTemplateTest.php @@ -195,7 +195,7 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { $reportTemplates[] = array($report['value']); } else { - $reportTemplates[] = array($report['value']. " has existing issues : " . $reportsToSkip[$report['value']]); + $reportTemplates[] = array($report['value'] . " has existing issues : " . $reportsToSkip[$report['value']]); } } diff --git a/tests/phpunit/api/v3/TaxContributionPageTest.php b/tests/phpunit/api/v3/TaxContributionPageTest.php index 8d26054453..c8737c11c0 100644 --- a/tests/phpunit/api/v3/TaxContributionPageTest.php +++ b/tests/phpunit/api/v3/TaxContributionPageTest.php @@ -58,7 +58,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { $this->_orgId = $this->organizationCreate(NULL); $this->params = array( - 'title' => "Test Contribution Page".substr(sha1(rand()), 0, 7), + 'title' => "Test Contribution Page" . substr(sha1(rand()), 0, 7), 'financial_type_id' => 1, 'payment_processor' => 1, 'currency' => 'NZD', @@ -71,8 +71,8 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { ); $this->_priceSetParams = array( - 'name' => 'tax_contribution'.substr(sha1(rand()), 0, 7), - 'title' => 'contributiontax'.substr(sha1(rand()), 0, 7), + 'name' => 'tax_contribution' . substr(sha1(rand()), 0, 7), + 'title' => 'contributiontax' . substr(sha1(rand()), 0, 7), 'is_active' => 1, 'help_pre' => "Where does your goat sleep", 'help_post' => "thank you for your time", @@ -84,7 +84,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { // Financial Account with 20% tax rate $financialAccountSetparams = array( #[domain_id] => - 'name' => 'vat full taxrate account'.substr(sha1(rand()), 0, 7), + 'name' => 'vat full taxrate account' . substr(sha1(rand()), 0, 7), 'contact_id' => $this->_orgId, 'financial_account_type_id' => 2, 'is_tax' => 1, @@ -99,7 +99,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { // Financial type having 'Sales Tax Account is' with liability financail account $financialType = array( - 'name' => 'grassvariety1'.substr(sha1(rand()), 0, 7), + 'name' => 'grassvariety1' . substr(sha1(rand()), 0, 7), 'is_reserved' => 0, 'is_active' => 1, ); @@ -115,7 +115,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { // Financial type with 5% tax rate $financialAccHalftax = array( - 'name' => 'vat half taxrate account'.substr(sha1(rand()), 0, 7), + 'name' => 'vat half taxrate account' . substr(sha1(rand()), 0, 7), 'contact_id' => $this->_orgId, 'financial_account_type_id' => 2, 'is_tax' => 1, @@ -127,7 +127,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { $halfFinancialAccount = CRM_Financial_BAO_FinancialAccount::add($financialAccHalftax); $this->halfFinancialAccId = $halfFinancialAccount->id; $halfFinancialtypeHalftax = array( - 'name' => 'grassvariety2'.substr(sha1(rand()), 0, 7), + 'name' => 'grassvariety2' . substr(sha1(rand()), 0, 7), 'is_reserved' => 0, 'is_active' => 1, ); @@ -160,7 +160,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { // Payment Processor $paymentProceParams = array( 'domain_id' => 1, - 'name' => 'dummy'.substr(sha1(rand()), 0, 7), + 'name' => 'dummy' . substr(sha1(rand()), 0, 7), 'payment_processor_type_id' => 10, 'financial_account_id' => 12, 'is_active' => 1, -- 2.25.1