clean up for batch-20
authoryashodha <yashodha.chaku@webaccessglobal.com>
Mon, 19 Jan 2015 08:13:59 +0000 (13:43 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Mon, 19 Jan 2015 08:13:59 +0000 (13:43 +0530)
81 files changed:
CRM/Activity/Form/Task/FileOnCase.php
CRM/Activity/Form/Task/PickProfile.php
CRM/Admin/Form/MailSettings.php
CRM/Admin/Form/Setting/Smtp.php
CRM/Admin/Page/JobLog.php
CRM/Admin/Page/Options.php
CRM/Admin/Page/ParticipantStatusType.php
CRM/Admin/Page/PaymentProcessor.php
CRM/Campaign/BAO/Campaign.php
CRM/Campaign/BAO/Petition.php
CRM/Campaign/Form/Petition.php
CRM/Campaign/Form/Search/Survey.php
CRM/Campaign/Page/DashBoard.php
CRM/Campaign/Page/Petition/Confirm.php
CRM/Contact/Form/Edit/CommunicationPreferences.php
CRM/Contact/Form/Merge.php
CRM/Contact/Form/Search/Basic.php
CRM/Contact/Form/Search/Custom/Basic.php
CRM/Contact/Form/Search/Custom/EventAggregate.php
CRM/Contact/Form/Search/Custom/RandomSegment.php
CRM/Contact/Form/Task/EmailCommon.php
CRM/Contribute/BAO/ContributionSoft.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Contribute/Form/Contribution/ThankYou.php
CRM/Contribute/Form/ContributionBase.php
CRM/Contribute/Form/ContributionPage/Custom.php
CRM/Contribute/Form/ContributionPage/TabHeader.php
CRM/Contribute/Form/Task/Delete.php
CRM/Contribute/Form/Task/PDF.php
CRM/Contribute/Form/Task/PickProfile.php
CRM/Contribute/Form/UpdateBilling.php
CRM/Contribute/Import/Form/MapField.php
CRM/Core/CommunityMessages.php
CRM/Core/Component/Info.php
CRM/Core/ManagedEntities.php
CRM/Core/Smarty/plugins/function.isValueChange.php
CRM/Core/Smarty/plugins/modifier.crmNumberFormat.php
CRM/Core/StateMachine.php
CRM/Custom/Form/ChangeFieldType.php
CRM/Custom/Import/Parser.php
CRM/Custom/Page/Group.php
CRM/Dedupe/BAO/Rule.php
CRM/Dedupe/BAO/RuleGroup.php
CRM/Dedupe/Finder.php
CRM/Event/Cart/BAO/EventInCart.php
CRM/Event/Form/EventFees.php
CRM/Event/Form/ManageEvent.php
CRM/Event/Form/ManageEvent/Fee.php
CRM/Event/Form/ManageEvent/Location.php
CRM/Event/Form/ManageEvent/TabHeader.php
CRM/Mailing/Event/BAO/Bounce.php
CRM/Queue/Task.php
CRM/Report/Form/Contact/CurrentEmployer.php
CRM/Report/Form/Contribute/HouseholdSummary.php
CRM/Report/Form/Contribute/PCP.php
CRM/Report/Form/Mailing/Summary.php
CRM/Report/Form/Member/Summary.php
CRM/SMS/Form/Group.php
CRM/Utils/Address.php
CRM/Utils/Address/BatchUpdate.php
api/v3/ActionSchedule.php
api/v3/PaymentProcessor.php
bin/deprecated/UpdateMembershipRecord.php
bin/deprecated/UpdateMembershipReminderDate.php
bin/deprecated/UpdatePledgeRecord.php
bin/deprecated/action.cronjob.php
bin/migrate/move.php
distmaker/utils/joomlaxml.php
settings/Event.setting.php
tests/phpunit/CRM/Core/AllTests.php
tests/phpunit/CRM/Member/Form/AllTests.php
tests/phpunit/CRM/Utils/HookTest.php
tests/phpunit/Civi/API/RequestTest.php
tests/phpunit/Civi/API/Subscriber/DynamicFKAuthorizationTest.php
tests/phpunit/WebTest/Case/ActivityToCaseTest.php
tests/phpunit/WebTest/Case/AddCaseTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php
tests/phpunit/api/v3/AllTests.php
tests/phpunit/api/v3/GrantTest.php
tests/phpunit/api/v3/GroupContactTest.php
tests/phpunit/api/v3/UtilsTest.php

index a3f5663e3bc849d83f1238fedcf151a2985949a8..a224386f47a3e9f380d475fea79e741417f76db6 100644 (file)
@@ -94,7 +94,6 @@ class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
    *
    * @return void
    */
-
   public function postProcess() {
     $formparams = $this->exportValues();
     $caseId = $formparams['unclosed_case_id'];
@@ -131,7 +130,7 @@ class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
       else {
         CRM_Core_Session::setStatus(ts('Not permitted to file activity %1 %2.', array(
             1 => empty($defaults['subject']) ? '' : $defaults['subject'],
-            2 => $defaults['activity_date_time']
+            2 => $defaults['activity_date_time'],
           )),
           ts("Error"), "error");
       }
index e3a7ba962b5697bed666e7300c05dbc0ac002bc5..ee444ea43eb686459554b62b9bcbdfb2a27edede 100755 (executable)
@@ -76,7 +76,7 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
     if (count($this->_activityHolderIds) > $this->_maxActivities) {
       CRM_Core_Session::setStatus(ts("The maximum number of Activities you can select for Batch Update is %1. You have selected %2. Please select fewer Activities from your search results and try again.", array(
             1 => $this->_maxActivities,
-            2 => count($this->_activityHolderIds)
+            2 => count($this->_activityHolderIds),
           )), ts('Maximum Exceeded'), 'error');
       $validate = TRUE;
     }
@@ -129,7 +129,7 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
 
     $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'),
       array(
-        '' => ts('- select profile -')
+        '' => ts('- select profile -'),
       ) + $profiles, TRUE
     );
     $this->addDefaultButtons(ts('Continue'));
index 0d45fe10fa2eb37f1a0ad54e6746d240de83d8c4..9f4e085a7584c14c18b2e4616f77efd67641ba00 100644 (file)
@@ -156,7 +156,7 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form {
     foreach ($fields as $f) {
       if (in_array($f, array(
         'is_default',
-        'is_ssl'
+        'is_ssl',
       ))) {
         $params[$f] = CRM_Utils_Array::value($f, $formValues, FALSE);
       }
index cbb44aa8c2653183636905f6eb11e72435e4f98f..d6626d7106a344c96ab83a12210a34d104c3f7ed 100644 (file)
@@ -120,7 +120,7 @@ class CRM_Admin_Form_Setting_Smtp extends CRM_Admin_Form_Setting {
         $from = '"' . $domainEmailName . '" <' . $domainEmailAddress . '>';
         $testMailStatusMsg = ts('Sending test email. FROM: %1 TO: %2.<br />', array(
             1 => $domainEmailAddress,
-            2 => $toEmail
+            2 => $toEmail,
           ));
 
         $params = array();
index 366d2c58fe776e7626eddac9e5f681e3c2186c18..df94a88183cf1ddf1ba8cfdd905012403c8dece5 100644 (file)
@@ -83,7 +83,7 @@ class CRM_Admin_Page_JobLog extends CRM_Core_Page_Basic {
         'url' => CRM_Utils_System::url('civicrm/admin',
           'reset=1'
         ),
-      )
+      ),
     );
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
     return parent::run();
@@ -104,8 +104,7 @@ class CRM_Admin_Page_JobLog extends CRM_Core_Page_Basic {
 
     $jobName = NULL;
     if ($jid) {
-      $jobName =
-        CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Job', $jid);
+      $jobName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Job', $jid);
     }
 
     $this->assign('jobName', $jobName);
index 49d42dab9ee5d5628727c99e2c6a92a9e62e9f44..1eba4b5bc3b9297f62e47821a5073e7dcb5f7dbd 100644 (file)
@@ -125,7 +125,7 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic {
           'url' => CRM_Utils_System::url('civicrm/admin/access',
             'reset=1'
           ),
-        )
+        ),
       );
       CRM_Utils_System::appendBreadCrumb($breadCrumb);
     }
@@ -210,7 +210,7 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic {
             'url' => 'civicrm/contact/search/custom',
             'qs' => 'reset=1&csid=%%value%%',
             'title' => ts('Run %1', array(1 => self::$_gName)),
-          )
+          ),
         );
         self::$_links = $runLink + self::$_links;
       }
index b4d931f6a18937a69086efdd04797113464f76b7..8a64f30d9249b56b4584cb4e3bae61106262a3ba 100644 (file)
@@ -80,7 +80,7 @@ class CRM_Admin_Page_ParticipantStatusType extends CRM_Core_Page_Basic {
   public function browse() {
     $statusTypes = array();
 
-    $dao = new CRM_Event_DAO_ParticipantStatusType;
+    $dao = new CRM_Event_DAO_ParticipantStatusType();
     $dao->orderBy('weight');
     $dao->find();
 
@@ -92,7 +92,7 @@ class CRM_Admin_Page_ParticipantStatusType extends CRM_Core_Page_Basic {
       'Awaiting approval',
       'Pending from waitlist',
       'Pending from approval',
-      'Rejected'
+      'Rejected',
     );
 
     while ($dao->fetch()) {
index b329ea11e7e1b3943e3de4ee37d4ef98ac21e42a..620d497aa1638a6aa15598bc0d6968656c846e4b 100644 (file)
@@ -106,7 +106,7 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic {
     //CRM-15546
     $paymentProcessorTypes = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_PaymentProcessor', 'payment_processor_type_id', array(
         'labelColumn' => 'name',
-        'flip' => 1
+        'flip' => 1,
       ));
     $this->assign('defaultPaymentProcessorType', $paymentProcessorTypes['PayPal']);
     $breadCrumb = array(
@@ -115,7 +115,7 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic {
         'url' => CRM_Utils_System::url('civicrm/admin',
           'reset=1'
         ),
-      )
+      ),
     );
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
     return parent::run();
index 940a04e6df970bb9600bf8aa99fa51e04873ff9c..b723e3713467421d153ea9e3afeaf28eba78c75f 100644 (file)
@@ -48,7 +48,7 @@ class CRM_Campaign_BAO_Campaign extends CRM_Campaign_DAO_Campaign {
    */
   public static function create(&$params) {
     if (empty($params)) {
-      return;
+      return NULL;
     }
 
     if (!(CRM_Utils_Array::value('id', $params))) {
index 30136a430ec9fa4e661e4ab8ce088cee26f1081d..53fc7f392bf6b027d0b7e0a09e4b7e5e429affee 100644 (file)
@@ -177,7 +177,7 @@ SELECT  petition.id                         as id,
    */
   public function createSignature(&$params) {
     if (empty($params)) {
-      return;
+      return NULL;
     }
 
     if (!isset($params['sid'])) {
@@ -637,7 +637,6 @@ AND         tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
             )
           ) . "@$emailDomain";
 
-
         $confirmUrl = CRM_Utils_System::url('civicrm/petition/confirm',
           "reset=1&cid={$se->contact_id}&sid={$se->id}&h={$se->hash}&a={$params['activityId']}&pid={$params['sid']}",
           TRUE
index 973b6e29b9ae5694fdabd0f3c20c7caf3ba3a3b9..10584fdb44c9c9c9b31b5995ed5a84d828c5c1b5 100644 (file)
@@ -122,8 +122,6 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form {
    * Set default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
-   * @param null
-   *
    * @return array
    *   array of default values
    */
@@ -199,7 +197,7 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form {
     // custom group id
     $this->add('select', 'contact_profile_id', ts('Contact Profile'),
       array(
-        '' => ts('- select -')
+        '' => ts('- select -'),
       ) + $customContactProfiles, TRUE
     );
 
index 0b6195b2ec1334f4f8c069b2a8b3036ad1d0d0b8..c0cca939b0326a80a6fd592efe6add58a8866d99 100755 (executable)
@@ -50,7 +50,7 @@ class CRM_Campaign_Form_Search_Survey extends CRM_Core_Form {
    *
    * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     $this->_search = CRM_Utils_Array::value('search', $_GET);
     $this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE, FALSE);
     $this->_searchTab = CRM_Utils_Request::retrieve('type', 'String', $this, FALSE, 'survey');
@@ -86,7 +86,7 @@ class CRM_Campaign_Form_Search_Survey extends CRM_Core_Form {
     $surveyTypes = CRM_Campaign_BAO_Survey::getSurveyActivityType();
     $this->add('select', 'activity_type_id',
       ts('Activity Type'), array(
-        '' => ts('- select -')
+        '' => ts('- select -'),
       ) + $surveyTypes
     );
     $this->set('surveyTypes', $surveyTypes);
index eb0d701606886cd8d21d72cd9451b4006456b9c9..b92cee3fc5fef8fff273392fc083121848a5538a 100644 (file)
@@ -475,7 +475,7 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page {
       ->addSetting(array(
         'tabSettings' => array(
           'active' => strtolower(CRM_Utils_Array::value('subPage', $_GET, 'campaign')),
-        )
+        ),
       ));
   }
 
index e1a78ee0748a5b1174327d38967dea1943b6e0e1..5a513231e6f8542f71d43f88992e71d261c6a39b 100644 (file)
@@ -103,7 +103,7 @@ class CRM_Campaign_Page_Petition_Confirm extends CRM_Core_Page {
    * @param int $activity_id
    * @param int $petition_id
    *
-   * @return boolean
+   * @return bool
    *   True on success
    */
   public static function confirm($contact_id, $subscribe_id, $hash, $activity_id, $petition_id) {
index 4991df9072e5df582f3cf7b3a5b16abda0a34c42..c65921502c3fcd1df7b306ad1d5547decedcb7a7 100644 (file)
@@ -56,7 +56,6 @@ class CRM_Contact_Form_Edit_CommunicationPreferences {
     // since the pcm - preferred comminication method is logically
     // grouped hence we'll use groups of HTML_QuickForm
 
-
     // checkboxes for DO NOT phone, email, mail
     // we take labels from SelectValues
     $privacy = $commPreff = $commPreference = array();
@@ -118,7 +117,7 @@ class CRM_Contact_Form_Edit_CommunicationPreferences {
       if (!empty($greetingTokens)) {
         $form->addElement('select', $fields['field'], $fields['label'],
           array(
-            '' => ts('- select -')
+            '' => ts('- select -'),
           ) + $greetingTokens
         );
         //custom addressee
@@ -187,8 +186,7 @@ class CRM_Contact_Form_Edit_CommunicationPreferences {
     if ($form->_action & CRM_Core_Action::ADD) {
       foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
         if (empty($defaults[$greeting . '_id'])) {
-          if ($defaultGreetingTypeId =
-            CRM_Contact_BAO_Contact_Utils::defaultGreeting($form->_contactType, $greeting)
+          if ($defaultGreetingTypeId = CRM_Contact_BAO_Contact_Utils::defaultGreeting($form->_contactType, $greeting)
           ) {
             $defaults[$greeting . '_id'] = $defaultGreetingTypeId;
           }
index ba367123caef37cadafe0b62fd43f6ec1cb06915..9d0a46df9f2389322b75f887d15edde411522b3d 100644 (file)
@@ -131,7 +131,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     $this->prev = $this->next = NULL;
     foreach (array(
                'prev',
-               'next'
+               'next',
              ) as $position) {
       if (!empty($pos[$position])) {
         if ($pos[$position]['id1'] && $pos[$position]['id2']) {
@@ -282,7 +282,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
       $buttons[] = array(
         'type' => 'done',
         'name' => ts('Merge and View Result'),
-        'icon' => 'circle-check'
+        'icon' => 'circle-check',
       );
     }
 
index 7823d4c21d94936666aa2a207cc21fe5f66e5d4e..fb879abe72dd5004127bbbbc3c06d437d005e18f 100644 (file)
@@ -86,7 +86,7 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search {
           'entity' => 'group_contact',
           'label' => ts('in'),
           'context' => 'search',
-          'placeholder' => ts('- any group -')
+          'placeholder' => ts('- any group -'),
         ));
     }
 
@@ -97,7 +97,7 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search {
             'entity' => 'entity_tag',
             'label' => ts('with'),
             'context' => 'search',
-            'placeholder' => ts('- any tag -')
+            'placeholder' => ts('- any tag -'),
           ));
       }
     }
@@ -243,7 +243,7 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search {
       $this->_formValues['tag'][$tag] = 1;
     }
 
-    return;
+    return NULL;
   }
 
   /**
index e2c7d55d24b280ac3e8f70e27c7f78ec2e14e502..bdeaf51a7d32f66c231aefc60ec5ea543ecd3adc 100644 (file)
@@ -72,7 +72,7 @@ class CRM_Contact_Form_Search_Custom_Basic extends CRM_Contact_Form_Search_Custo
           'city',
           'state_province',
           'postal_code',
-          'country'
+          'country',
         )) && empty($addressOptions[$field])
       ) {
         unset($this->_columns[$name]);
@@ -112,7 +112,7 @@ class CRM_Contact_Form_Search_Custom_Basic extends CRM_Contact_Form_Search_Custo
       $this->_formValues['tag'][$tag] = 1;
     }
 
-    return;
+    return NULL;
   }
 
   /**
@@ -155,7 +155,7 @@ class CRM_Contact_Form_Search_Custom_Basic extends CRM_Contact_Form_Search_Custo
    *
    * @return CRM_Contact_DAO_Contact
    */
-  function all(
+  public function all(
     $offset = 0,
     $rowCount = 0,
     $sort = NULL,
index 1b6ee7ad2840e3939a9639e127c63aedd947073b..b1550153cf29370df59f7ec8e65187489109e571 100644 (file)
@@ -96,7 +96,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea
         'end_date',
         'show_payees',
         'event_type_id',
-        'event_id'
+        'event_id',
       ));
   }
 
@@ -110,7 +110,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea
   /**
    * Construct the search query
    */
-  function all(
+  public function all(
     $offset = 0, $rowcount = 0, $sort = NULL,
     $includeContactIDs = FALSE, $justIDs = FALSE
   ) {
index 2ec16741fcf9d9f6274e70b5c5a549e67bf133e9..d638eb4755af5649384f5b49e320d355d118200a 100644 (file)
@@ -131,7 +131,7 @@ class CRM_Contact_Form_Search_Custom_RandomSegment extends CRM_Contact_Form_Sear
    *
    * @return string
    */
-  function all(
+  public function all(
     $offset = 0, $rowcount = 0, $sort = NULL,
     $includeContactIDs = FALSE, $justIDs = FALSE
   ) {
@@ -376,6 +376,6 @@ class CRM_Contact_Form_Search_Custom_RandomSegment extends CRM_Contact_Form_Sear
     // the temporary tables are dropped automatically
     // so we don't do it here
     // but let mysql clean up
-    return;
+    return NULL;
   }
 }
index 06a8da3243537d38fc4d46cb1133599a3e8fb35e..aeb0976b8acb7627ded69af22262754c2bd8a4d1 100644 (file)
@@ -480,7 +480,7 @@ class CRM_Contact_Form_Task_EmailCommon {
       $count_success = count($form->_toContactDetails);
       CRM_Core_Session::setStatus(ts('One message was sent successfully.', array(
             'plural' => '%count messages were sent successfully.',
-            'count' => $count_success
+            'count' => $count_success,
           )), ts('Message Sent', array('plural' => 'Messages Sent', 'count' => $count_success)), 'success');
     }
 
@@ -501,7 +501,7 @@ class CRM_Contact_Form_Task_EmailCommon {
       $status = '(' . ts('because no email address on file or communication preferences specify DO NOT EMAIL or Contact is deceased or Primary email address is On Hold') . ')<ul><li>' . implode('</li><li>', $not_sent) . '</li></ul>';
       CRM_Core_Session::setStatus($status, ts('One Message Not Sent', array(
             'count' => count($emailsNotSent),
-            'plural' => '%count Messages Not Sent'
+            'plural' => '%count Messages Not Sent',
           )), 'info');
     }
 
index 2e8d49da0ea26e230f7ada0eb91d73af615d265a..b7cd6e02e9c94edb9de2181de196f981326ca04b 100644 (file)
@@ -113,7 +113,7 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
 
     $params = array(
       1 => array($contact_id, 'Integer'),
-      2 => array($isTest, 'Integer')
+      2 => array($isTest, 'Integer'),
     );
 
     $cs = CRM_Core_DAO::executeQuery($query, $params);
@@ -237,8 +237,8 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
    *
    * @param int $contact_id
    *   Contact id.
-   * @param int $isTest
    * @param string $filter
+   * @param int $isTest
    *   Additional filter criteria, later used in where clause.
    *
    * @return array
index 43105ba5fb02f4e2e6ea8af7d92346f2eac8b775..ec4aa8b28d9e8fdf9aafdc5b4743642c3b7a00dc 100644 (file)
@@ -840,6 +840,9 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
       if (!empty($dupeParams['onbehalf'])) {
         unset($dupeParams['onbehalf']);
       }
+      if (!empty($dupeParams['honor'])) {
+        unset($dupeParams['honor']);
+      }
 
       $dedupeParams = CRM_Dedupe_Finder::formatParams($dupeParams, 'Individual');
       $dedupeParams['check_permission'] = FALSE;
index b1dafd2d17e35dabbad2b5f7bd7601ed97d185de..0823aac7c4c29bc071c198b7a82266da8c8f4537 100644 (file)
@@ -156,7 +156,7 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont
                  'pcp_display_in_roll',
                  'pcp_is_anonymous',
                  'pcp_roll_nickname',
-                 'pcp_personal_note'
+                 'pcp_personal_note',
                ) as $val) {
         if (!empty($this->_params[$val])) {
           $this->assign($val, $this->_params[$val]);
@@ -242,7 +242,7 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont
         elseif (in_array($name, array(
               'addressee',
               'email_greeting',
-              'postal_greeting'
+              'postal_greeting',
             )) && !empty($contact[$name . '_custom'])
         ) {
           $defaults[$name . '_custom'] = $contact[$name . '_custom'];
index 152e371f6dee00572ea7dc2fcc2308e4cdab3bdb..9c8ca81c6d59d6dad9ae678cd2e007f0be41eedc 100644 (file)
@@ -738,7 +738,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
               'last_name',
               'suffix_id',
               'organization_name',
-              'household_name'
+              'household_name',
             );
             if ($profileContactType == 'honor' && in_array($field['name'], $honoreeNamefields)) {
               unset($fields[$field['name']]);
@@ -887,7 +887,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
    * When we get the control back from payment gate way
    * lets delete the recurring and related contribution.
    *
-   **/
+   */
   public function cancelRecurring() {
     $isCancel = CRM_Utils_Request::retrieve('cancel', 'Boolean', CRM_Core_DAO::$_nullObject);
     if ($isCancel) {
index c561cc308b0526b595167a268e5a6c4cbe961ace..7bca28df4edad98a81c3908e2dc99972121cc4be 100644 (file)
@@ -59,7 +59,7 @@ class CRM_Contribute_Form_ContributionPage_Custom extends CRM_Contribute_Form_Co
     $entities[] = array(
       'entity_name' => 'contribution_1',
       'entity_type' => 'ContributionModel',
-      'entity_sub_type' => '*'
+      'entity_sub_type' => '*',
     );
 
     // If applicable, register 'membership_1'
@@ -69,7 +69,7 @@ class CRM_Contribute_Form_ContributionPage_Custom extends CRM_Contribute_Form_Co
       $entities[] = array(
         'entity_name' => 'membership_1',
         'entity_type' => 'MembershipModel',
-        'entity_sub_type' => '*'
+        'entity_sub_type' => '*',
       );
       $allowCoreTypes[] = 'Membership';
       $allowSubTypes['MembershipType'] = explode(',', $member['membership_types']);
index 5f73c80864b2439cdfb83ecf34e17efb14494370..0b6762136fc60fba798151d66a1303f451cf6773 100644 (file)
@@ -54,7 +54,7 @@ class CRM_Contribute_Form_ContributionPage_TabHeader {
       ->addSetting(array(
         'tabSettings' => array(
           'active' => self::getCurrentTab($tabs),
-        )
+        ),
       ));
     return $tabs;
   }
@@ -171,8 +171,7 @@ class CRM_Contribute_Form_ContributionPage_TabHeader {
           $tabs[$key]['qfKey'] = NULL;
         }
 
-        $tabs[$key]['link'] =
-          CRM_Utils_System::url(
+        $tabs[$key]['link'] = CRM_Utils_System::url(
             "civicrm/admin/contribute/{$key}",
             "{$reset}action=update&id={$contribPageId}{$tabs[$key]['qfKey']}"
           );
index 0cf8ff2dcb7963111ef61522e9727177e766ac32..12cae6507be5fe65684a0330fe3115bdf3aea27c 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Contribute_Form_Task_Delete extends CRM_Contribute_Form_Task {
    *
    * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     //check for delete
     if (!CRM_Core_Permission::checkActionPermission('CiviContribute', CRM_Core_Action::DELETE)) {
       CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
@@ -86,7 +86,7 @@ class CRM_Contribute_Form_Task_Delete extends CRM_Contribute_Form_Task {
     }
     $status = ts('Deleted Contribution(s): %1 (Total Selected: %2) ', array(
         1 => $deletedContributions,
-        2 => count($this->_contributionIds)
+        2 => count($this->_contributionIds),
       ));
     CRM_Core_Session::setStatus($status, '', 'info');
   }
index 75260e9e2ad6d326b3a934303edbf3ca4838636c..25d1b94929b3cdf137c35d10b3b7110bb8ffc73a 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Contribute_Form_Task_PDF extends CRM_Contribute_Form_Task {
    *
    * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     $id = CRM_Utils_Request::retrieve('id', 'Positive',
       $this, FALSE
     );
@@ -94,7 +94,7 @@ AND    {$this->_componentClause}";
       array(
         'url' => $url,
         'title' => ts('Search Results'),
-      )
+      ),
     );
 
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
index 5e263e65d672ccb58eb4c3a4c4878b90976f7cff..6b755636e3b858c5226f679905261adf7442b1cf 100644 (file)
@@ -73,7 +73,7 @@ class CRM_Contribute_Form_Task_PickProfile extends CRM_Contribute_Form_Task {
     if (count($this->_contributionIds) > $this->_maxContributions) {
       CRM_Core_Session::setStatus(ts("The maximum number of contributions you can select for Batch Update is %1. You have selected %2. Please select fewer contributions from your search results and try again.", array(
             1 => $this->_maxContributions,
-            2 => count($this->_contributionIds)
+            2 => count($this->_contributionIds),
           )), ts('Batch Update Error'), 'error');
       $validate = TRUE;
     }
@@ -102,7 +102,7 @@ class CRM_Contribute_Form_Task_PickProfile extends CRM_Contribute_Form_Task {
 
     $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'),
       array(
-        '' => ts('- select profile -')
+        '' => ts('- select profile -'),
       ) + $profiles, TRUE
     );
     $this->addDefaultButtons(ts('Continue'));
index 10a8b7c4d6014f6e00687a99af164861a3526739..2f6cd9f1d36a224fcf65c4fef4bbefbc261bee45 100644 (file)
@@ -430,11 +430,13 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Core_Form {
       $session->setStatus($status, $msgTitle, $msgType);
     }
     elseif (!$userID) {
-      if ($status)
+      if ($status) {
         CRM_Utils_System::setUFMessage($status);
+      }
       $result = (int) ($updateSubscription && isset($ctype));
-      if (isset($tplParams))
+      if (isset($tplParams)) {
         $session->set('resultParams', $tplParams);
+      }
       return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contribute/subscriptionstatus',
         "reset=1&task=billing&result={$result}"));
     }
index 3ee66a3ae9c0b7097923125866567feef4313096..6b367225ae88d12aa9bdcb51a0f534f6e851b79e 100644 (file)
@@ -79,7 +79,7 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField {
       foreach (array(
                  'contribution_id',
                  'invoice_id',
-                 'trxn_id'
+                 'trxn_id',
                ) as $key) {
         $this->_mapperFields[$key] .= ' (match to contribution record)';
         $highlightedFields[] = $key;
@@ -92,7 +92,7 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField {
         'email',
         'first_name',
         'last_name',
-        'external_identifier'
+        'external_identifier',
       );
       foreach ($highlightedFieldsArray as $name) {
         $highlightedFields[] = $name;
index a9b7a0648da0919c4738134506fd86642260096b..83c00071ed5986e24097b15f1cc22dfecb70c048 100644 (file)
@@ -224,10 +224,10 @@ class CRM_Core_CommunityMessages {
    * @return bool
    */
   public function validateDocument($document) {
-    if (!isset($document['ttl']) || !is_integer($document['ttl'])) {
+    if (!isset($document['ttl']) || !is_int($document['ttl'])) {
       return FALSE;
     }
-    if (!isset($document['retry']) || !is_integer($document['retry'])) {
+    if (!isset($document['retry']) || !is_int($document['retry'])) {
       return FALSE;
     }
     if (!isset($document['messages']) || !is_array($document['messages'])) {
index 6100cedd0b4fa24fba51cb1a16840efed637bca5..6231f4a5c6ff4ec0ba945a661ce17cecc461da6e 100644 (file)
@@ -229,7 +229,7 @@ abstract class CRM_Core_Component_Info {
    * Provides information whether given component is currently
    * marked as enabled in configuration.
    *
-   * @return boolean
+   * @return bool
    *   true if component is enabled, false if not
    */
   public function isEnabled() {
@@ -322,7 +322,7 @@ abstract class CRM_Core_Component_Info {
   /**
    * Provides information whether given component uses system wide search.
    *
-   * @return boolean
+   * @return bool
    *   true if component needs search integration
    */
   public function usesSearch() {
index b19c280016b9b03750765181101e5daa0463ba0c..4dbe82f381d889d00c00b3ab132a37bcb84b5a8b 100644 (file)
@@ -45,7 +45,7 @@ class CRM_Core_ManagedEntities {
     CRM_Core_Transaction::addCallback(
       CRM_Core_Transaction::PHASE_POST_COMMIT,
       function () {
-        CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
+      CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
       },
       array(),
       'ManagedEntities::reconcile'
index 4d0f78af953ba80360ad992d61c9e359f13fcaff..5818f1e052f36970af3b390972003f68cb1e3ed1 100644 (file)
@@ -57,7 +57,7 @@ function smarty_function_isValueChange($params, &$smarty) {
 
   if (empty($params['key'])) {
     $smarty->trigger_error("Missing required parameter, 'key', in isValueChange plugin.");
-    return;
+    return NULL;
   }
 
   $is_changed = FALSE;
@@ -85,5 +85,5 @@ function smarty_function_isValueChange($params, &$smarty) {
     $smarty->assign($params['assign'], $is_changed);
   }
 
-  return;
+  return NULL;
 }
index 0c847f9139a787c73893f8b7c7f55a224c7960ef..641f4fb54b1a6b011b36f4e8157bb32fd0fb98a3 100644 (file)
@@ -49,8 +49,8 @@
  * @return string
  *   the formatted string
  *
- * For alternate decimal point and thousands separator, delimit values with single quotes in the template.
- * EXAMPLE:   {$number|crmNumberFormat:2:',':' '} for French notation - 1234.56 becomes 1 234,56
+ *   For alternate decimal point and thousands separator, delimit values with single quotes in the template.
+ *   EXAMPLE:   {$number|crmNumberFormat:2:',':' '} for French notation - 1234.56 becomes 1 234,56
  */
 function smarty_modifier_crmNumberFormat($number, $decimals = NULL, $dec_point = NULL, $thousands_sep = NULL) {
   if (is_numeric($number)) {
index 5ccb53406601eb98bd72b32349b4325d6796f924..f858b97880c59f4ad38616449d52ab42319316da 100644 (file)
@@ -111,7 +111,7 @@ class CRM_Core_StateMachine {
   /**
    * Setter for name
    *
-   * @param string
+   * @param string $name
    *
    * @return void
    */
@@ -394,7 +394,7 @@ class CRM_Core_StateMachine {
    * beginning from the final state, but retain the same session
    * values
    *
-   * @return boolean
+   * @return bool
    */
   public function shouldReset() {
     return TRUE;
index 06d26d3da630ff691563591e90a4bf8f11988728..f27f8501af865da7524ba162b73ecde4cb47e07b 100644 (file)
@@ -112,7 +112,7 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form {
       'dst_html_type',
       ts('New HTML Type'),
       array(
-        '' => ts('- select -')
+        '' => ts('- select -'),
       ) + $this->_htmlTypeTransitions,
       TRUE
     );
@@ -168,7 +168,7 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form {
     if ($dstHtmlType == 'Text' && in_array($srcHtmlType, array(
         'Select',
         'Radio',
-        'Autocomplete-Select'
+        'Autocomplete-Select',
       ))
     ) {
       $customField->option_group_id = "NULL";
index 0be813e09be49e08b089ae9fa1faf2e57b2aa4e8..fc0863179388ea5b2815c5e2aed2a993d55fd5a7 100644 (file)
@@ -74,7 +74,7 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
    * @return mixed
    * @throws Exception
    */
-  function run(
+  public function run(
     $fileName,
     $separator = ',',
     &$mapper,
@@ -291,7 +291,7 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
    * Given a list of the importable field keys that the user has selected
    * set the active fields array to this list
    *
-   * @param array mapped array of values
+   * @param array $fieldKeys mapped array of values
    *
    * @return void
    */
index 2003d472f05e31f0517574a436b691c6406284dd..9c3baf3e18cb3c0a6d1164bd791a0794229dd617 100644 (file)
@@ -53,7 +53,6 @@ class CRM_Custom_Page_Group extends CRM_Core_Page {
   /**
    * Get the action links for this page.
    *
-   * @param null
    *
    * @return array
    *   array of action links that we need to display for the browse screen
@@ -108,8 +107,6 @@ class CRM_Custom_Page_Group extends CRM_Core_Page {
    * type of action and executes that action.
    * Finally it calls the parent's run method.
    *
-   * @param null
-   *
    * @return void
    */
   public function run() {
index 37c9a941b9d65d64e475a7f0a9d5ff3ee2c4b8d9..ceead104b3a75858fffc830497248ccb3c125b82 100644 (file)
@@ -188,7 +188,7 @@ class CRM_Dedupe_BAO_Rule extends CRM_Dedupe_DAO_Rule {
   /**
    * find fields related to a rule group.
    *
-   * @param array contains the rule group property to identify rule group
+   * @param array $params contains the rule group property to identify rule group
    *
    * @return array
    *   rule fields array associated to rule group
@@ -217,7 +217,7 @@ class CRM_Dedupe_BAO_Rule extends CRM_Dedupe_DAO_Rule {
    */
   public static function validateContacts($cid, $oid) {
     if (!$cid || !$oid) {
-      return;
+      return NULL;
     }
     $exception = new CRM_Dedupe_DAO_Exception();
     $exception->contact_id1 = $cid;
index 0ef208d6c7d20af9b0f5bf66d46fdf87f408731a..d557b4f2ecb994592b74bc3a47208e8e6f807bf3 100644 (file)
@@ -413,7 +413,6 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup {
   /**
    * Get all of the combinations of fields that would work with a rule
    */
-
   public static function combos($rgFields, $threshold, &$combos, $running = array()) {
     foreach ($rgFields as $rgField => $weight) {
       unset($rgFields[$rgField]);
@@ -451,8 +450,7 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup {
     $dao->find();
     $result = array();
     while ($dao->fetch()) {
-      $title =
-        !empty($dao->title) ? $dao->title : (!empty($dao->name) ? $dao->name : $dao->contact_type);
+      $title = !empty($dao->title) ? $dao->title : (!empty($dao->name) ? $dao->name : $dao->contact_type);
 
       $name = "$title - {$dao->used}";
       $result[$dao->id] = $name;
index 094b3996219717a193105830f0f20ca9d14e18dc..3c6b053a71423bf34d7a437c27704029eff7510a 100644 (file)
@@ -95,7 +95,7 @@ class CRM_Dedupe_Finder {
    * @return array
    *   matching contact ids
    */
-  static function dupesByParams(
+  public static function dupesByParams(
     $params,
     $ctype,
     $used = 'Unsupervised',
@@ -236,7 +236,7 @@ class CRM_Dedupe_Finder {
     // handle {birth,deceased}_date
     foreach (array(
                'birth_date',
-               'deceased_date'
+               'deceased_date',
              ) as $date) {
       if (!empty($fields[$date])) {
         $flat[$date] = $fields[$date];
index b9f661a0d906e4435f637d6818d44a9b0d34f170..03f34e0ce35f935d647b2a62260083a2c4568ade 100644 (file)
@@ -26,7 +26,7 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl
   /**
    * @param array $params
    *
-   * @return $this|CRM_Event_Cart_BAO_EventInCart
+   * @return object $this|CRM_Event_Cart_BAO_EventInCart
    * @throws Exception
    */
   public static function create(&$params) {
index e5628f00e75cbbdc7ac8455fa3ddc22274c19037..65c786ad130b744dddf4e3f91623523a5f84f65a 100644 (file)
@@ -239,7 +239,7 @@ class CRM_Event_Form_EventFees {
                  'payment_instrument_id',
                  'contribution_status_id',
                  'receive_date',
-                 'total_amount'
+                 'total_amount',
                ) as $f) {
         if ($f == 'receive_date') {
           list($defaults[$form->_pId]['receive_date']) = CRM_Utils_Date::setDateDefaults($contribution->$f);
@@ -401,7 +401,7 @@ SELECT  id, html_type
         $element = $form->add('select', 'discount_id',
           ts('Discount Set'),
           array(
-            0 => ts('- select -')
+            0 => ts('- select -'),
           ) + $discounts,
           FALSE,
           array('onchange' => "buildFeeBlock( {$form->_eventId}, this.value );")
index 53644e22878f1e9a27b35afaaa9a2e49b4d9f913..0f839ca6d4bb10047ac5ff0a901c6e852b8549a0 100644 (file)
@@ -210,7 +210,7 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form {
           array(
             'title' => ts('Manage Events'),
             'url' => $this->_doneUrl,
-          )
+          ),
         );
       }
     }
@@ -220,7 +220,7 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form {
         array(
           'title' => ts('Manage Event Templates'),
           'url' => $this->_doneUrl,
-        )
+        ),
       );
     }
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
index 5b8a68bcdcf3cef8cb24e0a088b4581e660bfb80..b1497f644dc7c67487dd06ad831bfef195911005 100644 (file)
@@ -147,8 +147,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent {
 
         foreach ($discountFields['options'] as $discountFieldsval) {
           $defaults['discounted_label'][$discountFieldsval['weight']] = $discountFieldsval['label'];
-          $defaults['discounted_value'][$discountFieldsval['weight']][$rowCount] =
-            CRM_Utils_Money::format($discountFieldsval['amount'], NULL, '%a');
+          $defaults['discounted_value'][$discountFieldsval['weight']][$rowCount] = CRM_Utils_Money::format($discountFieldsval['amount'], NULL, '%a');
           $defaults['discount_option_id'][$rowCount][$discountFieldsval['weight']] = $discountFieldsval['id'];
           if (!empty($discountFieldsval['is_default'])) {
             $defaults['discounted_default'] = $discountFieldsval['weight'];
@@ -297,7 +296,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent {
     }
     $this->add('select', 'price_set_id', ts('Price Set'),
       array(
-        '' => ts('- none -')
+        '' => ts('- none -'),
       ) + $price,
       NULL, array('onchange' => "return showHideByValue('price_set_id', '', 'map-field', 'block', 'select', false);")
     );
index 1759544f7c00fd92d7a55cbce900c7c61c549ebb..829545b6d3301916237cfa2e558b0f568f6c570b 100644 (file)
@@ -204,9 +204,7 @@ class CRM_Event_Form_ManageEvent_Location extends CRM_Event_Form_ManageEvent {
       $this->addRadio('location_option', ts("Choose Location"), $optionTypes);
 
       if (!isset($locationEvents[$this->_oldLocBlockId]) || (!$this->_oldLocBlockId)) {
-        $locationEvents = array(
-            '' => ts('- select -')
-          ) + $locationEvents;
+        $locationEvents = array('' => ts('- select -')) + $locationEvents;
       }
       $this->add('select', 'loc_event_id', ts('Use Location'), $locationEvents);
     }
@@ -260,7 +258,7 @@ class CRM_Event_Form_ManageEvent_Location extends CRM_Event_Form_ManageEvent {
     foreach (array(
                'address',
                'phone',
-               'email'
+               'email',
              ) as $block) {
       if (empty($params[$block]) || !is_array($params[$block])) {
         continue;
index 54198ece0aa669e990b3846de67394c10b41e8b7..7c2f97e83dcbfefbda7659abdadd8820e9087ea8 100644 (file)
@@ -55,7 +55,7 @@ class CRM_Event_Form_ManageEvent_TabHeader {
       ->addSetting(array(
         'tabSettings' => array(
           'active' => self::getCurrentTab($tabs),
-        )
+        ),
       ));
     CRM_Event_Form_ManageEvent::addProfileEditScripts();
     return $tabs;
index 4026d5181f6bd48e0ab62fc13a29ef12eba78765..b359e4fbc965e898825099a44cd6839a7ae3ddc5 100755 (executable)
@@ -266,8 +266,7 @@ class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce {
         'name' => "<a href=\"$url\">{$dao->display_name}</a>",
         'email' => $dao->email,
         // FIXME: translate this
-        'type' => (empty($dao->bounce_type)
-          ? ts('Unknown') : $dao->bounce_type
+        'type' => (empty($dao->bounce_type) ? ts('Unknown') : $dao->bounce_type
         ),
         'reason' => $dao->reason,
         'date' => CRM_Utils_Date::customFormat($dao->date),
index 682b192c350f15b430d6bf1ba41ee59db1c15aaf..5342b59bb35a7f4eeec0e90381d26b0bb6134381 100644 (file)
  */
 class CRM_Queue_Task {
 
-  /** Task was performed successfully */
+  /**
+   * Task was performed successfully
+   */
   const TASK_SUCCESS = 1;
 
-  /** Task failed and should not be retried */
+  /**
+   * Task failed and should not be retried
+   */
   const TASK_FAIL = 2;
 
   /**
index 13ad8c1980c5c01cef31010e2304644f49186807..6dbabefc8752e16c92b8d4b887d322dd32d6cd7d 100644 (file)
@@ -277,9 +277,7 @@ FROM civicrm_contact {$this->_aliases['civicrm_contact']}
       $this->_where = "WHERE {$this->_aliases['civicrm_contact']}.employer_id!='null' ";
     }
     else {
-      $this->_where =
-        "WHERE ({$this->_aliases['civicrm_contact']}.employer_id!='null') AND " .
-        implode(' AND ', $clauses);
+      $this->_where = "WHERE ({$this->_aliases['civicrm_contact']}.employer_id!='null') AND " . implode(' AND ', $clauses);
     }
 
     if ($this->_aclWhere) {
index 8f2a0db86f4e808a1313dc599bd6a794dc36e7d3..2a8aadfb306535a608dc58708ef493f1c4ff7ed3 100644 (file)
@@ -281,9 +281,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
             $op = CRM_Utils_Array::value("{$fieldName}_op", $this->_params);
             if ($op) {
               if ($fieldName == 'relationship_type_id') {
-                $clause =
-                  "{$this->_aliases['civicrm_relationship']}.relationship_type_id=" .
-                  $this->relationshipId;
+                $clause = "{$this->_aliases['civicrm_relationship']}.relationship_type_id=" . $this->relationshipId;
               }
               else {
                 $clause = $this->whereClause($field,
@@ -452,10 +450,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
               $this->_absoluteUrl
             );
 
-            $rows[$rowNum]['civicrm_contact_household_household_name'] =
-              "<a href='$url' title='" .
-              ts('View contact summary for this househould') . "'>" . $value .
-              '</a>';
+            $rows[$rowNum]['civicrm_contact_household_household_name'] = "<a href='$url' title='" . ts('View contact summary for this househould') . "'>" . $value . '</a>';
           }
           $entryFound = TRUE;
         }
index 72709a3ea61011a8e4d8cb8559f625c7674e8aa9..60fdc848e7d7f4f69450edea52ac08e630c537c3 100644 (file)
@@ -264,11 +264,11 @@ LEFT JOIN civicrm_contribution_page {$this->_aliases['civicrm_contribution_page'
   public function statistics(&$rows) {
     $statistics = parent::statistics($rows);
 
-    $select =
-      "SELECT SUM({$this->_aliases['civicrm_pcp']}.goal_amount) as goal_total, " .
-      "SUM({$this->_aliases['civicrm_contribution_soft']}.amount) as committed_total, " .
-      "COUNT({$this->_aliases['civicrm_contribution_soft']}.id) as donors_total, " .
-      "SUM(IF( contribution_civireport.contribution_status_id > 1, 0, contribution_soft_civireport.amount)) AS received_total ";
+    $select
+      "SELECT SUM({$this->_aliases['civicrm_pcp']}.goal_amount) as goal_total, " .
+        "SUM({$this->_aliases['civicrm_contribution_soft']}.amount) as committed_total, " .
+        "COUNT({$this->_aliases['civicrm_contribution_soft']}.id) as donors_total, " .
+        "SUM(IF( contribution_civireport.contribution_status_id > 1, 0, contribution_soft_civireport.amount)) AS received_total ";
     $sql = "{$select} {$this->_from} {$this->_where}";
     $dao = CRM_Core_DAO::executeQuery($sql);
     $dao->fetch();
index f564082d70a1c0aeeda34ebde21d6300d25d0c85..facd4c6e81ab14518dadbbb3499ee2939cecf872 100644 (file)
@@ -490,7 +490,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form {
         'bounce_rate',
         'open_rate',
         'CTR',
-        'CTO'
+        'CTO',
       ))) {
         $isError = FALSE;
       }
@@ -499,7 +499,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form {
     if ($isError) {
       $errors['_qf_default'] = ts('For Chart view, please select at least one field from %1 OR %2.', array(
           1 => implode(', ', $criterias['count']),
-          2 => implode(', ', $criterias['rate'])
+          2 => implode(', ', $criterias['rate']),
         ));
     }
 
index 81e2f42238648007989b27e5597702fc0927c6ee..de8eb9fe257890034b2dadcb023164927143c42f 100644 (file)
@@ -241,8 +241,7 @@ class CRM_Report_Form_Member_Summary extends CRM_Report_Form {
             }
             if (!empty($this->_params['group_bys_freq'][$fieldName])) {
               $this->_interval = $field['title'];
-              $this->_columnHeaders["{$tableName}_{$fieldName}_start"]['title'] =
-                $field['title'] . ' Beginning';
+              $this->_columnHeaders["{$tableName}_{$fieldName}_start"]['title'] = $field['title'] . ' Beginning';
               $this->_columnHeaders["{$tableName}_{$fieldName}_start"]['type'] = $field['type'];
               $this->_columnHeaders["{$tableName}_{$fieldName}_start"]['group_by'] = $this->_params['group_bys_freq'][$fieldName];
 
@@ -339,8 +338,6 @@ class CRM_Report_Form_Member_Summary extends CRM_Report_Form {
                          ON payment.contribution_id = {$this->_aliases['civicrm_contribution']}.id";
   }
 
-  // end of from
-
   public function where() {
     $this->_whereClauses[] = "{$this->_aliases['civicrm_membership']}.is_test = 0 AND
                               {$this->_aliases['civicrm_contact']}.is_deleted = 0";
@@ -413,9 +410,7 @@ GROUP BY    {$this->_aliases['civicrm_contribution']}.currency
     $totalAmount = $average = array();
     $count = $memberCount = 0;
     while ($dao->fetch()) {
-      $totalAmount[] =
-        CRM_Utils_Money::format($dao->amount, $dao->currency) . "(" .
-        $dao->count . ")";
+      $totalAmount[] = CRM_Utils_Money::format($dao->amount, $dao->currency) . "(" . $dao->count . ")";
       $average[] = CRM_Utils_Money::format($dao->avg, $dao->currency);
       $count += $dao->count;
       $memberCount += $dao->memberCount;
index f65ee7629f8639af8cffe3a22476f11d1904c60f..66c4cf3c0705d7a25fde53a46d590be420c3346c 100644 (file)
@@ -192,7 +192,7 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
     foreach (array(
                'name',
                'group_id',
-               'is_sms'
+               'is_sms',
              ) as $n) {
       if (!empty($values[$n])) {
         $params[$n] = $values[$n];
@@ -253,7 +253,7 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
       // delete previous includes/excludes, if mailing already existed
       foreach (array(
                  'groups',
-                 'mailings'
+                 'mailings',
                ) as $entity) {
         $mg = new CRM_Mailing_DAO_MailingGroup();
         $mg->mailing_id = $ids['mailing_id'];
index b73f4e76648cc39bc02a58843f7fa8e336529be1..75d4e95ad2736cf631c357d2a4c8921a5dd63feb 100644 (file)
@@ -55,7 +55,7 @@ class CRM_Utils_Address {
    *   formatted address string
    *
    */
-  static function format(
+  public static function format(
     $fields,
     $format = NULL,
     $microformat = FALSE,
@@ -66,13 +66,11 @@ class CRM_Utils_Address {
     static $config = NULL;
 
     if (!$format) {
-      $format =
-        CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_format');
+      $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_format');
     }
 
     if ($mailing) {
-      $format =
-        CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'mailing_format');
+      $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'mailing_format');
     }
 
     $formatted = $format;
index 5a890d4b5110162a4524a3039e27be893350ea77..0b0ccdb5cbcea7f37c1b1c1e588f79256def2090 100644 (file)
@@ -256,16 +256,16 @@ class CRM_Utils_Address_BatchUpdate {
     }
 
     $this->returnMessages[] = ts("Addresses Evaluated: %1", array(
-        1 => $totalAddresses
+      1 => $totalAddresses,
       )) . "\n";
     if ($processGeocode) {
       $this->returnMessages[] = ts("Addresses Geocoded: %1", array(
-          1 => $totalGeocoded
+          1 => $totalGeocoded,
         )) . "\n";
     }
     if ($parseStreetAddress) {
       $this->returnMessages[] = ts("Street Addresses Parsed: %1", array(
-          1 => $totalAddressParsed
+          1 => $totalAddressParsed,
         )) . "\n";
       if ($unparseableContactAddress) {
         $this->returnMessages[] = "<br />\n" . ts("Following is the list of contacts whose address is not parsed:") . "<br />\n";
index bd4899699fd03240fc48c46199e5ac96ede55e9f..1d89f72b3adae1977b412fdc39756556a329f034 100644 (file)
@@ -53,7 +53,7 @@ function civicrm_api3_action_schedule_get($params) {
  *
  * @return array
  *
- * {@getfields action_schedule_create}
+ *   {@getfields action_schedule_create}
  */
 function civicrm_api3_action_schedule_create($params) {
   civicrm_api3_verify_one_mandatory($params, NULL, array('start_action_date', 'absolute_date'));
index 9385eb1473ae7cb139ed50f76399e929a4719ce8..a21a22c37d66c01743e64a64ae1e00f85456b206 100644 (file)
@@ -78,10 +78,9 @@ function civicrm_api3_payment_processor_delete($params) {
 /**
  * Retrieve one or more PaymentProcessor
  *
- * @param mixed[] (reference) input parameters
- * {@getfields payment_processor_get}
  * @param array $params
  *   An associative array of name/value pairs.
+ * {@getfields payment_processor_get}
  *
  * @return array
  *   details of found PaymentProcessor
index 8c6140fd9cc16d07189be7c725e1fa0b3a1016dd..715ae814c6fac817fa7103c14b12b734bc225818 100644 (file)
@@ -45,7 +45,7 @@
 class CRM_UpdateMembershipRecord {
   /**
    */
-  function __construct() {
+  public function __construct() {
     // you can run this program either from an apache command, or from the cli
     if (php_sapi_name() == "cli") {
       require_once "cli.php";
@@ -66,7 +66,7 @@ class CRM_UpdateMembershipRecord {
     }
   }
 
-  function initialize() {
+  public function initialize() {
     require_once '../civicrm.config.php';
     require_once 'CRM/Core/Config.php';
 
index c511bd3d46718c52caed8b9ecc210f8530c6e10b..03297634bba30b34da3e0d7a189bd30c2e12b41f 100644 (file)
@@ -37,7 +37,7 @@
 class CRM_UpdateMembershipReminderDate {
   /**
    */
-  function __construct() {
+  public function __construct() {
     // you can run this program either from an apache command, or from the cli
     if (php_sapi_name() == "cli") {
       require_once "cli.php";
@@ -58,7 +58,7 @@ class CRM_UpdateMembershipReminderDate {
     }
   }
 
-  function initialize() {
+  public function initialize() {
     require_once '../civicrm.config.php';
     require_once 'CRM/Core/Config.php';
 
index 1170098959e69787416845456f2da55397e73a3d..31f9bebd1e2dbe20abde981dfc8663007d2840a6 100644 (file)
@@ -42,7 +42,7 @@ require_once 'CRM/Core/Config.php';
 class CRM_UpdatePledgeRecord {
   /**
    */
-  function __construct() {
+  public function __construct() {
     $config = CRM_Core_Config::singleton();
     // this does not return on failure
     require_once 'CRM/Utils/System.php';
@@ -72,7 +72,7 @@ class CRM_UpdatePledgeRecord {
     foreach (array(
                'Completed',
                'Cancelled',
-               'Failed'
+               'Failed',
              ) as $statusKey) {
       if ($key = CRM_Utils_Array::key($statusKey, $allStatus)) {
         unset($allStatus[$key]);
index bd24f1812fd38ed7626e3ae624168538dbeb4108..689cda3edbca4f79f46d381b670c3042e2c7bf59 100644 (file)
@@ -35,7 +35,7 @@
 class CRM_Cron_Action {
   /**
    */
-  function __construct() {
+  public function __construct() {
     // you can run this program either from an apache command, or from the cli
     if (php_sapi_name() == "cli") {
       require_once "cli.php";
@@ -56,7 +56,7 @@ class CRM_Cron_Action {
     }
   }
 
-  function initialize() {
+  public function initialize() {
     require_once '../civicrm.config.php';
     require_once 'CRM/Core/Config.php';
 
index c2c15d9d11deca55cc90a942679cd35196d08bdb..154722b3b57a8b4431b83b167688710088962518 100644 (file)
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 */
+
+/**
+ *
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2014
+ * $Id$
+ *
+ */
 function run() {
   session_start();
 
index 5b477a7a3290e9466c503ae6541b373ed1f3ef34..69838daa40047b10840be5f56c0708664ef50019 100644 (file)
@@ -72,7 +72,7 @@ function generateJoomlaConfig($version) {
 
   $output = $targetDir . '/civicrm.xml';
   $fd = fopen($output, "w");
-  fputs($fd, $xml);
+  fwrite($fd, $xml);
   fclose($fd);
 
   require_once 'CRM/Core/Config.php';
@@ -106,6 +106,6 @@ function generateJoomlaConfig($version) {
   $output = $targetDir . '/admin/access.xml';
   $xml    = $smarty->fetch('access.tpl');
   $fd     = fopen($output, "w");
-  fputs($fd, $xml);
+  fwrite($fd, $xml);
   fclose($fd);
 }
index f745135acf8715a0279b259b6fc0c2f6f25fccca..8ba2580c81ff8cdcc606c45683f4276fa32de5a7 100644 (file)
  */
 return array(
   'event_enable_cart' =>
-    array(
-      'name' => 'enable_cart',
-      'group_name' => 'Event Preferences',
-      'group' => 'event',
-      'type' => 'String',
-      'quick_form_type' => 'Element',
-      'default' => 0,
-      'add' => 4.1,
-      'title' => 'Enable Event Cart',
-      'is_domain' => 1,
-      'is_contact' => 1,
-      'description' => "WRITE ME",
-      'help_text' => 'WRITE ME',
-    ),
+  array(
+    'name' => 'enable_cart',
+    'group_name' => 'Event Preferences',
+    'group' => 'event',
+    'type' => 'String',
+    'quick_form_type' => 'Element',
+    'default' => 0,
+    'add' => 4.1,
+    'title' => 'Enable Event Cart',
+    'is_domain' => 1,
+    'is_contact' => 1,
+    'description' => "WRITE ME",
+    'help_text' => 'WRITE ME',
+  ),
 );
index 7460038140890f4f7a209d0717cdc39cef8787ac..f5776e64e66f74069e42d0e05046abfffc3b4e38 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Core_AllTests extends CiviTestSuite {
    */
   private static function getInstance() {
     if (is_null(self::$instance)) {
-      self::$instance = new self;
+      self::$instance = new self();
     }
     return self::$instance;
   }
index 19e91eb4c819477aa81de7f11c412bacdd6ea632..1d52d81ba7e0c66a127735ca34e10bf771d35047 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Member_Form_AllTests extends CiviTestSuite {
    */
   private static function getInstance() {
     if (is_null(self::$instance)) {
-      self::$instance = new self;
+      self::$instance = new self();
     }
     return self::$instance;
   }
index bf3f11d0379b486d3866d8faa993f635a18a44f1..739549324d646cf46a1d1cad6cd2edb4cb52bcab 100644 (file)
@@ -67,8 +67,9 @@ class CRM_Utils_HookTest extends CiviUnitTestCase {
   }
 }
 
-/* --- Library of test hook implementations ---- */
-
+/**
+ * Library of test hook implementations
+ */
 function hooktesta_civicrm_testRunHooks_outer() {
   $test = CRM_Utils_HookTest::$activeTest;
   $test->log[] = 'a-outer';
@@ -100,8 +101,9 @@ function hooktesta_civicrm_testRunHooks_merge() {
   return array('from-module-a1', 'from-module-a2');
 }
 
-// OMIT: function hooktestb_civicrm_testRunHooks_merge
-
+/**
+ * OMIT: function hooktestb_civicrm_testRunHooks_merge
+ */
 function hooktestc_civicrm_testRunHooks_merge() {
   return array();
 }
index f2e068f6188dd079e1e8bd3539bac268e6f2cf27..1c281b5144c78ef26f2d04e6a40833bf0c6eee63 100644 (file)
@@ -36,7 +36,7 @@ class RequestTest extends \CiviUnitTestCase {
         'option.limit' => 15,
         'option.foo' => array('bar'),
         'options' => array('whiz' => 'bang'),
-        'optionnotreally' => 'data'
+        'optionnotreally' => 'data',
       ), // requestParams
       array('limit' => 15, 'foo' => array('bar'), 'whiz' => 'bang'), // expectedOptions
       array('optionnotreally' => 'data'), // expectedData
@@ -48,7 +48,7 @@ class RequestTest extends \CiviUnitTestCase {
         'return' => array('field1', 'field2'),
         'return.field3' => 1,
         'return.field4' => 0,
-        'returnontreally' => 'data'
+        'returnontreally' => 'data',
       ), // requestParams
       array('return' => array('field1', 'field2', 'field3')), // expectedOptions
       array('returnontreally' => 'data'), // expectedData
index 8d82c8e482cba71dfa6323375460f5296d375358..9f8d2f805722c91d84b24794df97e554b554ecc9 100644 (file)
@@ -150,13 +150,13 @@ class DynamicFKAuthorizationTest extends \CiviUnitTestCase {
       'FakeFile',
       'create',
       array(),
-      "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/"
+      "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/",
     );
     $cases[] = array(
       'FakeFile',
       'get',
       array(),
-      "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/"
+      "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/",
     );
 
     $cases[] = array('FakeFile', 'create', array('entity_table' => 'unknown'), '/Unrecognized target entity/');
index e3d1f94d4fa5180f26e7ebcbf5782a44fb7392c4..352e124a8662aa1b9f885a0d3f9cfb40d32be755 100644 (file)
@@ -47,7 +47,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
       'edit-2-access-all-cases-and-activities',
       'edit-2-access-my-cases-and-activities',
       'edit-2-administer-civicase',
-      'edit-2-delete-in-civicase'
+      'edit-2-delete-in-civicase',
     );
     $this->changePermissions($permission);
 
@@ -98,7 +98,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
       'edit-2-access-all-cases-and-activities',
       'edit-2-access-my-cases-and-activities',
       'edit-2-administer-civicase',
-      'edit-2-delete-in-civicase'
+      'edit-2-delete-in-civicase',
     );
     $this->changePermissions($permission);
 
index 0ebe8fbf7630f3f97e2ed747a04a7a5421bfa2cf..c1f042e1c24c40f1244873fcc0ee6465a0500f64 100644 (file)
@@ -47,7 +47,7 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
       'edit-2-access-all-cases-and-activities',
       'edit-2-access-my-cases-and-activities',
       'edit-2-administer-civicase',
-      'edit-2-delete-in-civicase'
+      'edit-2-delete-in-civicase',
     );
     $this->changePermissions($permission);
 
@@ -155,7 +155,7 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
       'edit-2-access-all-cases-and-activities',
       'edit-2-access-my-cases-and-activities',
       'edit-2-administer-civicase',
-      'edit-2-delete-in-civicase'
+      'edit-2-delete-in-civicase',
     );
     $this->changePermissions($permission);
 
index 4f54d09b1473407c051b1a1754a90b71357f2fb6..7277a22f5f897b42819039aca2dd134e56210384 100644 (file)
@@ -264,7 +264,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Fee_upload_done-bottom');
     $this->click('CIVICRM_QFID_1_is_monetary');
     $this->click("xpath=//tbale[@id='paymentProcessor']/tbody/tr[1]/td[2]/label[text()='$processorName']");
-    $this->select('financial_type_id','label=Event Fee');
+    $this->select('financial_type_id', 'label=Event Fee');
     $this->select('price_set_id', 'label=' . $setTitle);
 
     // intro text for registration page
index ba828c6cc914427232f2f09031494b522f46306e..9e3409fb41cf80d71a896832bb6214db69a80745 100644 (file)
@@ -48,7 +48,7 @@ class api_v3_AllTests extends CiviTestSuite {
    * @param string $theClass
    * @param string $name
    */
-  function __construct($theClass = '', $name = '') {
+  public function __construct($theClass = '', $name = '') {
     parent::__construct($theClass, $name);
   }
 
@@ -56,7 +56,7 @@ class api_v3_AllTests extends CiviTestSuite {
    */
   private static function getInstance() {
     if (is_null(self::$instance)) {
-      self::$instance = new self;
+      self::$instance = new self();
     }
     return self::$instance;
   }
index de1e20dee86ba1363fbcfeb279b062e7d0d76813..9688a712bf8c68253126d6f7413696752d9c2a6b 100644 (file)
@@ -90,7 +90,7 @@ class api_v3_GrantTest extends CiviUnitTestCase {
         array('label' => 'my goat', 'value' => 'goat', 'is_active' => TRUE, 'weight' => 2),
         array('label' => 'mohair', 'value' => 'wool', 'is_active' => TRUE, 'weight' => 3),
         array('label' => 'hungry', 'value' => '', 'is_active' => TRUE, 'weight' => 3),
-      )
+      ),
     ));
     $columnName = $result['values'][$result['id']]['column_name'];
     $ids['custom_field_id'] = $result['id'];
@@ -157,14 +157,13 @@ class api_v3_GrantTest extends CiviUnitTestCase {
     $this->assertEquals(0, $checkDeleted['count'], 'In line ' . __LINE__);
   }
 
-  /*
-  * This is a test to check if setting fields one at a time alters other fields
-  * Issues Hit so far =
-  * 1) Currency keeps getting reset to USD -  BUT this may be the only enabled currency
-  *  - in which case it is valid
-  * 2)
-  */
-
+  /**
+   * This is a test to check if setting fields one at a time alters other fields
+   * Issues Hit so far =
+   * 1) Currency keeps getting reset to USD -  BUT this may be the only enabled currency
+   *  - in which case it is valid
+   * 2)
+   */
   public function testCreateAutoGrant() {
     $entityName = $this->_entity;
     $baoString = 'CRM_Grant_BAO_Grant';
index baa5ad2b3757e082724a8505cffba44dee054de8..9e098b5b769d7e33c9d0c42e280812f783ff82fb 100644 (file)
@@ -82,7 +82,9 @@ class api_v3_GroupContactTest extends CiviUnitTestCase {
     );
   }
 
-  ///////////////// civicrm_group_contact_get methods
+  /**
+   * civicrm_group_contact_get methods
+   */
   public function testGet() {
     $params = array(
       'contact_id' => $this->_contactId,
@@ -160,7 +162,9 @@ class api_v3_GroupContactTest extends CiviUnitTestCase {
     $this->assertEquals($result['total_count'], 2, "in line " . __LINE__);
   }
 
-  ///////////////// civicrm_group_contact_remove methods
+  /**
+   * civicrm_group_contact_remove methods
+   */
   public function testDelete() {
     $params = array(
       'contact_id' => $this->_contactId,
index a0086acdc09e4abe45499efd268711f92728520e..72af35eaf7f7f7a44323b5da95ec240eee4226a4 100644 (file)
@@ -189,7 +189,7 @@ class api_v3_UtilsTest extends CiviUnitTestCase {
       'note' => 'note',
       'contact_id' => $this->_contactID,
       'modified_date' => '2011-01-31',
-      'subject' => NULL
+      'subject' => NULL,
     );
 
     try {
@@ -255,7 +255,7 @@ class api_v3_UtilsTest extends CiviUnitTestCase {
       'end_date' => '',
       'membership_end_date' => '0',
       'join_date' => '2010-12-20',
-      'membership_start_date' => '2010-12-20'
+      'membership_start_date' => '2010-12-20',
     );
     $fields = civicrm_api3('Membership', 'getfields', array('action' => 'get'));
     _civicrm_api3_validate_fields('Membership', 'get', $params, $fields['values']);