From: Tim Otten Date: Fri, 9 Jan 2015 22:48:38 +0000 (-0800) Subject: INFRA-132 - BraceOnNewLine. ContentAfterBrace. FirstIndexNoNewline. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6ea503d4cd5cf73d69de60e1d41f3286159ce17e;p=civicrm-core.git INFRA-132 - BraceOnNewLine. ContentAfterBrace. FirstIndexNoNewline. --- diff --git a/CRM/Campaign/Form/Survey/TabHeader.php b/CRM/Campaign/Form/Survey/TabHeader.php index b43e5c1f43..940e2a6cc7 100644 --- a/CRM/Campaign/Form/Survey/TabHeader.php +++ b/CRM/Campaign/Form/Survey/TabHeader.php @@ -52,9 +52,11 @@ class CRM_Campaign_Form_Survey_TabHeader { $form->assign_by_ref('tabHeader', $tabs); CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header') - ->addSetting(array('tabSettings' => array( - 'active' => self::getCurrentTab($tabs), - ))); + ->addSetting(array( + 'tabSettings' => array( + 'active' => self::getCurrentTab($tabs), + ), + )); return $tabs; } @@ -69,19 +71,22 @@ class CRM_Campaign_Form_Survey_TabHeader { } $tabs = array( - 'main' => array('title' => ts('Main Information'), + 'main' => array( + 'title' => ts('Main Information'), 'link' => NULL, 'valid' => FALSE, 'active' => FALSE, 'current' => FALSE, ), - 'questions' => array('title' => ts('Questions'), + 'questions' => array( + 'title' => ts('Questions'), 'link' => NULL, 'valid' => FALSE, 'active' => FALSE, 'current' => FALSE, ), - 'results' => array('title' => ts('Results'), + 'results' => array( + 'title' => ts('Results'), 'link' => NULL, 'valid' => FALSE, 'active' => FALSE, diff --git a/CRM/Contact/BAO/GroupContact.php b/CRM/Contact/BAO/GroupContact.php index c47ce54d4c..fe3ce36418 100644 --- a/CRM/Contact/BAO/GroupContact.php +++ b/CRM/Contact/BAO/GroupContact.php @@ -622,7 +622,8 @@ SELECT * * @static */ public static function mergeGroupContact($mainContactId, $otherContactId) { - $params = array(1 => array($mainContactId, 'Integer'), + $params = array( + 1 => array($mainContactId, 'Integer'), 2 => array($otherContactId, 'Integer'), ); @@ -765,7 +766,8 @@ WHERE group_id = %1 AND status = %2 AND contact_id IN ( $contactStr ) "; - $params = array(1 => array($groupID, 'Integer'), + $params = array( + 1 => array($groupID, 'Integer'), 2 => array($status, 'String'), ); diff --git a/CRM/Contact/BAO/GroupNestingCache.php b/CRM/Contact/BAO/GroupNestingCache.php index dad6896268..d363bc16b9 100644 --- a/CRM/Contact/BAO/GroupNestingCache.php +++ b/CRM/Contact/BAO/GroupNestingCache.php @@ -51,13 +51,15 @@ WHERE n.child_group_id = gc.id $tree = array(); while ($dao->fetch()) { if (!array_key_exists($dao->child, $tree)) { - $tree[$dao->child] = array('children' => array(), + $tree[$dao->child] = array( + 'children' => array(), 'parents' => array(), ); } if (!array_key_exists($dao->parent, $tree)) { - $tree[$dao->parent] = array('children' => array(), + $tree[$dao->parent] = array( + 'children' => array(), 'parents' => array(), ); } diff --git a/CRM/Contact/BAO/Individual.php b/CRM/Contact/BAO/Individual.php index 88613b8e4f..c62456aef3 100644 --- a/CRM/Contact/BAO/Individual.php +++ b/CRM/Contact/BAO/Individual.php @@ -41,7 +41,8 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact { /** * This is a contructor of the class. */ - public function __construct() {} + public function __construct() { + } /** * Function is used to format the individual contact values diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index c0c8f865d1..495a042896 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -901,7 +901,8 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { if (isset($params['contact_id'])) { // process membership status for deceased contact - $deceasedParams = array('contact_id' => CRM_Utils_Array::value('contact_id', $params), + $deceasedParams = array( + 'contact_id' => CRM_Utils_Array::value('contact_id', $params), 'is_deceased' => CRM_Utils_Array::value('is_deceased', $params, FALSE), 'deceased_date' => CRM_Utils_Array::value('deceased_date', $params, NULL), ); diff --git a/CRM/Contact/Form/Edit/Demographics.php b/CRM/Contact/Form/Edit/Demographics.php index 3fe5715d69..358b76cfdb 100644 --- a/CRM/Contact/Form/Edit/Demographics.php +++ b/CRM/Contact/Form/Edit/Demographics.php @@ -75,5 +75,6 @@ class CRM_Contact_Form_Edit_Demographics { * * @return void */ - public static function setDefaultValues(&$form, &$defaults) {} + public static function setDefaultValues(&$form, &$defaults) { + } } diff --git a/CRM/Contact/Form/Edit/Email.php b/CRM/Contact/Form/Edit/Email.php index 003abdef41..91953302ac 100644 --- a/CRM/Contact/Form/Edit/Email.php +++ b/CRM/Contact/Form/Edit/Email.php @@ -73,7 +73,8 @@ class CRM_Contact_Form_Edit_Email { //On-hold select if ($multipleBulk) { - $holdOptions = array(0 => ts('- select -'), + $holdOptions = array( + 0 => ts('- select -'), 1 => ts('On Hold Bounce'), 2 => ts('On Hold Opt Out'), ); diff --git a/CRM/Contact/Form/Location.php b/CRM/Contact/Form/Location.php index 2c8f35a39e..77a2ed0350 100644 --- a/CRM/Contact/Form/Location.php +++ b/CRM/Contact/Form/Location.php @@ -56,7 +56,8 @@ class CRM_Contact_Form_Location { $className = CRM_Utils_System::getClassName($form); if (in_array($className, array( 'CRM_Event_Form_ManageEvent_Location', 'CRM_Contact_Form_Domain'))) { - $form->_blocks = array('Address' => ts('Address'), + $form->_blocks = array( + 'Address' => ts('Address'), 'Email' => ts('Email'), 'Phone' => ts('Phone'), ); diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index 4a08100576..4141d06aaa 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -257,7 +257,8 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { return array('deleteOther' => 1); } - public function addRules() {} + public function addRules() { + } public function buildQuickForm() { CRM_Utils_System::setTitle(ts('Merge %1s', array(1 => $this->_contactType))); diff --git a/CRM/Contact/Form/Search/Builder.php b/CRM/Contact/Form/Search/Builder.php index 89550d769c..18338dc465 100644 --- a/CRM/Contact/Form/Search/Builder.php +++ b/CRM/Contact/Form/Search/Builder.php @@ -296,7 +296,8 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { return TRUE; } - public function normalizeFormValues() {} + public function normalizeFormValues() { + } /** * @param $formValues diff --git a/CRM/Contact/Form/Search/Criteria.php b/CRM/Contact/Form/Search/Criteria.php index 4234e81019..68fd674444 100644 --- a/CRM/Contact/Form/Search/Criteria.php +++ b/CRM/Contact/Form/Search/Criteria.php @@ -192,7 +192,8 @@ class CRM_Contact_Form_Search_Criteria { $form->addElement('select', 'operator', ts('Search Operator'), - array('AND' => ts('AND'), + array( + 'AND' => ts('AND'), 'OR' => ts('OR'), ) ); @@ -234,7 +235,8 @@ class CRM_Contact_Form_Search_Criteria { $form->addElement('select', 'privacy_operator', ts('Operator'), - array('OR' => ts('OR'), + array( + 'OR' => ts('OR'), 'AND' => ts('AND'), ) ); diff --git a/CRM/Contact/Form/Search/Custom.php b/CRM/Contact/Form/Search/Custom.php index a1e2dcd954..283819d2c7 100644 --- a/CRM/Contact/Form/Search/Custom.php +++ b/CRM/Contact/Form/Search/Custom.php @@ -64,7 +64,8 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search { } // set breadcrumb to return to Custom Search listings page - $breadCrumb = array(array('title' => ts('Custom Searches'), + $breadCrumb = array(array( + 'title' => ts('Custom Searches'), 'url' => CRM_Utils_System::url('civicrm/contact/search/custom/list', 'reset=1' ), diff --git a/CRM/Contact/Form/Search/Custom/ContribSYBNT.php b/CRM/Contact/Form/Search/Custom/ContribSYBNT.php index 3017c4c02d..79ca97a975 100644 --- a/CRM/Contact/Form/Search/Custom/ContribSYBNT.php +++ b/CRM/Contact/Form/Search/Custom/ContribSYBNT.php @@ -51,7 +51,8 @@ class CRM_Contact_Form_Search_Custom_ContribSYBNT implements CRM_Contact_Form_Se ts('Contribution Amount') => 'donation_amount', ); - $this->_amounts = array('min_amount_1' => ts('Min Amount One'), + $this->_amounts = array( + 'min_amount_1' => ts('Min Amount One'), 'max_amount_1' => ts('Max Amount One'), 'min_amount_2' => ts('Min Amount Two'), 'max_amount_2' => ts('Max Amount Two'), @@ -59,7 +60,8 @@ class CRM_Contact_Form_Search_Custom_ContribSYBNT implements CRM_Contact_Form_Se 'exclude_max_amount' => ts('Exclusion Max Amount'), ); - $this->_dates = array('start_date_1' => ts('Start Date One'), + $this->_dates = array( + 'start_date_1' => ts('Start Date One'), 'end_date_1' => ts('End Date One'), 'start_date_2' => ts('Start Date Two'), 'end_date_2' => ts('End Date Two'), diff --git a/CRM/Contact/Form/Task/HookSample.php b/CRM/Contact/Form/Task/HookSample.php index c5e84e308f..7cd440096a 100644 --- a/CRM/Contact/Form/Task/HookSample.php +++ b/CRM/Contact/Form/Task/HookSample.php @@ -88,5 +88,6 @@ AND c.id IN ( $contactIDs )"; * * @return void */ - public function postProcess() {} + public function postProcess() { + } } diff --git a/CRM/Contact/Form/Task/Map.php b/CRM/Contact/Form/Task/Map.php index fa2d670011..c1f4e8541f 100644 --- a/CRM/Contact/Form/Task/Map.php +++ b/CRM/Contact/Form/Task/Map.php @@ -136,7 +136,8 @@ class CRM_Contact_Form_Task_Map extends CRM_Contact_Form_Task { * * @return void */ - public function postProcess() {} + public function postProcess() { + } /** * Assign smarty variables to the template that will be used by google api to plot the contacts diff --git a/CRM/Contribute/Form/AbstractEditPayment.php b/CRM/Contribute/Form/AbstractEditPayment.php index d57f881996..55dd114c9d 100644 --- a/CRM/Contribute/Form/AbstractEditPayment.php +++ b/CRM/Contribute/Form/AbstractEditPayment.php @@ -257,7 +257,7 @@ class CRM_Contribute_Form_AbstractEditPayment extends CRM_Core_Form { * @param int $id * @todo - this function is a long way, non standard of saying $dao = new CRM_Contribute_DAO_ContributionProduct(); $dao->id = $id; $dao->find(); */ - public function assignPremiumProduct($id) { //to get Premium id + public function assignPremiumProduct($id) { $sql = " SELECT * FROM civicrm_contribution_product @@ -436,11 +436,13 @@ LEFT JOIN civicrm_contribution on (civicrm_contribution.contact_id = civicrm_co } /** + * Get current currency from DB or use default currency. + * * @param $submittedValues * * @return mixed */ - public function getCurrency($submittedValues) { // get current currency from DB or use default currency + public function getCurrency($submittedValues) { $config = CRM_Core_Config::singleton(); $currentCurrency = CRM_Utils_Array::value('currency', diff --git a/CRM/Contribute/Form/UpdateSubscription.php b/CRM/Contribute/Form/UpdateSubscription.php index eb1f5b304c..f604f34505 100644 --- a/CRM/Contribute/Form/UpdateSubscription.php +++ b/CRM/Contribute/Form/UpdateSubscription.php @@ -213,7 +213,8 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form { // save the changes $result = CRM_Contribute_BAO_ContributionRecur::add($params); $status = ts('Recurring contribution has been updated to: %1, every %2 %3(s) for %4 installments.', - array(1 => CRM_Utils_Money::format($params['amount'], $this->_subscriptionDetails->currency), + array( + 1 => CRM_Utils_Money::format($params['amount'], $this->_subscriptionDetails->currency), 2 => $this->_subscriptionDetails->frequency_interval, 3 => $this->_subscriptionDetails->frequency_unit, 4 => $params['installments'], diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index cd0d075c47..d72310214e 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -605,5 +605,6 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa * * @return void */ - public function fini() {} + public function fini() { + } } diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php index 7c9e19068e..efb46b1c82 100644 --- a/CRM/Core/BAO/Navigation.php +++ b/CRM/Core/BAO/Navigation.php @@ -308,7 +308,8 @@ ORDER BY parent_id, weight"; // for each menu get their children $navigationTree[$navigation->id] = array( - 'attributes' => array('label' => $label, + 'attributes' => array( + 'label' => $label, 'name' => $navigation->name, 'url' => $navigation->url, 'permission' => $navigation->permission, diff --git a/CRM/Core/BAO/Preferences.php b/CRM/Core/BAO/Preferences.php index 7b404bccd2..ecfa4d9c72 100644 --- a/CRM/Core/BAO/Preferences.php +++ b/CRM/Core/BAO/Preferences.php @@ -102,7 +102,8 @@ AND v.name = %3 else { $value = CRM_Utils_System::relativeURL($value); } - $sqlParams = array(1 => array($value, 'String'), + $sqlParams = array( + 1 => array($value, 'String'), 2 => array($optionName, 'String'), 3 => array($name, 'String'), ); diff --git a/CRM/Core/BAO/PrevNextCache.php b/CRM/Core/BAO/PrevNextCache.php index 09aa7085f5..d1ddbb4253 100644 --- a/CRM/Core/BAO/PrevNextCache.php +++ b/CRM/Core/BAO/PrevNextCache.php @@ -64,9 +64,10 @@ WHERE cacheKey = %3 AND entity_table = 'civicrm_contact' "; - $params = array(1 => array($id1, 'Integer'), - 2 => array($id2, 'Integer'), - 3 => array($cacheKey, 'String'), + $params = array( + 1 => array($id1, 'Integer'), + 2 => array($id2, 'Integer'), + 3 => array($cacheKey, 'String'), ); $mergeId = CRM_Core_DAO::singleValueQuery($query, $params); @@ -81,8 +82,9 @@ WHERE cacheKey = %3 AND $where = " AND {$where}"; } - $p = array(1 => array($mergeId, 'Integer'), - 2 => array($cacheKey, 'String'), + $p = array( + 1 => array($mergeId, 'Integer'), + 2 => array($cacheKey, 'String'), ); $sql = "SELECT pn.id, pn.entity_id1, pn.entity_id2, pn.data FROM civicrm_prevnext_cache pn {$join} "; $wherePrev = " WHERE pn.id < %1 AND pn.cacheKey = %2 {$where} ORDER BY ID DESC LIMIT 1"; diff --git a/CRM/Core/BAO/SchemaHandler.php b/CRM/Core/BAO/SchemaHandler.php index 4fa3c4dc1d..9e03d47811 100644 --- a/CRM/Core/BAO/SchemaHandler.php +++ b/CRM/Core/BAO/SchemaHandler.php @@ -482,7 +482,8 @@ UPDATE civicrm_custom_field SET text_length = %1 WHERE id = %2 "; - $params = array(1 => array($length, 'Integer'), + $params = array( + 1 => array($length, 'Integer'), 2 => array($customFieldID, 'Integer'), ); CRM_Core_DAO::executeQuery($sql, $params); diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index af3cbf7bfe..6dda26f400 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -1045,7 +1045,8 @@ WHERE ( group_name = %1 OR group_name = %2 ) AND domain_id = %3 "; - $sqlParams = array(1 => array(self::DIRECTORY_PREFERENCES_NAME, 'String'), + $sqlParams = array( + 1 => array(self::DIRECTORY_PREFERENCES_NAME, 'String'), 2 => array(self::URL_PREFERENCES_NAME, 'String'), 3 => array(CRM_Core_Config::domainID(), 'Integer'), ); diff --git a/CRM/Core/I18n/Schema.php b/CRM/Core/I18n/Schema.php index 10276f0236..79def54a80 100644 --- a/CRM/Core/I18n/Schema.php +++ b/CRM/Core/I18n/Schema.php @@ -573,7 +573,8 @@ class CRM_Core_I18n_Schema { } $sql = implode(' ', $trigger); - $info[] = array('table' => array($table), + $info[] = array( + 'table' => array($table), 'when' => 'BEFORE', 'event' => array('UPDATE'), 'sql' => $sql, @@ -602,7 +603,8 @@ class CRM_Core_I18n_Schema { } $sql = implode(' ', $trigger); - $info[] = array('table' => array($table), + $info[] = array( + 'table' => array($table), 'when' => 'BEFORE', 'event' => array('INSERT'), 'sql' => $sql, diff --git a/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php b/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php index f14be3e03b..dc9dd9a542 100644 --- a/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php +++ b/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php @@ -183,8 +183,7 @@ class CRM_Core_I18n_SchemaStructure_4_2_alpha1 { /** * @return array */ - public static function &indices() - { + public static function &indices() { static $result = NULL; if (!$result) { $result = array( @@ -225,8 +224,7 @@ class CRM_Core_I18n_SchemaStructure_4_2_alpha1 { /** * @return array */ - public static function &tables() - { + public static function &tables() { static $result = NULL; if (!$result) { $result = array_keys(self::columns()); diff --git a/CRM/Core/I18n/SchemaStructure_4_3_1.php b/CRM/Core/I18n/SchemaStructure_4_3_1.php index f5838ef226..b376a521b9 100644 --- a/CRM/Core/I18n/SchemaStructure_4_3_1.php +++ b/CRM/Core/I18n/SchemaStructure_4_3_1.php @@ -35,8 +35,7 @@ class CRM_Core_I18n_SchemaStructure_4_3_1 { /** * @return array */ - public static function &columns() - { + public static function &columns() { static $result = NULL; if (!$result) { $result = array( @@ -189,8 +188,7 @@ class CRM_Core_I18n_SchemaStructure_4_3_1 { /** * @return array */ - public static function &indices() - { + public static function &indices() { static $result = NULL; if (!$result) { $result = array( @@ -231,8 +229,7 @@ class CRM_Core_I18n_SchemaStructure_4_3_1 { /** * @return array */ - public static function &tables() - { + public static function &tables() { static $result = NULL; if (!$result) { $result = array_keys(self::columns()); diff --git a/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php b/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php index 8b336156db..586fd0de93 100644 --- a/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php +++ b/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php @@ -189,8 +189,7 @@ class CRM_Core_I18n_SchemaStructure_4_5_alpha1 { /** * @return array */ - public static function &indices() - { + public static function &indices() { static $result = NULL; if (!$result) { $result = array( @@ -231,8 +230,7 @@ class CRM_Core_I18n_SchemaStructure_4_5_alpha1 { /** * @return array */ - public static function &tables() - { + public static function &tables() { static $result = NULL; if (!$result) { $result = array_keys(self::columns()); diff --git a/CRM/Core/I18n/SchemaStructure_4_5_beta2.php b/CRM/Core/I18n/SchemaStructure_4_5_beta2.php index df8b61c2ec..f9a91ad68e 100644 --- a/CRM/Core/I18n/SchemaStructure_4_5_beta2.php +++ b/CRM/Core/I18n/SchemaStructure_4_5_beta2.php @@ -186,8 +186,7 @@ class CRM_Core_I18n_SchemaStructure_4_5_beta2 { } return $result; } - public static function &indices() - { + public static function &indices() { static $result = NULL; if (!$result) { $result = array( @@ -224,8 +223,7 @@ class CRM_Core_I18n_SchemaStructure_4_5_beta2 { } return $result; } - public static function &tables() - { + public static function &tables() { static $result = NULL; if (!$result) { $result = array_keys(self::columns()); diff --git a/CRM/Core/JobManager.php b/CRM/Core/JobManager.php index e9755e071f..c6d5944b29 100644 --- a/CRM/Core/JobManager.php +++ b/CRM/Core/JobManager.php @@ -98,7 +98,8 @@ class CRM_Core_JobManager { * * @param void */ - public function __destruct() {} + public function __destruct() { + } /** * @param $entity diff --git a/CRM/Core/Smarty/plugins/block.crmRegion.php b/CRM/Core/Smarty/plugins/block.crmRegion.php index b625a61c74..d871b37d17 100644 --- a/CRM/Core/Smarty/plugins/block.crmRegion.php +++ b/CRM/Core/Smarty/plugins/block.crmRegion.php @@ -16,8 +16,7 @@ * * @return string */ -function smarty_block_crmRegion($params, $content, &$smarty, &$repeat) -{ +function smarty_block_crmRegion($params, $content, &$smarty, &$repeat) { if ($repeat) { return; } diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index 4f3004024d..d901357cf4 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -862,7 +862,8 @@ WHERE v.option_group_id = g.id } $participantFields = CRM_Event_DAO_Participant::fields(); - $participantParams = array('id' => CRM_Utils_Array::value('participant_id', $params), + $participantParams = array( + 'id' => CRM_Utils_Array::value('participant_id', $params), 'contact_id' => $contactID, 'event_id' => $form->_eventId ? $form->_eventId : $params['event_id'], 'status_id' => CRM_Utils_Array::value('participant_status', diff --git a/CRM/Event/Form/Registration/ThankYou.php b/CRM/Event/Form/Registration/ThankYou.php index a8a69f2d18..95e10de766 100644 --- a/CRM/Event/Form/Registration/ThankYou.php +++ b/CRM/Event/Form/Registration/ThankYou.php @@ -241,7 +241,8 @@ class CRM_Event_Form_Registration_ThankYou extends CRM_Event_Form_Registration { * * @return void */ - public function postProcess() {} + public function postProcess() { + } /** * Return a descriptive name for the page, used in wizard header diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index 3f6312759f..1cdb4b3189 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -355,7 +355,8 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { * @return void * @see valid_date */ - public function addRules() {} + public function addRules() { + } /** * Set the default form values diff --git a/CRM/Event/Form/Task/Delete.php b/CRM/Event/Form/Task/Delete.php index e52e6c5daf..24a3b4c79c 100644 --- a/CRM/Event/Form/Task/Delete.php +++ b/CRM/Event/Form/Task/Delete.php @@ -74,7 +74,8 @@ class CRM_Event_Form_Task_Delete extends CRM_Event_Form_Task { * @return void */ public function buildQuickForm() { - $deleteParticipants = array(1 => ts('Delete this participant record along with associated participant record(s).'), + $deleteParticipants = array( + 1 => ts('Delete this participant record along with associated participant record(s).'), 2 => ts('Delete only this participant record.'), ); diff --git a/CRM/Event/Import/Parser/Participant.php b/CRM/Event/Import/Parser/Participant.php index 8773b3881c..b9de554509 100644 --- a/CRM/Event/Import/Parser/Participant.php +++ b/CRM/Event/Import/Parser/Participant.php @@ -506,5 +506,6 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser { * * @return void */ - public function fini() {} + public function fini() { + } } diff --git a/CRM/Event/Info.php b/CRM/Event/Info.php index 201017f983..f2a832bf73 100644 --- a/CRM/Event/Info.php +++ b/CRM/Event/Info.php @@ -86,7 +86,8 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function getUserDashboardElement() { - return array('name' => ts('Events'), + return array( + 'name' => ts('Events'), 'title' => ts('Your Event(s)'), 'perm' => array('register for events'), 'weight' => 20, @@ -98,7 +99,8 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function registerTab() { - return array('title' => ts('Events'), + return array( + 'title' => ts('Events'), 'id' => 'participant', 'url' => 'participant', 'weight' => 40, @@ -110,7 +112,8 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function registerAdvancedSearchPane() { - return array('title' => ts('Events'), + return array( + 'title' => ts('Events'), 'weight' => 40, ); } @@ -121,7 +124,8 @@ class CRM_Event_Info extends CRM_Core_Component_Info { */ public function getActivityTypes() { $types = array(); - $types['Event'] = array('title' => ts('Event'), + $types['Event'] = array( + 'title' => ts('Event'), 'callback' => 'CRM_Event_Page_EventInfo::run()', ); return $types; diff --git a/CRM/Event/Page/EventInfo.php b/CRM/Event/Page/EventInfo.php index 72a73962e4..42a761cbed 100644 --- a/CRM/Event/Page/EventInfo.php +++ b/CRM/Event/Page/EventInfo.php @@ -214,10 +214,12 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { } } - $center = array('lat' => (float ) $sumLat / count($locations), + $center = array( + 'lat' => (float ) $sumLat / count($locations), 'lng' => (float ) $sumLng / count($locations), ); - $span = array('lat' => (float )($maxLat - $minLat), + $span = array( + 'lat' => (float )($maxLat - $minLat), 'lng' => (float )($maxLng - $minLng), ); $this->assign_by_ref('center', $center); @@ -310,7 +312,8 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { $this->assign('allowRegistration', $allowRegistration); $session = CRM_Core_Session::singleton(); - $params = array('contact_id' => $session->get('userID'), + $params = array( + 'contact_id' => $session->get('userID'), 'event_id' => CRM_Utils_Array::value('id', $values['event']), 'role_id' => CRM_Utils_Array::value('default_role_id', $values['event']), ); diff --git a/CRM/Event/Page/ManageEvent.php b/CRM/Event/Page/ManageEvent.php index 82a5105208..f69d7070f0 100644 --- a/CRM/Event/Page/ManageEvent.php +++ b/CRM/Event/Page/ManageEvent.php @@ -211,7 +211,8 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page { } if (!$this->_isTemplate && $id) { - $breadCrumb = array(array('title' => ts('Manage Events'), + $breadCrumb = array(array( + 'title' => ts('Manage Events'), 'url' => CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1'), )); CRM_Utils_System::appendBreadCrumb($breadCrumb); diff --git a/CRM/Logging/ReportDetail.php b/CRM/Logging/ReportDetail.php index 91b1736c16..232d9a8dc7 100644 --- a/CRM/Logging/ReportDetail.php +++ b/CRM/Logging/ReportDetail.php @@ -72,13 +72,17 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form { CRM_Utils_System::resetBreadCrumb(); $breadcrumb = array( - array('title' => ts('Home'), + array( + 'title' => ts('Home'), 'url' => CRM_Utils_System::url()), - array('title' => ts('CiviCRM'), + array( + 'title' => ts('CiviCRM'), 'url' => CRM_Utils_System::url('civicrm', 'reset=1')), - array('title' => ts('View Contact'), + array( + 'title' => ts('View Contact'), 'url' => CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$this->cid}")), - array('title' => ts('Search Results'), + array( + 'title' => ts('Search Results'), 'url' => CRM_Utils_System::url('civicrm/contact/search', "force=1")), ); CRM_Utils_System::appendBreadCrumb($breadcrumb); @@ -114,7 +118,8 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form { /** * @param bool $applyLimit */ - public function buildQuery($applyLimit = TRUE) {} + public function buildQuery($applyLimit = TRUE) { + } /** * @param $sql diff --git a/CRM/Mailing/Selector/Event.php b/CRM/Mailing/Selector/Event.php index fec0d400d6..d84e51caa7 100644 --- a/CRM/Mailing/Selector/Event.php +++ b/CRM/Mailing/Selector/Event.php @@ -435,7 +435,8 @@ class CRM_Mailing_Selector_Event extends CRM_Core_Selector_Base implements CRM_C * @return string * name of the file */ - public function getExportFileName($output = 'csv') {} + public function getExportFileName($output = 'csv') { + } public function eventToTitle() { static $events = NULL; diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 595f84ca51..242b2ba7bb 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -334,7 +334,8 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { $element = &$qf->add('text', $elementName, $label, array_merge($extra, - array('price' => json_encode(array($optionKey, $priceVal)), + array( + 'price' => json_encode(array($optionKey, $priceVal)), 'size' => '4', ) ), @@ -395,7 +396,8 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { $count = CRM_Utils_Array::value('count', $opt, ''); $max_value = CRM_Utils_Array::value('max_value', $opt, ''); $priceVal = implode($seperator, array($opt[$valueFieldName] + $taxAmount, $count, $max_value)); - $extra = array('price' => json_encode(array($elementName, $priceVal)), + $extra = array( + 'price' => json_encode(array($elementName, $priceVal)), 'data-amount' => $opt[$valueFieldName], 'data-currency' => $currencyName, ); @@ -530,7 +532,8 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { } $priceVal = implode($seperator, array($opt[$valueFieldName] + $taxAmount, $count, $max_value)); $check[$opId] = &$qf->createElement('checkbox', $opt['id'], NULL, $opt['label'], - array('price' => json_encode(array($opt['id'], $priceVal)), + array( + 'price' => json_encode(array($opt['id'], $priceVal)), 'data-amount' => $opt[$valueFieldName], 'data-currency' => $currencyName, ) diff --git a/CRM/SMS/Form/Group.php b/CRM/SMS/Form/Group.php index a14f65b511..5b0b66af95 100644 --- a/CRM/SMS/Form/Group.php +++ b/CRM/SMS/Form/Group.php @@ -166,7 +166,8 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { $this->addFormRule(array('CRM_SMS_Form_Group', 'formRule')); $buttons = array( - array('type' => 'next', + array( + 'type' => 'next', 'name' => ts('Next'), 'spacing' => '                 ', 'isDefault' => TRUE, diff --git a/CRM/SMS/Form/Schedule.php b/CRM/SMS/Form/Schedule.php index b1e5bc3da7..96a55bd12a 100644 --- a/CRM/SMS/Form/Schedule.php +++ b/CRM/SMS/Form/Schedule.php @@ -83,7 +83,8 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form { $this->addFormRule(array('CRM_SMS_Form_Schedule', 'formRule'), $this); $buttons = array( - array('type' => 'back', + array( + 'type' => 'back', 'name' => ts('Previous'), ), array( diff --git a/CRM/SMS/Form/Upload.php b/CRM/SMS/Form/Upload.php index 23fae2b5b5..95b0842057 100644 --- a/CRM/SMS/Form/Upload.php +++ b/CRM/SMS/Form/Upload.php @@ -170,7 +170,8 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { $this->addFormRule(array('CRM_SMS_Form_Upload', 'formRule'), $this); $buttons = array( - array('type' => 'back', + array( + 'type' => 'back', 'name' => ts('Previous'), ), array( @@ -314,7 +315,8 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { $mailing->find(TRUE); $session = CRM_Core_Session::singleton(); - $values = array('contact_id' => $session->get('userID'), + $values = array( + 'contact_id' => $session->get('userID'), 'version' => 3, ); require_once 'api/api.php'; diff --git a/CRM/SMS/Page/Provider.php b/CRM/SMS/Page/Provider.php index df8729ab81..c8f8a9060d 100644 --- a/CRM/SMS/Page/Provider.php +++ b/CRM/SMS/Page/Provider.php @@ -106,7 +106,8 @@ class CRM_SMS_Page_Provider extends CRM_Core_Page_Basic { public function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - SMS Provider')); - $breadCrumb = array(array('title' => ts('SMS Provider'), + $breadCrumb = array(array( + 'title' => ts('SMS Provider'), 'url' => CRM_Utils_System::url('civicrm/admin/sms/provider', 'reset=1' ), diff --git a/api/v3/Contact.php b/api/v3/Contact.php index d5f536664b..d96f1dd9ce 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -316,8 +316,7 @@ function civicrm_api3_contact_delete($params) { * @throws API_Exception * @throws CiviCRM_API3_Exception */ -function _civicrm_api3_contact_check_params(&$params, $dupeCheck = TRUE, $dupeErrorArray = FALSE, $obsoletevalue = TRUE, $dedupeRuleGroupID = NULL) -{ +function _civicrm_api3_contact_check_params(&$params, $dupeCheck = TRUE, $dupeErrorArray = FALSE, $obsoletevalue = TRUE, $dedupeRuleGroupID = NULL) { switch (strtolower(CRM_Utils_Array::value('contact_type', $params))) { case 'household': diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index d091e64346..3135ac2e09 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -480,7 +480,8 @@ function civicrm_api3_mailing_send_test($params) { if (!$contactId) { //create new contact. $contact = civicrm_api3('Contact', 'create', - array('contact_type' => 'Individual', + array( + 'contact_type' => 'Individual', 'email' => $email, 'api.Email.get' => array('return' => 'id'), ) @@ -489,7 +490,8 @@ function civicrm_api3_mailing_send_test($params) { $emailId = $contact['values'][$contactId]['api.Email.get']['id']; } civicrm_api3('MailingEventQueue', 'create', - array('job_id' => $job['id'], + array( + 'job_id' => $job['id'], 'email_id' => $emailId, 'contact_id' => $contactId, ) diff --git a/tests/phpunit/CRM/Batch/Form/EntryTest.php b/tests/phpunit/CRM/Batch/Form/EntryTest.php index 8a7a933359..734ce89f05 100644 --- a/tests/phpunit/CRM/Batch/Form/EntryTest.php +++ b/tests/phpunit/CRM/Batch/Form/EntryTest.php @@ -126,8 +126,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase { * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - public function tearDown() - { + public function tearDown() { $this->quickCleanUpFinancialEntities(); $this->relationshipTypeDelete($this->_relationshipTypeId); if ($this->callAPISuccessGetCount('membership', array('id' => $this->_membershipTypeID))) { diff --git a/tests/phpunit/CRM/Contact/BAO/QueryTest.php b/tests/phpunit/CRM/Contact/BAO/QueryTest.php index 19a8e71f68..e4fb4130fe 100644 --- a/tests/phpunit/CRM/Contact/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Contact/BAO/QueryTest.php @@ -141,8 +141,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase { * We are retrieving primary here - checking the actual sql seems super prescriptive - but since the massive query object has * so few tests detecting any change seems good here :-) */ - public function testSearchProfilePrimaryCityCRM14263() - { + public function testSearchProfilePrimaryCityCRM14263() { $contactID = $this->individualCreate(); CRM_Core_Config::singleton()->defaultSearchProfileID = 1; $this->callAPISuccess('address', 'create', array('contact_id' => $contactID, 'city' => 'Cool City', 'location_type_id' => 1));