From af9b09df30058b7ec63c65eecd75b75326772403 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 19 Jan 2015 19:11:49 -0800 Subject: [PATCH] INFRA-132 - Drupal.Array.Array.CommaLastItem --- CRM/ACL/Page/ACL.php | 26 +- CRM/Activity/Form/Activity.php | 4 +- CRM/Admin/Form/OptionGroup.php | 2 +- CRM/Campaign/Form/Task/Reserve.php | 6 +- CRM/Case/Audit/Audit.php | 2 +- CRM/Case/Form/Activity/OpenCase.php | 2 +- CRM/Contact/Form/Contact.php | 31 +- CRM/Contact/Form/DedupeRules.php | 2 +- CRM/Contact/Form/Search/Advanced.php | 6 +- CRM/Contact/Form/Task/AddToTag.php | 2 +- CRM/Contact/Form/Task/Label.php | 4 +- CRM/Core/BAO/Address.php | 10 +- CRM/Core/BAO/Tag.php | 15 +- CRM/Core/Form.php | 8 +- CRM/Core/Form/RecurringEntity.php | 4 +- CRM/Core/OptionGroup.php | 2 +- CRM/Core/Page/AJAX/Location.php | 10 +- CRM/Core/Payment/BaseIPN.php | 24 +- .../function.simpleActivityContacts.php | 2 +- CRM/Mailing/BAO/Query.php | 2 +- CRM/Mailing/Selector/Browse.php | 2 +- CRM/Member/Form/MembershipRenewal.php | 2 +- CRM/Member/Form/MembershipType.php | 2 +- CRM/Member/Form/Task/Label.php | 2 +- CRM/Member/Import/Form/DataSource.php | 2 +- CRM/Member/Import/Form/Summary.php | 2 +- CRM/Pledge/Form/Pledge.php | 2 +- CRM/Price/Page/Option.php | 2 +- CRM/Report/Form/Activity.php | 430 +++++++++--------- CRM/SMS/Provider.php | 4 +- CRM/UF/Form/AdvanceSetting.php | 4 +- CRM/UF/Form/Field.php | 6 +- CRM/Upgrade/Incremental/php/FourFive.php | 2 +- CRM/Upgrade/Page/Cleanup.php | 4 +- CRM/Utils/PagerAToZ.php | 2 +- tests/phpunit/CRM/Core/BAO/LocationTest.php | 2 +- .../phpunit/CRM/Core/Payment/BaseIPNTest.php | 2 +- tests/phpunit/CRM/Core/ResourcesTest.php | 8 +- .../Extension/Container/CollectionTest.php | 2 +- .../phpunit/api/v3/JobProcessMailingTest.php | 2 +- .../phpunit/api/v3/SyntaxConformanceTest.php | 12 +- tests/phpunit/api/v3/WebsiteTest.php | 2 +- 42 files changed, 328 insertions(+), 334 deletions(-) diff --git a/CRM/ACL/Page/ACL.php b/CRM/ACL/Page/ACL.php index 9257df602e..69070d0d3e 100644 --- a/CRM/ACL/Page/ACL.php +++ b/CRM/ACL/Page/ACL.php @@ -126,7 +126,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic { 'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1' ), - ) + ), ); CRM_Utils_System::appendBreadCrumb($breadCrumb); // what action to take ? @@ -173,22 +173,22 @@ ORDER BY entity_id $roles = CRM_Core_OptionGroup::values('acl_role'); $group = array( - '-1' => ts('- select -'), - '0' => ts('All Groups'), - ) + CRM_Core_PseudoConstant::group(); + '-1' => ts('- select -'), + '0' => ts('All Groups'), + ) + CRM_Core_PseudoConstant::group(); $customGroup = array( - '-1' => ts('- select -'), - '0' => ts('All Custom Groups'), - ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id'); + '-1' => ts('- select -'), + '0' => ts('All Custom Groups'), + ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id'); $ufGroup = array( - '-1' => ts('- select -'), - '0' => ts('All Profiles'), - ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id'); + '-1' => ts('- select -'), + '0' => ts('All Profiles'), + ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id'); $event = array( - '-1' => ts('- select -'), - '0' => ts('All Events'), - ) + CRM_Event_PseudoConstant::event(); + '-1' => ts('- select -'), + '0' => ts('All Events'), + ) + CRM_Event_PseudoConstant::event(); while ($dao->fetch()) { $acl[$dao->id] = array(); diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php index f0eba8e6cd..b8d9a6959f 100644 --- a/CRM/Activity/Form/Activity.php +++ b/CRM/Activity/Form/Activity.php @@ -178,7 +178,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { 'attributes' => array( 'multiple' => TRUE, 'create' => TRUE, - 'api' => array('params' => array('is_deceased' => 0)) + 'api' => array('params' => array('is_deceased' => 0)), ), ), 'followup_assignee_contact_id' => array( @@ -187,7 +187,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { 'attributes' => array( 'multiple' => TRUE, 'create' => TRUE, - 'api' => array('params' => array('is_deceased' => 0)) + 'api' => array('params' => array('is_deceased' => 0)), ), ), 'followup_activity_type_id' => array( diff --git a/CRM/Admin/Form/OptionGroup.php b/CRM/Admin/Form/OptionGroup.php index 4e013ff6ee..2b789e2792 100644 --- a/CRM/Admin/Form/OptionGroup.php +++ b/CRM/Admin/Form/OptionGroup.php @@ -81,7 +81,7 @@ class CRM_Admin_Form_OptionGroup extends CRM_Admin_Form { if (in_array($this->_values['name'], array( 'encounter_medium', 'case_type', - 'case_status' + 'case_status', ))) { static $caseCount = NULL; if (!isset($caseCount)) { diff --git a/CRM/Campaign/Form/Task/Reserve.php b/CRM/Campaign/Form/Task/Reserve.php index f70fa395cf..c56c525397 100644 --- a/CRM/Campaign/Form/Task/Reserve.php +++ b/CRM/Campaign/Form/Task/Reserve.php @@ -94,9 +94,7 @@ class CRM_Campaign_Form_Task_Reserve extends CRM_Campaign_Form_Task { //get the survey activities. $activityStatus = CRM_Core_PseudoConstant::activityStatus('name'); $statusIds = array(); - foreach (array( - 'Scheduled' - ) as $name) { + foreach (array('Scheduled') as $name) { if ($statusId = array_search($name, $activityStatus)) { $statusIds[] = $statusId; } @@ -179,7 +177,7 @@ class CRM_Campaign_Form_Task_Reserve extends CRM_Campaign_Form_Task { 'name' => ts('Reserve'), 'subName' => 'reserve', 'isDefault' => TRUE, - ) + ), ); if (CRM_Core_Permission::check('manage campaign') || diff --git a/CRM/Case/Audit/Audit.php b/CRM/Case/Audit/Audit.php index c1022490aa..fe711c3a00 100644 --- a/CRM/Case/Audit/Audit.php +++ b/CRM/Case/Audit/Audit.php @@ -100,7 +100,7 @@ class CRM_Case_Audit_Audit { if ($printReport) { if (!in_array($label, array( 'Activity Type', - 'Status' + 'Status', )) ) { $caseActivities[$activityindex][$fieldindex] = array(); diff --git a/CRM/Case/Form/Activity/OpenCase.php b/CRM/Case/Form/Activity/OpenCase.php index 92d8cd0fb9..f3ed3af0c1 100644 --- a/CRM/Case/Form/Activity/OpenCase.php +++ b/CRM/Case/Form/Activity/OpenCase.php @@ -151,7 +151,7 @@ class CRM_Case_Form_Activity_OpenCase { if ($form->_context == 'standalone') { $form->addEntityRef('client_id', ts('Client'), array( 'create' => TRUE, - 'multiple' => $form->_allowMultiClient + 'multiple' => $form->_allowMultiClient, ), TRUE); } diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 855ad98d6e..44b677a99d 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -642,7 +642,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { if (!$primaryID && in_array($name, array( 'email', - 'openid' + 'openid', )) && !empty($blockValues[$name]) ) { $primaryID = $blockValues[$name]; @@ -733,14 +733,13 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { if ($this->_action == CRM_Core_Action::UPDATE) { $deleteExtra = ts('Are you sure you want to delete contact image.'); $deleteURL = array( - CRM_Core_Action::DELETE => - array( - 'name' => ts('Delete Contact Image'), - 'url' => 'civicrm/contact/image', - 'qs' => 'reset=1&cid=%%id%%&action=delete', - 'extra' => - 'onclick = "if (confirm( \'' . $deleteExtra . '\' ) ) this.href+=\'&confirmed=1\'; else return false;"', - ), + CRM_Core_Action::DELETE => array( + 'name' => ts('Delete Contact Image'), + 'url' => 'civicrm/contact/image', + 'qs' => 'reset=1&cid=%%id%%&action=delete', + 'extra' => + 'onclick = "if (confirm( \'' . $deleteExtra . '\' ) ) this.href+=\'&confirmed=1\'; else return false;"', + ), ); $deleteURL = CRM_Core_Action::formLink($deleteURL, CRM_Core_Action::DELETE, @@ -1083,7 +1082,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { 'provider_id', 'country_id', 'website_type_id', - 'master_id' + 'master_id', ); foreach ($fields as $name => $value) { $skipField = FALSE; @@ -1138,18 +1137,18 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { $duplicateContactsLinks = '
'; $duplicateContactsLinks .= ts('One matching contact was found. ', array( 'count' => count($contactLinks['rows']), - 'plural' => '%count matching contacts were found.
' + 'plural' => '%count matching contacts were found.
', )); if ($contactLinks['msg'] == 'view') { $duplicateContactsLinks .= ts('You can View the existing contact', array( 'count' => count($contactLinks['rows']), - 'plural' => 'You can View the existing contacts' + 'plural' => 'You can View the existing contacts', )); } else { $duplicateContactsLinks .= ts('You can View or Edit the existing contact', array( 'count' => count($contactLinks['rows']), - 'plural' => 'You can View or Edit the existing contacts' + 'plural' => 'You can View or Edit the existing contacts', )); } if ($contactLinks['msg'] == 'merge') { @@ -1235,7 +1234,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { foreach (array( 'street_number', 'street_name', - 'street_unit' + 'street_unit', ) as $fld) { if (!empty($address[$fld])) { $parseFieldName = 'street_number'; @@ -1268,11 +1267,11 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { 'street_number', 'street_number_suffix', 'street_name', - 'street_unit' + 'street_unit', ) as $fld) { if (in_array($fld, array( 'street_name', - 'street_unit' + 'street_unit', ))) { $streetAddress .= ' '; } diff --git a/CRM/Contact/Form/DedupeRules.php b/CRM/Contact/Form/DedupeRules.php index d3bb5469d7..ccf9afe5ee 100644 --- a/CRM/Contact/Form/DedupeRules.php +++ b/CRM/Contact/Form/DedupeRules.php @@ -290,7 +290,7 @@ UPDATE civicrm_dedupe_rule_group 'binary', 'varbinary', 'text', - 'blob' + 'blob', )) ) { $length = NULL; diff --git a/CRM/Contact/Form/Search/Advanced.php b/CRM/Contact/Form/Search/Advanced.php index 11840a3e43..63c393f29e 100644 --- a/CRM/Contact/Form/Search/Advanced.php +++ b/CRM/Contact/Form/Search/Advanced.php @@ -247,7 +247,7 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search { if (array_key_exists('contribution_amount_low', $this->_formValues)) { foreach (array( 'contribution_amount_low', - 'contribution_amount_high' + 'contribution_amount_high', ) as $f) { $this->_formValues[$f] = CRM_Utils_Rule::cleanMoney($this->_formValues[$f]); } @@ -283,7 +283,7 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search { 'case_type_id', 'case_status_id', 'case_deleted', - 'case_tags' + 'case_tags', ) as $caseCriteria) { if (!empty($this->_formValues[$caseCriteria])) { $allCases = TRUE; @@ -374,7 +374,7 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search { 'status_id', 'activity_subject', 'participant_status_id', - 'participant_role_id' + 'participant_role_id', ); foreach ($specialParams as $element) { $value = CRM_Utils_Array::value($element, $this->_formValues); diff --git a/CRM/Contact/Form/Task/AddToTag.php b/CRM/Contact/Form/Task/AddToTag.php index d1a781716d..21a7524cc6 100644 --- a/CRM/Contact/Form/Task/AddToTag.php +++ b/CRM/Contact/Form/Task/AddToTag.php @@ -148,7 +148,7 @@ class CRM_Contact_Form_Task_AddToTag extends CRM_Contact_Form_Task { if ($notAdded) { $status[] = ts('%count contact already had this tag', array( 'count' => $notAdded, - 'plural' => '%count contacts already had this tag' + 'plural' => '%count contacts already had this tag', )); } $status = ''; diff --git a/CRM/Contact/Form/Task/Label.php b/CRM/Contact/Form/Task/Label.php index 84af9892c7..00cd4bc996 100644 --- a/CRM/Contact/Form/Task/Label.php +++ b/CRM/Contact/Form/Task/Label.php @@ -67,7 +67,7 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task { // add select for Location Type $this->addElement('select', 'location_type_id', ts('Select Location'), array( - '' => ts('Primary') + '' => ts('Primary'), ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'), TRUE ); @@ -291,7 +291,7 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task { 'email', 'phone', 'im', - 'openid' + 'openid', ))) { if ($k == 'im') { $rows[$value][$k] = $v['1']['name']; diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php index 7d22b268c3..4305fd3e85 100644 --- a/CRM/Core/BAO/Address.php +++ b/CRM/Core/BAO/Address.php @@ -379,7 +379,7 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { 'street_number', 'street_name', 'street_unit', - 'street_number_suffix' + 'street_number_suffix', ) as $fld) { unset($params[$fld]); } @@ -423,7 +423,7 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { 'contact_id', 'is_billing', 'display', - 'master_id' + 'master_id', ))) { continue; } @@ -508,7 +508,7 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { 'state', 'state_name', 'country', - 'world_region' + 'world_region', ) as $fld) { if (isset($address->$fld)) { unset($address->$fld); @@ -754,7 +754,7 @@ ORDER BY civicrm_address.is_primary DESC, civicrm_address.location_type_id DESC, $matches = array(); if (in_array($locale, array( 'en_CA', - 'fr_CA' + 'fr_CA', )) && preg_match('/^([A-Za-z0-9]+)[ ]*\-[ ]*/', $streetAddress, $matches) ) { $parseFields['street_unit'] = $matches[1]; @@ -848,7 +848,7 @@ ORDER BY civicrm_address.is_primary DESC, civicrm_address.location_type_id DESC, // overwriting $streetUnitFormats for 'en_CA' and 'fr_CA' locale if (in_array($locale, array( 'en_CA', - 'fr_CA' + 'fr_CA', ))) { $streetUnitFormats = array('APT', 'APP', 'SUITE', 'BUREAU', 'UNIT'); } diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index ff57dfa2ae..296aad1e35 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -126,12 +126,11 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { * * @return array */ - public static function getTagsUsedFor($usedFor = array( - 'civicrm_contact' - ), - $buildSelect = TRUE, - $all = FALSE, - $parentId = NULL + public static function getTagsUsedFor( + $usedFor = array('civicrm_contact'), + $buildSelect = TRUE, + $all = FALSE, + $parentId = NULL ) { $tags = array(); @@ -437,8 +436,8 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { $dao = CRM_Core_DAO::executeQuery($query, array( 1 => array( '%' . $entityTable . '%', - 'String' - ) + 'String', + ), ), TRUE, NULL, FALSE, FALSE); while ($dao->fetch()) { $tagSets[$dao->id] = $dao->name; diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 9e4fd78d2a..09f6c9299d 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -348,7 +348,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { // Respond with JSON if in AJAX context (also support legacy value '6') if ($allowAjax && !empty($_REQUEST['snippet']) && in_array($_REQUEST['snippet'], array( CRM_Core_Smarty::PRINT_JSON, - 6 + 6, )) ) { $this->ajaxResponse['buttonName'] = str_replace('_qf_' . $this->getAttribute('id') . '_', '', $this->controller->getButtonName()); @@ -1173,7 +1173,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { public function addCountry($id, $title, $required = NULL, $extra = NULL) { $this->addElement('select', $id, $title, array( - '' => ts('- select -') + '' => ts('- select -'), ) + CRM_Core_PseudoConstant::country(), $extra ); if ($required) { @@ -1655,7 +1655,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $this->assign('selectable', $autoCompleteField['id_field']); $this->addEntityRef($autoCompleteField['id_field'], NULL, array( 'placeholder' => $autoCompleteField['placeholder'], - 'api' => $autoCompleteField['api'] + 'api' => $autoCompleteField['api'], )); CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/AlternateContactSelector.js', 1, 'html-header') @@ -1780,7 +1780,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { 'country', 'Country', 'state_province', - 'StateProvince' + 'StateProvince', ), $elementName), 'data-callback' => strpos($elementName, 'rovince') ? 'civicrm/ajax/jqState' : 'civicrm/ajax/jqCounty', 'label' => strpos($elementName, 'rovince') ? ts('State/Province') : ts('County'), diff --git a/CRM/Core/Form/RecurringEntity.php b/CRM/Core/Form/RecurringEntity.php index c39d4bda54..02d6be9972 100644 --- a/CRM/Core/Form/RecurringEntity.php +++ b/CRM/Core/Form/RecurringEntity.php @@ -211,7 +211,7 @@ class CRM_Core_Form_RecurringEntity { $form->addDate('exclude_date', ts('Exclude Date(s)'), FALSE); $select = $form->add('select', 'exclude_date_list', ts(''), self::$_excludeDateInfo, FALSE, array( 'style' => 'width:150px;', - 'size' => 4 + 'size' => 4, )); $select->setMultiple(TRUE); $form->addElement('button', 'add_to_exclude_list', '>>', 'onClick="addToExcludeList(document.getElementById(\'exclude_date\').value);"'); @@ -411,7 +411,7 @@ class CRM_Core_Form_RecurringEntity { ) { call_user_func(array( CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['helper_class'], - call_user_func_array(CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['pre_delete_func'], array($params['entity_id'])) + call_user_func_array(CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['pre_delete_func'], array($params['entity_id'])), ) ); } diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php index 2b821e7346..46d6ce541f 100644 --- a/CRM/Core/OptionGroup.php +++ b/CRM/Core/OptionGroup.php @@ -626,7 +626,7 @@ WHERE v.option_group_id = g.id 'value', 'label', 'weight', - 'description' + 'description', ) as $fld) { $row[$fld] = $dao->$fld; } diff --git a/CRM/Core/Page/AJAX/Location.php b/CRM/Core/Page/AJAX/Location.php index c4a3612b27..00de0e1938 100644 --- a/CRM/Core/Page/AJAX/Location.php +++ b/CRM/Core/Page/AJAX/Location.php @@ -229,13 +229,13 @@ class CRM_Core_Page_AJAX_Location { foreach ($addressOptions as $element => $isSet) { if ($isSet && (!in_array($element, array( 'im', - 'openid' + 'openid', ))) ) { if (in_array($element, array( 'country', 'state_province', - 'county' + 'county', ))) { $element .= '_id'; } @@ -248,7 +248,7 @@ class CRM_Core_Page_AJAX_Location { $result[str_replace(array( '][', '[', - "]" + "]", ), array('_', '_', ''), $fld)] = $value; } } @@ -256,7 +256,7 @@ class CRM_Core_Page_AJAX_Location { foreach (array( 'email', 'phone_type_id', - 'phone' + 'phone', ) as $element) { $block = ($element == 'phone_type_id') ? 'phone' : $element; for ($i = 1; $i < 3; $i++) { @@ -266,7 +266,7 @@ class CRM_Core_Page_AJAX_Location { $result[str_replace(array( '][', '[', - "]" + "]", ), array('_', '_', ''), $fld)] = $value; } } diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index 02b8977046..9b90c4ed98 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -206,7 +206,7 @@ class CRM_Core_Payment_BaseIPN { //CRM-15546 $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); $contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date); $contribution->receipt_date = CRM_Utils_Date::isoToMysql($contribution->receipt_date); @@ -231,7 +231,7 @@ class CRM_Core_Payment_BaseIPN { // if transaction is failed then set "Cancelled" as membership status $membershipStatuses = CRM_Core_PseudoConstant::get('CRM_Member_DAO_Membership', 'status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); foreach ($memberships as $membership) { if ($membership) { @@ -248,7 +248,7 @@ class CRM_Core_Payment_BaseIPN { if ($participant) { $participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); $participant->status_id = $participantStatuses['Cancelled']; $participant->save(); @@ -295,7 +295,7 @@ class CRM_Core_Payment_BaseIPN { } $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); $contribution->contribution_status_id = $contributionStatuses['Cancelled']; $contribution->cancel_date = self::$_now; @@ -321,7 +321,7 @@ class CRM_Core_Payment_BaseIPN { if (!empty($memberships)) { $membershipStatuses = CRM_Core_PseudoConstant::get('CRM_Member_DAO_Membership', 'status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); foreach ($memberships as $membership) { if ($membership) { @@ -338,7 +338,7 @@ class CRM_Core_Payment_BaseIPN { if ($participant) { $participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); $participant->status_id = $participantStatuses['Cancelled']; $participant->save(); @@ -558,7 +558,7 @@ LIMIT 1;"; if (empty($input['skipComponentSync'])) { $participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); $participant->status_id = $participantStatuses['Registered']; } @@ -576,7 +576,7 @@ LIMIT 1;"; } $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); $contribution->contribution_status_id = $contributionStatuses['Completed']; $contribution->is_test = $input['is_test']; @@ -642,7 +642,7 @@ LIMIT 1;"; if ($contribution->id) { $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); if ((empty($input['prevContribution']) && $paymentProcessorId) || (!$input['prevContribution']->is_pay_later && $input['prevContribution']->contribution_status_id == $contributionStatuses['Pending'])) { $input['payment_processor'] = $paymentProcessorId; @@ -852,7 +852,7 @@ LIMIT 1;"; $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array( 'labelColumn' => 'name', - 'flip' => 1 + 'flip' => 1, )); $input['skipComponentSync'] = CRM_Utils_Array::value('skipComponentSync', $params); if ($statusId == $contributionStatuses['Cancelled']) { @@ -876,7 +876,7 @@ LIMIT 1;"; foreach (array( 'fee_amount', 'check_number', - 'payment_instrument_id' + 'payment_instrument_id', ) as $field) { if (!$input[$field] = CRM_Utils_Array::value($field, $params)) { $input[$field] = $contribution->$field; @@ -1000,7 +1000,7 @@ LIMIT 1;"; try { civicrm_api3('membership_payment', 'create', array( 'membership_id' => $value['entity_id'], - 'contribution_id' => $contribution->id + 'contribution_id' => $contribution->id, )); } catch (CiviCRM_API3_Exception $e) { diff --git a/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php b/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php index 701e8c473d..38e17dd419 100644 --- a/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php +++ b/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php @@ -52,7 +52,7 @@ function smarty_function_simpleActivityContacts($params, &$smarty) { foreach (array( 'target', - 'assignee' + 'assignee', ) as $role) { $contact = array(); if (!empty($activity[$role . '_contact_id'])) { diff --git a/CRM/Mailing/BAO/Query.php b/CRM/Mailing/BAO/Query.php index 0dc67d463b..0bb8498e2d 100644 --- a/CRM/Mailing/BAO/Query.php +++ b/CRM/Mailing/BAO/Query.php @@ -308,7 +308,7 @@ class CRM_Mailing_BAO_Query { ts('Bounce type(s)'), CRM_Core_PseudoConstant::get('CRM_Mailing_Event_DAO_Bounce', 'bounce_type_id', array( 'keyColumn' => 'id', - 'labelColumn' => 'name' + 'labelColumn' => 'name', )) ); return; diff --git a/CRM/Mailing/Selector/Browse.php b/CRM/Mailing/Selector/Browse.php index f2ec023da6..3189ce9956 100644 --- a/CRM/Mailing/Selector/Browse.php +++ b/CRM/Mailing/Selector/Browse.php @@ -360,7 +360,7 @@ LEFT JOIN civicrm_contact scheduledContact ON ( $mailing.scheduled_id = schedul if (in_array($row['status'], array( 'Scheduled', 'Running', - 'Paused' + 'Paused', ))) { if ($allAccess || ($showApprovalLinks && $showCreateLinks && $showScheduleLinks) diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 388ce66b17..995bb83788 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -371,7 +371,7 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; 'id', 'auto_renew', 'duration_unit', - 'duration_interval' + 'duration_interval', ) as $fld) { $this->_recurMembershipTypes[$recurMembershipTypes->id][$fld] = $recurMembershipTypes->$fld; } diff --git a/CRM/Member/Form/MembershipType.php b/CRM/Member/Form/MembershipType.php index df57359394..c922a909b4 100644 --- a/CRM/Member/Form/MembershipType.php +++ b/CRM/Member/Form/MembershipType.php @@ -235,7 +235,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form_MembershipConfig { if (in_array(CRM_Utils_Array::value('auto_renew', $params), array( 1, - 2 + 2, ))) { if (($params['duration_interval'] > 1 && $params['duration_unit'] == 'year') || ($params['duration_interval'] > 12 && $params['duration_unit'] == 'month') diff --git a/CRM/Member/Form/Task/Label.php b/CRM/Member/Form/Task/Label.php index ca9caf1960..ad1b027c48 100644 --- a/CRM/Member/Form/Task/Label.php +++ b/CRM/Member/Form/Task/Label.php @@ -132,7 +132,7 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task { $labelRows = array(); $memberships = civicrm_api3('membership', 'get', array( 'id' => array('IN' => $this->_memberIds), - 'return' => 'contact_id' + 'return' => 'contact_id', )); foreach ($memberships['values'] as $id => $membership) { $labelRows[$id] = $rows[$membership['contact_id']]; diff --git a/CRM/Member/Import/Form/DataSource.php b/CRM/Member/Import/Form/DataSource.php index a7d9cf0ef5..4df02edad0 100644 --- a/CRM/Member/Import/Form/DataSource.php +++ b/CRM/Member/Import/Form/DataSource.php @@ -68,7 +68,7 @@ class CRM_Member_Import_Form_DataSource extends CRM_Core_Form { $this->setMaxFileSize($uploadFileSize); $this->addRule('uploadFile', ts('File size should be less than %1 MBytes (%2 bytes)', array( 1 => $uploadSize, - 2 => $uploadFileSize + 2 => $uploadFileSize, )), 'maxfilesize', $uploadFileSize); $this->addRule('uploadFile', ts('A valid file must be uploaded.'), 'uploadedfile'); $this->addRule('uploadFile', ts('Input file must be in CSV format'), 'utf8File'); diff --git a/CRM/Member/Import/Form/Summary.php b/CRM/Member/Import/Form/Summary.php index 268994d760..dc2537cba8 100644 --- a/CRM/Member/Import/Form/Summary.php +++ b/CRM/Member/Import/Form/Summary.php @@ -105,7 +105,7 @@ class CRM_Member_Import_Form_Summary extends CRM_Import_Form_Summary { 'downloadDuplicateRecordsUrl', 'downloadMismatchRecordsUrl', 'groupAdditions', - 'unMatchCount' + 'unMatchCount', ); foreach ($properties as $property) { $this->assign($property, $this->get($property)); diff --git a/CRM/Pledge/Form/Pledge.php b/CRM/Pledge/Form/Pledge.php index 6cdc50bf5b..b0231f6743 100644 --- a/CRM/Pledge/Form/Pledge.php +++ b/CRM/Pledge/Form/Pledge.php @@ -353,7 +353,7 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form { $this->add('text', 'eachPaymentAmount', ts('each'), array( 'size' => 10, 'style' => "background-color:#EBECE4", - 'READONLY' + 'READONLY', )); //add various dates diff --git a/CRM/Price/Page/Option.php b/CRM/Price/Page/Option.php index 32eae094b1..5a7ac0cdf0 100644 --- a/CRM/Price/Page/Option.php +++ b/CRM/Price/Page/Option.php @@ -280,7 +280,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { array( 'title' => ts('Price Fields'), 'url' => CRM_Utils_System::url('civicrm/admin/price/field', 'reset=1&sid=' . $this->_sid), - ) + ), ); CRM_Utils_System::appendBreadCrumb($breadcrumb); diff --git a/CRM/Report/Form/Activity.php b/CRM/Report/Form/Activity.php index 2755ba22df..b7e165702d 100644 --- a/CRM/Report/Form/Activity.php +++ b/CRM/Report/Form/Activity.php @@ -62,246 +62,246 @@ class CRM_Report_Form_Activity extends CRM_Report_Form { asort($this->activityTypes); $this->_columns = array( - 'civicrm_contact' => array( - 'dao' => 'CRM_Contact_DAO_Contact', - 'fields' => array( - 'contact_source' => array( - 'name' => 'sort_name', - 'title' => ts('Source Contact Name'), - 'alias' => 'civicrm_contact_source', - 'no_repeat' => TRUE, - ), - 'contact_assignee' => array( - 'name' => 'sort_name', - 'title' => ts('Assignee Contact Name'), - 'alias' => 'civicrm_contact_assignee', - 'dbAlias' => "civicrm_contact_assignee.sort_name", - 'default' => TRUE, - ), - 'contact_target' => array( - 'name' => 'sort_name', - 'title' => ts('Target Contact Name'), - 'alias' => 'civicrm_contact_target', - 'dbAlias' => "civicrm_contact_target.sort_name", - 'default' => TRUE, - ), - 'contact_source_id' => array( - 'name' => 'id', - 'alias' => 'civicrm_contact_source', - 'dbAlias' => "civicrm_contact_source.id", - 'no_display' => TRUE, - 'default' => TRUE, - 'required' => TRUE, - ), - 'contact_assignee_id' => array( - 'name' => 'id', - 'alias' => 'civicrm_contact_assignee', - 'dbAlias' => "civicrm_contact_assignee.id", - 'no_display' => TRUE, - 'default' => TRUE, - 'required' => TRUE, - ), - 'contact_target_id' => array( - 'name' => 'id', - 'alias' => 'civicrm_contact_target', - 'dbAlias' => "civicrm_contact_target.id", - 'no_display' => TRUE, - 'default' => TRUE, - 'required' => TRUE, - ), + 'civicrm_contact' => array( + 'dao' => 'CRM_Contact_DAO_Contact', + 'fields' => array( + 'contact_source' => array( + 'name' => 'sort_name', + 'title' => ts('Source Contact Name'), + 'alias' => 'civicrm_contact_source', + 'no_repeat' => TRUE, ), - 'filters' => array( - 'contact_source' => array( - 'name' => 'sort_name', - 'alias' => 'civicrm_contact_source', - 'title' => ts('Source Contact Name'), - 'operator' => 'like', - 'type' => CRM_Report_Form::OP_STRING, - ), - 'contact_assignee' => array( - 'name' => 'sort_name', - 'alias' => 'civicrm_contact_assignee', - 'title' => ts('Assignee Contact Name'), - 'operator' => 'like', - 'type' => CRM_Report_Form::OP_STRING, - ), - 'contact_target' => array( - 'name' => 'sort_name', - 'alias' => 'civicrm_contact_target', - 'title' => ts('Target Contact Name'), - 'operator' => 'like', - 'type' => CRM_Report_Form::OP_STRING, - ), - 'current_user' => array( - 'name' => 'current_user', - 'title' => ts('Limit To Current User'), - 'type' => CRM_Utils_Type::T_INT, - 'operatorType' => CRM_Report_Form::OP_SELECT, - 'options' => array('0' => ts('No'), '1' => ts('Yes')), - ), + 'contact_assignee' => array( + 'name' => 'sort_name', + 'title' => ts('Assignee Contact Name'), + 'alias' => 'civicrm_contact_assignee', + 'dbAlias' => "civicrm_contact_assignee.sort_name", + 'default' => TRUE, + ), + 'contact_target' => array( + 'name' => 'sort_name', + 'title' => ts('Target Contact Name'), + 'alias' => 'civicrm_contact_target', + 'dbAlias' => "civicrm_contact_target.sort_name", + 'default' => TRUE, + ), + 'contact_source_id' => array( + 'name' => 'id', + 'alias' => 'civicrm_contact_source', + 'dbAlias' => "civicrm_contact_source.id", + 'no_display' => TRUE, + 'default' => TRUE, + 'required' => TRUE, + ), + 'contact_assignee_id' => array( + 'name' => 'id', + 'alias' => 'civicrm_contact_assignee', + 'dbAlias' => "civicrm_contact_assignee.id", + 'no_display' => TRUE, + 'default' => TRUE, + 'required' => TRUE, + ), + 'contact_target_id' => array( + 'name' => 'id', + 'alias' => 'civicrm_contact_target', + 'dbAlias' => "civicrm_contact_target.id", + 'no_display' => TRUE, + 'default' => TRUE, + 'required' => TRUE, ), - 'grouping' => 'contact-fields', ), - 'civicrm_email' => array( - 'dao' => 'CRM_Core_DAO_Email', - 'fields' => array( - 'contact_source_email' => array( - 'name' => 'email', - 'title' => ts('Source Contact Email'), - 'alias' => 'civicrm_email_source', - ), - 'contact_assignee_email' => array( - 'name' => 'email', - 'title' => ts('Assignee Contact Email'), - 'alias' => 'civicrm_email_assignee', - ), - 'contact_target_email' => array( - 'name' => 'email', - 'title' => ts('Target Contact Email'), - 'alias' => 'civicrm_email_target', - ), + 'filters' => array( + 'contact_source' => array( + 'name' => 'sort_name', + 'alias' => 'civicrm_contact_source', + 'title' => ts('Source Contact Name'), + 'operator' => 'like', + 'type' => CRM_Report_Form::OP_STRING, ), - 'order_bys' => array( - 'source_contact_email' => array( - 'name' => 'email', - 'title' => ts('Source Contact Email'), - 'dbAlias' => 'civicrm_email_contact_source_email', - ), + 'contact_assignee' => array( + 'name' => 'sort_name', + 'alias' => 'civicrm_contact_assignee', + 'title' => ts('Assignee Contact Name'), + 'operator' => 'like', + 'type' => CRM_Report_Form::OP_STRING, + ), + 'contact_target' => array( + 'name' => 'sort_name', + 'alias' => 'civicrm_contact_target', + 'title' => ts('Target Contact Name'), + 'operator' => 'like', + 'type' => CRM_Report_Form::OP_STRING, + ), + 'current_user' => array( + 'name' => 'current_user', + 'title' => ts('Limit To Current User'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_SELECT, + 'options' => array('0' => ts('No'), '1' => ts('Yes')), ), ), - 'civicrm_activity' => array( - 'dao' => 'CRM_Activity_DAO_Activity', - 'fields' => array( - 'id' => array( - 'no_display' => TRUE, - 'title' => ts('Activity ID'), - 'required' => TRUE, - ), - 'source_record_id' => array( - 'no_display' => TRUE, - 'required' => TRUE, - ), - 'activity_type_id' => array( - 'title' => ts('Activity Type'), - 'required' => TRUE, - 'type' => CRM_Utils_Type::T_STRING, - ), - 'activity_subject' => array( - 'title' => ts('Subject'), - 'default' => TRUE, - ), - 'activity_date_time' => array( - 'title' => ts('Activity Date'), - 'required' => TRUE, - ), - 'status_id' => array( - 'title' => ts('Activity Status'), - 'default' => TRUE, - 'type' => CRM_Utils_Type::T_STRING, - ), - 'duration' => array( - 'title' => ts('Duration'), - 'type' => CRM_Utils_Type::T_INT, - ), - 'details' => array( - 'title' => ts('Activity Details'), - ), + 'grouping' => 'contact-fields', + ), + 'civicrm_email' => array( + 'dao' => 'CRM_Core_DAO_Email', + 'fields' => array( + 'contact_source_email' => array( + 'name' => 'email', + 'title' => ts('Source Contact Email'), + 'alias' => 'civicrm_email_source', ), - 'filters' => array( - 'activity_date_time' => array( - 'default' => 'this.month', - 'operatorType' => CRM_Report_Form::OP_DATE, - ), - 'activity_subject' => array('title' => ts('Activity Subject')), - 'activity_type_id' => array( - 'title' => ts('Activity Type'), - 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => $this->activityTypes, - ), - 'status_id' => array( - 'title' => ts('Activity Status'), - 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Core_PseudoConstant::activityStatus(), - ), - 'details' => array( - 'title' => ts('Activity Details'), - 'type' => CRM_Utils_Type::T_TEXT, - ), + 'contact_assignee_email' => array( + 'name' => 'email', + 'title' => ts('Assignee Contact Email'), + 'alias' => 'civicrm_email_assignee', ), - 'order_bys' => array( - 'activity_date_time' => array( - 'title' => ts('Activity Date'), - 'default_weight' => '1', - 'dbAlias' => 'civicrm_activity_activity_date_time', - ), - 'activity_type_id' => array( - 'title' => ts('Activity Type'), - 'default_weight' => '2', - 'dbAlias' => "option_value_civireport", - ), + 'contact_target_email' => array( + 'name' => 'email', + 'title' => ts('Target Contact Email'), + 'alias' => 'civicrm_email_target', ), - 'grouping' => 'activity-fields', - 'alias' => 'activity', ), - 'civicrm_activity_contact' => array( - 'dao' => 'CRM_Activity_DAO_ActivityContact', - 'fields' => array(// so we have $this->_alias populated + 'order_bys' => array( + 'source_contact_email' => array( + 'name' => 'email', + 'title' => ts('Source Contact Email'), + 'dbAlias' => 'civicrm_email_contact_source_email', ), ), - 'civicrm_option_value' => array( - 'dao' => 'CRM_Core_DAO_OptionValue', - 'fields' => array(// so we have $this->_alias populated + ), + 'civicrm_activity' => array( + 'dao' => 'CRM_Activity_DAO_Activity', + 'fields' => array( + 'id' => array( + 'no_display' => TRUE, + 'title' => ts('Activity ID'), + 'required' => TRUE, + ), + 'source_record_id' => array( + 'no_display' => TRUE, + 'required' => TRUE, + ), + 'activity_type_id' => array( + 'title' => ts('Activity Type'), + 'required' => TRUE, + 'type' => CRM_Utils_Type::T_STRING, + ), + 'activity_subject' => array( + 'title' => ts('Subject'), + 'default' => TRUE, + ), + 'activity_date_time' => array( + 'title' => ts('Activity Date'), + 'required' => TRUE, + ), + 'status_id' => array( + 'title' => ts('Activity Status'), + 'default' => TRUE, + 'type' => CRM_Utils_Type::T_STRING, + ), + 'duration' => array( + 'title' => ts('Duration'), + 'type' => CRM_Utils_Type::T_INT, ), - 'status_id' => - array( - 'title' => ts('Activity Status'), - 'default' => TRUE, - 'type' => CRM_Utils_Type::T_STRING, - ), - 'duration' => - array( - 'title' => ts('Duration'), - 'type' => CRM_Utils_Type::T_INT, - ), - 'location' => - array( - 'title' => ts('Location'), - 'type' => CRM_Utils_Type::T_STRING, - ), 'details' => array( 'title' => ts('Activity Details'), - ) + ), ), 'filters' => array( 'activity_date_time' => array( 'default' => 'this.month', 'operatorType' => CRM_Report_Form::OP_DATE, ), - 'activity_subject' => - array('title' => ts('Activity Subject')), - 'location' => - array( - 'title' => ts('Location'), - 'type' => CRM_Utils_Type::T_TEXT, - ), - 'activity_type_id' => - array( - 'title' => ts('Activity Type'), - 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => $this->activityTypes, - ), - 'status_id' => - array( - 'title' => ts('Activity Status'), - 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Core_PseudoConstant::activityStatus(), - ), + 'activity_subject' => array('title' => ts('Activity Subject')), + 'activity_type_id' => array( + 'title' => ts('Activity Type'), + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => $this->activityTypes, + ), + 'status_id' => array( + 'title' => ts('Activity Status'), + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_PseudoConstant::activityStatus(), + ), 'details' => array( 'title' => ts('Activity Details'), 'type' => CRM_Utils_Type::T_TEXT, - ) + ), + ), + 'order_bys' => array( + 'activity_date_time' => array( + 'title' => ts('Activity Date'), + 'default_weight' => '1', + 'dbAlias' => 'civicrm_activity_activity_date_time', + ), + 'activity_type_id' => array( + 'title' => ts('Activity Type'), + 'default_weight' => '2', + 'dbAlias' => "option_value_civireport", + ), + ), + 'grouping' => 'activity-fields', + 'alias' => 'activity', + ), + 'civicrm_activity_contact' => array( + 'dao' => 'CRM_Activity_DAO_ActivityContact', + 'fields' => array(// so we have $this->_alias populated + ), + ), + 'civicrm_option_value' => array( + 'dao' => 'CRM_Core_DAO_OptionValue', + 'fields' => array(// so we have $this->_alias populated + ), + 'status_id' => + array( + 'title' => ts('Activity Status'), + 'default' => TRUE, + 'type' => CRM_Utils_Type::T_STRING, + ), + 'duration' => + array( + 'title' => ts('Duration'), + 'type' => CRM_Utils_Type::T_INT, + ), + 'location' => + array( + 'title' => ts('Location'), + 'type' => CRM_Utils_Type::T_STRING, + ), + 'details' => array( + 'title' => ts('Activity Details'), + ), + ), + 'filters' => array( + 'activity_date_time' => array( + 'default' => 'this.month', + 'operatorType' => CRM_Report_Form::OP_DATE, + ), + 'activity_subject' => + array('title' => ts('Activity Subject')), + 'location' => + array( + 'title' => ts('Location'), + 'type' => CRM_Utils_Type::T_TEXT, + ), + 'activity_type_id' => + array( + 'title' => ts('Activity Type'), + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => $this->activityTypes, + ), + 'status_id' => + array( + 'title' => ts('Activity Status'), + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_PseudoConstant::activityStatus(), + ), + 'details' => array( + 'title' => ts('Activity Details'), + 'type' => CRM_Utils_Type::T_TEXT, ), - ) + $this->addressFields(TRUE); + ), + ) + $this->addressFields(TRUE); if ($campaignEnabled) { // Add display column and filter for Survey Results, Campaign and Engagement Index if CiviCampaign is enabled diff --git a/CRM/SMS/Provider.php b/CRM/SMS/Provider.php index e77fe436e5..34e41db57c 100644 --- a/CRM/SMS/Provider.php +++ b/CRM/SMS/Provider.php @@ -209,14 +209,14 @@ INNER JOIN civicrm_mailing_job mj ON mj.mailing_id = m.id AND mj.id = %1"; 1 => array( 'location_type_id' => $phoneloc, 'email' => $stripFrom . '@mobile.sms', - ) + ), ), 'phone' => array( 1 => array( 'phone_type_id' => $phonetype, 'location_type_id' => $phoneloc, 'phone' => $stripFrom, - ) + ), ), ); $fromContact = CRM_Contact_BAO_Contact::create($contactparams, FALSE, TRUE, FALSE); diff --git a/CRM/UF/Form/AdvanceSetting.php b/CRM/UF/Form/AdvanceSetting.php index 0ccbc7d1d7..858b98c530 100644 --- a/CRM/UF/Form/AdvanceSetting.php +++ b/CRM/UF/Form/AdvanceSetting.php @@ -58,9 +58,7 @@ class CRM_UF_Form_AdvanceSetting extends CRM_UF_Form_Group { $form->addElement('text', 'cancel_URL', ts('Cancel Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'cancel_URL')); // add select for groups - $group = array( - '' => ts('- select -') - ) + $form->_group; + $group = array('' => ts('- select -')) + $form->_group; $form->_groupElement = &$form->addElement('select', 'group', ts('Limit listings to a specific Group?'), $group); //add notify field diff --git a/CRM/UF/Form/Field.php b/CRM/UF/Form/Field.php index 8163c00371..8395807cc3 100644 --- a/CRM/UF/Form/Field.php +++ b/CRM/UF/Form/Field.php @@ -111,7 +111,7 @@ class CRM_UF_Form_Field extends CRM_Core_Form { array( 'title' => ts('CiviCRM Profile Fields'), 'url' => $url, - ) + ), ); CRM_Utils_System::appendBreadCrumb($breadCrumb); } @@ -294,8 +294,8 @@ class CRM_UF_Form_Field extends CRM_Core_Form { $defaultLocation = $this->_location_types[$defaultLocationType->id]; unset($this->_location_types[$defaultLocationType->id]); $this->_location_types = array( - $defaultLocationType->id => $defaultLocation, - ) + $this->_location_types; + $defaultLocationType->id => $defaultLocation, + ) + $this->_location_types; } $this->_location_types = array('Primary') + $this->_location_types; diff --git a/CRM/Upgrade/Incremental/php/FourFive.php b/CRM/Upgrade/Incremental/php/FourFive.php index 24eadd3ac7..8a4b6b395b 100644 --- a/CRM/Upgrade/Incremental/php/FourFive.php +++ b/CRM/Upgrade/Incremental/php/FourFive.php @@ -142,7 +142,7 @@ DROP KEY `{$dao->CONSTRAINT_NAME}`"; $endId = $startId + self::BATCH_SIZE - 1; $title = ts("Upgrade DB to 4.5.beta9: Fix line items for {$label} (%1 => %2)", array( 1 => $startId, - 2 => $endId + 2 => $endId, )); $this->addTask($title, 'task_4_5_0_fixLineItem', $startId, $endId, $label); } diff --git a/CRM/Upgrade/Page/Cleanup.php b/CRM/Upgrade/Page/Cleanup.php index 2298e712e6..e719ac8938 100644 --- a/CRM/Upgrade/Page/Cleanup.php +++ b/CRM/Upgrade/Page/Cleanup.php @@ -42,7 +42,7 @@ class CRM_Upgrade_Page_Cleanup extends CRM_Core_Page { "Start Date", "End Date", "Membership Status", - "Action" + "Action", ); $template->assign('columnHeaders', $columnHeaders); $template->assign('rows', $rows); @@ -53,7 +53,7 @@ class CRM_Upgrade_Page_Cleanup extends CRM_Core_Page { $postMessage = ts('You can click here to try running the 4.2 upgrade script again. (Review upgrade documentation)', array( 1 => CRM_Utils_System::url('civicrm/upgrade', 'reset=1'), - 2 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades' + 2 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades', )); $template->assign('postMessage', $postMessage); diff --git a/CRM/Utils/PagerAToZ.php b/CRM/Utils/PagerAToZ.php index bd767f1f85..08ce2cf4f5 100644 --- a/CRM/Utils/PagerAToZ.php +++ b/CRM/Utils/PagerAToZ.php @@ -90,7 +90,7 @@ class CRM_Utils_PagerAToZ { 'W', 'X', 'Y', - 'Z' + 'Z', ); return $staticAlphabets; } diff --git a/tests/phpunit/CRM/Core/BAO/LocationTest.php b/tests/phpunit/CRM/Core/BAO/LocationTest.php index dd63fb8dab..9a0c53155d 100644 --- a/tests/phpunit/CRM/Core/BAO/LocationTest.php +++ b/tests/phpunit/CRM/Core/BAO/LocationTest.php @@ -50,7 +50,7 @@ class CRM_Core_BAO_LocationTest extends CiviUnitTestCase { 'civicrm_loc_block', 'civicrm_email', 'civicrm_phone', - 'civicrm_im' + 'civicrm_im', )); } diff --git a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php index 4e07c27641..d98a4283f3 100644 --- a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php @@ -224,7 +224,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $mut->checkMailLog(array( 'Thank you for your participation', 'Annual CiviCRM meet', - 'Mr. Anthony Anderson II' + 'Mr. Anthony Anderson II', ) ); $mut->stop(); diff --git a/tests/phpunit/CRM/Core/ResourcesTest.php b/tests/phpunit/CRM/Core/ResourcesTest.php index 3f2c77340a..464ac2a238 100644 --- a/tests/phpunit/CRM/Core/ResourcesTest.php +++ b/tests/phpunit/CRM/Core/ResourcesTest.php @@ -122,10 +122,10 @@ class CRM_Core_ResourcesTest extends CiviUnitTestCase { 'fruit' => array( 'yours' => 'orange', 'mine' => 'new apple', - 'ours' => 'banana' - ) - ) - ) + 'ours' => 'banana', + ), + ), + ), ), $this->res->getSettings() ); diff --git a/tests/phpunit/CRM/Extension/Container/CollectionTest.php b/tests/phpunit/CRM/Extension/Container/CollectionTest.php index 366ebdce96..05ad1000d6 100644 --- a/tests/phpunit/CRM/Extension/Container/CollectionTest.php +++ b/tests/phpunit/CRM/Extension/Container/CollectionTest.php @@ -55,7 +55,7 @@ class CRM_Extension_Container_CollectionTest extends CiviUnitTestCase { 'test.whiz', 'test.whizbang', 'test.foo', - 'test.foo.bar' + 'test.foo.bar', ), $c->getKeys()); } diff --git a/tests/phpunit/api/v3/JobProcessMailingTest.php b/tests/phpunit/api/v3/JobProcessMailingTest.php index d8de9f3d55..65f445c257 100644 --- a/tests/phpunit/api/v3/JobProcessMailingTest.php +++ b/tests/phpunit/api/v3/JobProcessMailingTest.php @@ -105,7 +105,7 @@ class api_v3_JobProcessMailingTest extends CiviUnitTestCase { $this->callAPISuccess('group_contact', 'create', array( 'contact_id' => $contactID, 'group_id' => $groupID, - 'status' => 'Added' + 'status' => 'Added', )); } } diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index 0cc5c72e1e..283fa859ca 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -365,7 +365,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { 'CustomSearch', 'Extension', 'ReportTemplate', - 'System' + 'System', ); if ($sequential === TRUE) { return $entitiesWithoutGet; @@ -439,7 +439,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { 'PaymentProcessor', 'Setting', 'MailingContact', - 'SystemLog' + 'SystemLog', //skip this because it doesn't make sense to update logs, ); if ($sequential === TRUE) { @@ -550,7 +550,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { 'installments', 'original_installment_amount', 'next_pay_date', - 'amount' // can't be changed through API, + 'amount', // can't be changed through API, ), 'break_return' => array(// if these are passed in they are retrieved from the wrong table 'honor_contact_id', @@ -1177,11 +1177,11 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { if (isset($specs['pseudoconstant']['optionGroupName'])) { $optionGroupID = $this->callAPISuccess('option_group', 'getvalue', array( 'name' => 'pdf_format', - 'return' => 'id' + 'return' => 'id', )); $optionValue = $this->callAPISuccess('option_value', 'create', array( 'option_group_id' => $optionGroupID, - 'label' => 'new option value' + 'label' => 'new option value', )); $options['values'][] = $optionValue['id']; } @@ -1214,7 +1214,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { 'update-result' => $update, 'getsingle-params' => $checkParams, 'getsingle-result' => $checkEntity, - 'expected entity' => $entity + 'expected entity' => $entity, ), TRUE)); if ($resetFKTo) { //reset the foreign key fields because otherwise our cleanup routine fails & some other unexpected stuff can kick in diff --git a/tests/phpunit/api/v3/WebsiteTest.php b/tests/phpunit/api/v3/WebsiteTest.php index 31d6ab7e56..1aa16f2ca0 100644 --- a/tests/phpunit/api/v3/WebsiteTest.php +++ b/tests/phpunit/api/v3/WebsiteTest.php @@ -93,7 +93,7 @@ class api_v3_WebsiteTest extends CiviUnitTestCase { $result = $this->callAPIAndDocument($this->_entity, 'get', array( 'options' => array( 'metadata' => array('fields'), - ) + ), ), __FUNCTION__, __FILE__, 'Demonostrates returning field metadata', 'GetWithMetadata'); $this->assertEquals('Website', $result['metadata']['fields']['url']['title']); } -- 2.25.1