From 2241036a1adf3cf03fdcc86f4328ad98f89f6b59 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 8 Jan 2015 19:53:23 -0800 Subject: [PATCH] INFRA-132 - Fix misc oddball syntax --- Civi/Core/Transaction/Frame.php | 2 +- Civi/Core/Transaction/Manager.php | 2 +- api/v3/Generic.php | 2 +- api/v3/GroupContact.php | 4 ++-- api/v3/Job.php | 10 +++++----- api/v3/Mailing.php | 6 +++--- api/v3/Membership.php | 2 +- api/v3/MembershipPayment.php | 2 +- api/v3/MembershipStatus.php | 2 +- api/v3/Profile.php | 3 +-- api/v3/utils.php | 4 ++-- install/template.css | 16 ++++++++-------- .../moduletest.php | 10 +++++----- tests/phpunit/CRM/Batch/Form/EntryTest.php | 4 ++-- tests/phpunit/CRM/Utils/API/ReloadOptionTest.php | 2 +- tests/phpunit/CRM/Utils/HtmlToTextTest.php | 2 +- tests/phpunit/CiviTest/civicrm.settings.dist.php | 3 ++- tests/phpunit/WebTest/Mailing/MailingTest.php | 2 +- tests/phpunit/api/v3/SyntaxConformanceTest.php | 2 +- tests/qunit/profile-editor/test.js | 2 +- 20 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Civi/Core/Transaction/Frame.php b/Civi/Core/Transaction/Frame.php index 153ab5e683..0bc95c0527 100644 --- a/Civi/Core/Transaction/Frame.php +++ b/Civi/Core/Transaction/Frame.php @@ -120,7 +120,7 @@ class Frame { } /** - * @param type $newState + * @param int $newState * @void */ public function finish($newState = self::F_DONE) { diff --git a/Civi/Core/Transaction/Manager.php b/Civi/Core/Transaction/Manager.php index 4efb1c0a54..f7ff620095 100644 --- a/Civi/Core/Transaction/Manager.php +++ b/Civi/Core/Transaction/Manager.php @@ -154,7 +154,7 @@ class Manager { */ public function getBaseFrame() { if (empty($this->frames)) return NULL; - return $this->frames[count($this->frames)-1]; + return $this->frames[count($this->frames) - 1]; } /** diff --git a/api/v3/Generic.php b/api/v3/Generic.php index 00ce07b107..ee41baa8a8 100644 --- a/api/v3/Generic.php +++ b/api/v3/Generic.php @@ -17,7 +17,7 @@ * - version: string * - function: callback (mixed) * - params: array, varies - * @return array API success object + * @return array API success object */ function civicrm_api3_generic_getfields($apiRequest) { static $results = array(); diff --git a/api/v3/GroupContact.php b/api/v3/GroupContact.php index f6e5aa2b97..95a48a79ba 100644 --- a/api/v3/GroupContact.php +++ b/api/v3/GroupContact.php @@ -187,7 +187,7 @@ function _civicrm_api3_group_contact_common($params, $op = 'Added') { $tracking = CRM_Utils_Array::value('tracking', $params); if ($op == 'Added' || $op == 'Pending') { - $extraReturnValues= array( + $extraReturnValues = array( 'total_count' => 0, 'added' => 0, 'not_added' => 0, @@ -205,7 +205,7 @@ function _civicrm_api3_group_contact_common($params, $op = 'Added') { } } else { - $extraReturnValues= array( + $extraReturnValues = array( 'total_count' => 0, 'removed' => 0, 'not_removed' => 0, diff --git a/api/v3/Job.php b/api/v3/Job.php index 481e47f6ef..fff53bc31c 100644 --- a/api/v3/Job.php +++ b/api/v3/Job.php @@ -568,12 +568,12 @@ function civicrm_api3_job_run_payment_cron($params) { * @access public */ function civicrm_api3_job_cleanup($params) { - $session = CRM_Utils_Array::value('session' , $params, true ); + $session = CRM_Utils_Array::value('session', $params, true ); $tempTable = CRM_Utils_Array::value('tempTables', $params, true ); - $jobLog = CRM_Utils_Array::value('jobLog' , $params, true ); - $prevNext = CRM_Utils_Array::value('prevNext' , $params, true ); - $dbCache = CRM_Utils_Array::value('dbCache' , $params, false); - $memCache = CRM_Utils_Array::value('memCache' , $params, false); + $jobLog = CRM_Utils_Array::value('jobLog', $params, true ); + $prevNext = CRM_Utils_Array::value('prevNext', $params, true ); + $dbCache = CRM_Utils_Array::value('dbCache', $params, false); + $memCache = CRM_Utils_Array::value('memCache', $params, false); if ($session || $tempTable || $prevNext) { CRM_Core_BAO_Cache::cleanup($session, $tempTable, $prevNext); diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index a6029c757f..f93f458adb 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -75,15 +75,15 @@ function civicrm_api3_mailing_get_token($params) { $tokens = CRM_Core_SelectValues::contactTokens(); switch ($params['usage']) { - case 'Mailing' : + case 'Mailing': $tokens = array_merge(CRM_Core_SelectValues::mailingTokens(), $tokens); break; - case 'ScheduleEventReminder' : + case 'ScheduleEventReminder': $tokens = array_merge(CRM_Core_SelectValues::activityTokens(), $tokens); $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens); $tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens); break; - case 'ManageEventScheduleReminder' : + case 'ManageEventScheduleReminder': $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens); break; } diff --git a/api/v3/Membership.php b/api/v3/Membership.php index 742e4236ea..180e78d926 100644 --- a/api/v3/Membership.php +++ b/api/v3/Membership.php @@ -182,7 +182,7 @@ function _civicrm_api3_membership_get_spec(&$params) { * This api will return the membership records for the contacts * having membership based on the relationship with the direct members. * - * @param Array $params + * @param array $params * Key/value pairs for contact_id and some. * options affecting the desired results; has legacy support * for just passing the contact_id itself as the argument diff --git a/api/v3/MembershipPayment.php b/api/v3/MembershipPayment.php index 8111ade36b..bd1b8f90b8 100644 --- a/api/v3/MembershipPayment.php +++ b/api/v3/MembershipPayment.php @@ -71,7 +71,7 @@ function _civicrm_api3_membership_payment_create_spec(&$params) { * Input parameters. * * @return array array of properties, if error an array with an error id and error message - * @example MembershipPaymentGet + * @example MembershipPaymentGet * {@getfields MembershipPayment_get} * @access public */ diff --git a/api/v3/MembershipStatus.php b/api/v3/MembershipStatus.php index aa2646a1c4..675773d644 100644 --- a/api/v3/MembershipStatus.php +++ b/api/v3/MembershipStatus.php @@ -75,7 +75,7 @@ function civicrm_api3_membership_status_get($params) { * This api is used for updating an existing membership status. * Required parameters : id of a membership status * - * @param Array $params + * @param array $params * An associative array of name/value property values of civicrm_membership_status. * @deprecated - should just use create * diff --git a/api/v3/Profile.php b/api/v3/Profile.php index ffa64e8b3a..fb7489d242 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -486,9 +486,8 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) { * 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state. * @param $is_flush * - * @return + * @return array */ - function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour = 1, $is_flush) { static $profileFields = array(); if ($is_flush) { diff --git a/api/v3/utils.php b/api/v3/utils.php index 70858805b2..76d4fb1580 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -446,7 +446,7 @@ function _civicrm_api3_store_values(&$fields, &$params, &$values) { * @param bool $getCount * Are we just after the count. * - * @return + * @return array */ function _civicrm_api3_get_using_query_object($entity, $params, $additional_options = array(), $getCount = NULL) { @@ -1125,7 +1125,7 @@ function formatCheckBoxField(&$checkboxFieldValue, $customFieldLabel, $entity) { * * @daoName string DAO to check params agains * - * @return bool + * @return bool * Sshould the missing fields be returned as an array (core error created as default) * true if all fields present, depending on $result a core error is created of an array of missing fields is returned * @access public diff --git a/install/template.css b/install/template.css index bfe0394a2e..ec1e5ddace 100644 --- a/install/template.css +++ b/install/template.css @@ -1,12 +1,12 @@ body { - background: #EEE; + background: #eee; } #All { font-family: Arial, sans-serif; width: auto; margin: 0.5em auto; padding: 1em; - border: 1px #CCC solid; + border: 1px #ccc solid; border-radius: 10px; background: #fff; max-width: 1200px; @@ -36,35 +36,35 @@ label span { } .testResults .error td { - background-color: #C00; + background-color: #c00; border: 1px #700 solid; color: white; } p.error { padding: 0.5em; - background-color: #C00; + background-color: #c00; border: 1px #700 solid; color: white; clear: both; } p.warning { padding: 0.5em; - background-color: #E70; + background-color: #e70; border: 1px #A70 solid; color: white; clear: both; } p.good { padding: 0.5em; - background-color: #0C0; + background-color: #0c0; border: 1px #070 solid; color: white; clear: both; } p.error a { - color: #CCF; + color: #ccf; } .testResults { @@ -72,7 +72,7 @@ p.error a { font-size: 80%; } .testResults td { - border: 1px #CCC solid; + border: 1px #ccc solid; width: 400px; padding: 0.2em; } diff --git a/tests/extensions/test.extension.manager.moduletest/moduletest.php b/tests/extensions/test.extension.manager.moduletest/moduletest.php index 5e92a003bc..908a4d37b3 100644 --- a/tests/extensions/test.extension.manager.moduletest/moduletest.php +++ b/tests/extensions/test.extension.manager.moduletest/moduletest.php @@ -1,35 +1,35 @@ callAPISuccess('contribution', 'get', array('return' => 'total_amount')); $this->assertEquals(3, $result['count']); foreach ($result['values'] as $contribution) { - $this-> assertEquals($this->callAPISuccess('line_item', 'getvalue', array( + $this->assertEquals($this->callAPISuccess('line_item', 'getvalue', array( 'contribution_id' => $contribution['id'], 'return' => 'line_total', @@ -184,7 +184,7 @@ class CRM_Batch_Form_EntryTest extends CiviUnitTestCase { $result = $this->callAPISuccess('contribution', 'get', array('return' => 'total_amount')); $this->assertEquals(2, $result['count']); foreach ($result['values'] as $contribution) { - $this-> assertEquals($this->callAPISuccess('line_item', 'getvalue', array( + $this->assertEquals($this->callAPISuccess('line_item', 'getvalue', array( 'contribution_id' => $contribution['id'], 'return' => 'line_total', diff --git a/tests/phpunit/CRM/Utils/API/ReloadOptionTest.php b/tests/phpunit/CRM/Utils/API/ReloadOptionTest.php index 9a22155784..3540d2fa55 100644 --- a/tests/phpunit/CRM/Utils/API/ReloadOptionTest.php +++ b/tests/phpunit/CRM/Utils/API/ReloadOptionTest.php @@ -87,7 +87,7 @@ class CRM_Utils_API_ReloadOptionTest extends CiviUnitTestCase { } /** - * Implementation of hook_civicrm_post used with all our test cases + * An implementation of hook_civicrm_post used with all our test cases. * * @param $op * @param string $objectName diff --git a/tests/phpunit/CRM/Utils/HtmlToTextTest.php b/tests/phpunit/CRM/Utils/HtmlToTextTest.php index 8994ba77d5..0e64445bc1 100644 --- a/tests/phpunit/CRM/Utils/HtmlToTextTest.php +++ b/tests/phpunit/CRM/Utils/HtmlToTextTest.php @@ -7,7 +7,7 @@ require_once 'CiviTest/CiviUnitTestCase.php'; */ class CRM_Utils_HtmlToTextTest extends CiviUnitTestCase { protected $_testInput = array( - '

' => '', // empty test + '

' => '', // empty test '

This is a paragraph with Bold and italics diff --git a/tests/phpunit/CiviTest/civicrm.settings.dist.php b/tests/phpunit/CiviTest/civicrm.settings.dist.php index e0647100cf..24ed925dd3 100644 --- a/tests/phpunit/CiviTest/civicrm.settings.dist.php +++ b/tests/phpunit/CiviTest/civicrm.settings.dist.php @@ -130,7 +130,8 @@ set_include_path($include_path); if (function_exists('variable_get') && variable_get('clean_url', '0') != '0') { define('CIVICRM_CLEANURL', 1); -} else { +} +else { define('CIVICRM_CLEANURL', 0); } diff --git a/tests/phpunit/WebTest/Mailing/MailingTest.php b/tests/phpunit/WebTest/Mailing/MailingTest.php index f70eeabb02..f820f8accc 100644 --- a/tests/phpunit/WebTest/Mailing/MailingTest.php +++ b/tests/phpunit/WebTest/Mailing/MailingTest.php @@ -515,7 +515,7 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase { else { $this->clickLink("xpath=//fieldset/legend[text()='Delivery Summary']/../table//tr[td/a[text()='{$key}']]/descendant::td[3]/span/a[2][text()='Advanced Search']"); } - $this-> _verifyCriteria($key, $dataToCheck, $entity); + $this->_verifyCriteria($key, $dataToCheck, $entity); } } } diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index d5c61f15a5..b3d310cc4c 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -1262,7 +1262,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { $this->assertTrue(is_integer($baoObj->id), 'check first id'); $this->deletableTestObjects[$baoString][] = $baoObj->id; $baos[] = $baoObj; - $i ++; + $i++; } return $baos; } diff --git a/tests/qunit/profile-editor/test.js b/tests/qunit/profile-editor/test.js index 0fcec95b6e..dbdcb766a7 100644 --- a/tests/qunit/profile-editor/test.js +++ b/tests/qunit/profile-editor/test.js @@ -41,7 +41,7 @@ var cases = [ ]; _.each(cases, function(caseDetails, caseIndex) { - test("#"+caseIndex+": With group_type="+caseDetails.group_type, function() { + test("#" + caseIndex + ": With group_type=" + caseDetails.group_type, function() { var ufGroupModel = new CRM.UF.UFGroupModel({ group_type: caseDetails.group_type }); -- 2.25.1