INFRA-132 - Misc
authorTim Otten <totten@civicrm.org>
Tue, 20 Jan 2015 05:33:26 +0000 (21:33 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 20 Jan 2015 05:38:29 +0000 (21:38 -0800)
44 files changed:
CRM/Activity/BAO/Activity.php
CRM/Activity/Form/Activity.php
CRM/Activity/Import/Parser.php
CRM/Batch/BAO/Batch.php
CRM/Campaign/Form/Survey/TabHeader.php
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/Group.php
CRM/Contact/Form/Contact.php
CRM/Contact/Form/Search/Advanced.php
CRM/Contact/Form/Task/Label.php
CRM/Contribute/Form/Task/PDFLetterCommon.php
CRM/Core/BAO/Address.php
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/CustomGroup.php
CRM/Core/BAO/Phone.php
CRM/Core/BAO/Setting.php
CRM/Core/Form.php
CRM/Core/Form/RecurringEntity.php
CRM/Core/Payment/BaseIPN.php
CRM/Core/Payment/PayPalImpl.php
CRM/Core/Payment/PaymentExpress.php
CRM/Core/Permission/WordPress.php
CRM/Core/Selector/API.php
CRM/Core/Smarty/plugins/modifier.substring.php
CRM/Event/BAO/Participant.php
CRM/Event/Cart/BAO/Cart.php
CRM/Grant/Form/Grant.php
CRM/Mailing/BAO/Query.php
CRM/Member/Form/Task/Label.php
CRM/Price/Page/Option.php
CRM/Report/Form.php
CRM/Report/Form/Activity.php
CRM/Report/Form/Contribute/Detail.php
CRM/Report/Form/Contribute/Summary.php
CRM/Report/Form/Contribute/Sybunt.php
CRM/Report/Form/Pledge/Pbnp.php
CRM/SMS/Provider.php
CRM/Utils/Cache/APCcache.php
CRM/Utils/Wrapper.php
api/v3/Address.php
api/v3/Case.php
api/v3/Email.php
api/v3/Extension.php
api/v3/Generic/Setvalue.php

index bc2815bf8655325570505096ce4e622911a0e651..1d5ecd066e46b9e758f583e060d5ff19fd7ebe31 100644 (file)
@@ -1187,8 +1187,7 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
     $attachments = NULL,
     $cc = NULL,
     $bcc = NULL,
-    // FIXME a param with no default shouldn't be last
-    $contactIds,
+    $contactIds = NULL,
     $additionalDetails = NULL
   ) {
     // get the contact details of logged in contact, which we set as from email
index 5dbdc39f047d52dbb7f9d4a1a6b1065886587e73..99d080e3441071149f09b73e9bf9e4f57508facc 100644 (file)
@@ -484,8 +484,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
 
     // figure out the file name for activity type, if any
     if ($this->_activityTypeId &&
-      $this->_activityTypeFile =
-        CRM_Activity_BAO_Activity::getFileForActivityTypeId($this->_activityTypeId, $this->_crmDir)
+      $this->_activityTypeFile = CRM_Activity_BAO_Activity::getFileForActivityTypeId($this->_activityTypeId, $this->_crmDir)
     ) {
       $this->assign('activityTypeFile', $this->_activityTypeFile);
       $this->assign('crmDir', $this->_crmDir);
@@ -566,8 +565,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
       $defaults['source_contact_id'] = $this->_sourceContactId;
       $defaults['target_contact_id'] = $this->_targetContactId;
 
-      list($defaults['activity_date_time'], $defaults['activity_date_time_time']) =
-        CRM_Utils_Date::setDateDefaults(NULL, 'activityDateTime');
+      list($defaults['activity_date_time'], $defaults['activity_date_time_time'])
+        CRM_Utils_Date::setDateDefaults(NULL, 'activityDateTime');
     }
 
     if ($this->_activityTypeId) {
@@ -1008,7 +1007,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
    * @param array $params
    *   Associated array of submitted values.
    *
-   * @return $this|null|object
+   * @return self|null|object
    */
   protected function processActivity(&$params) {
     $activityAssigned = array();
index fa89d48ba41cc457df6dacb7cdc4e42f590efded..02e925737975b15888fa255d8cb8c8721b9bdf86 100644 (file)
@@ -278,7 +278,7 @@ abstract class CRM_Activity_Import_Parser extends CRM_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
    *
    * @return void
    */
index 23fceb49151a62fb0bd84297989108b0c81c1160..624de900a4b8f17cad63992e480c88c8592026d9 100755 (executable)
@@ -299,8 +299,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
         $newLinks = array();
       }
       elseif ($params['context'] == 'financialBatch') {
-        $values['check'] =
-          "<input type='checkbox' id='check_" .
+        $values['check'] = "<input type='checkbox' id='check_" .
           $object->id .
           "' name='check_" .
           $object->id .
@@ -673,34 +672,33 @@ LEFT JOIN civicrm_contact contact_a ON contact_a.id = civicrm_contribution.conta
 LEFT JOIN civicrm_contribution_soft ON civicrm_contribution_soft.contribution_id = civicrm_contribution.id
 ";
 
-    $searchFields =
-      array(
-        'sort_name',
-        'financial_type_id',
-        'contribution_page_id',
-        'contribution_payment_instrument_id',
-        'contribution_transaction_id',
-        'contribution_source',
-        'contribution_currency_type',
-        'contribution_pay_later',
-        'contribution_recurring',
-        'contribution_test',
-        'contribution_thankyou_date_is_not_null',
-        'contribution_receipt_date_is_not_null',
-        'contribution_pcp_made_through_id',
-        'contribution_pcp_display_in_roll',
-        'contribution_date_relative',
-        'contribution_amount_low',
-        'contribution_amount_high',
-        'contribution_in_honor_of',
-        'contact_tags',
-        'group',
-        'contribution_date_relative',
-        'contribution_date_high',
-        'contribution_date_low',
-        'contribution_check_number',
-        'contribution_status_id',
-      );
+    $searchFields = array(
+      'sort_name',
+      'financial_type_id',
+      'contribution_page_id',
+      'contribution_payment_instrument_id',
+      'contribution_transaction_id',
+      'contribution_source',
+      'contribution_currency_type',
+      'contribution_pay_later',
+      'contribution_recurring',
+      'contribution_test',
+      'contribution_thankyou_date_is_not_null',
+      'contribution_receipt_date_is_not_null',
+      'contribution_pcp_made_through_id',
+      'contribution_pcp_display_in_roll',
+      'contribution_date_relative',
+      'contribution_amount_low',
+      'contribution_amount_high',
+      'contribution_in_honor_of',
+      'contact_tags',
+      'group',
+      'contribution_date_relative',
+      'contribution_date_high',
+      'contribution_date_low',
+      'contribution_check_number',
+      'contribution_status_id',
+    );
     $values = array();
     foreach ($searchFields as $field) {
       if (isset($params[$field])) {
index a55741d6196283a8e006078af4626bf59f63b862..78f3b2d789d5decfde4a514373f268b18cc451f8 100644 (file)
@@ -164,8 +164,9 @@ class CRM_Campaign_Form_Survey_TabHeader {
    */
   public static function getNextTab(&$form) {
     static $next = FALSE;
-    if ($next)
+    if ($next) {
       return $next;
+    }
 
     $tabs = $form->get('tabHeader');
     if (is_array($tabs)) {
index e556aa0690097cc97ca3a33ddfbb78fe49437ecd..f6b59effc6a02565a3f4645856a6539af7ee6f59 100644 (file)
@@ -536,8 +536,7 @@ WHERE     civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
   public function createDefaultCrudLink($crudLinkSpec) {
     switch ($crudLinkSpec['action']) {
       case CRM_Core_Action::VIEW:
-
-        return array(
+        $result = array(
           'title' => $this->display_name,
           'path' => 'civicrm/contact/view',
           'query' => array(
@@ -545,9 +544,10 @@ WHERE     civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
             'cid' => $this->id,
           ),
         );
+        return $result;
 
       case CRM_Core_Action::UPDATE:
-        return array(
+        $result = array(
           'title' => $this->display_name,
           'path' => 'civicrm/contact/add',
           'query' => array(
@@ -556,6 +556,7 @@ WHERE     civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
             'cid' => $this->id,
           ),
         );
+        return $result;
     }
     return NULL;
   }
@@ -1624,10 +1625,10 @@ WHERE id={$id}; ";
 
     // We don't know the contents of return properties, but we need the lower
     // level ids of the contact so add a few fields.
-    $returnProperties['first_name'] =
-    $returnProperties['organization_name'] =
-    $returnProperties['household_name'] =
-    $returnProperties['contact_type'] =
+    $returnProperties['first_name'] = 1;
+    $returnProperties['organization_name'] = 1;
+    $returnProperties['household_name'] = 1;
+    $returnProperties['contact_type'] = 1;
     $returnProperties['contact_sub_type'] = 1;
     return list($query, $options) = CRM_Contact_BAO_Query::apiQuery($params, $returnProperties, $options);
   }
@@ -2556,11 +2557,11 @@ AND       civicrm_openid.is_primary = 1";
         return CRM_Core_BAO_EntityTag::getContactTags($contactId, TRUE);
 
       case 'rel':
-
-        return CRM_Contact_BAO_Relationship::getRelationship($contactId,
+        $result = CRM_Contact_BAO_Relationship::getRelationship($contactId,
           CRM_Contact_BAO_Relationship::CURRENT,
           0, 1
         );
+        return $result;
 
       case 'group':
 
index 60d15129f9ff42fdc3e64096038d038b5eb9f57e..e645f4c096084d1fa269881d54fd92becdcbfe1d 100644 (file)
@@ -515,8 +515,6 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
         $this->where_tables = serialize($whereTables);
       }
     }
-
-    return;
   }
 
   /**
index 7e6ef24df5397faff621060c8b1ce0817c7eace3..eae321ae3906b09f1fcb2cb8d2a463813e34d412 100644 (file)
@@ -498,11 +498,10 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
         // make we require one primary block, CRM-5505
         if ($updateMode) {
           if (!$hasPrimary) {
-            $hasPrimary =
-              CRM_Utils_Array::value(
-                'is_primary',
-                CRM_Utils_Array::value($instance, $defaults[$name])
-              );
+            $hasPrimary = CRM_Utils_Array::value(
+              'is_primary',
+              CRM_Utils_Array::value($instance, $defaults[$name])
+            );
           }
           continue;
         }
index de9472fcc31fdd4be89d4d274d4f74fe8bad3a21..5c18365737d5964a38e099dd7f12b01ebb46b142 100644 (file)
@@ -406,8 +406,6 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search {
         }
       }
     }
-
-    return;
   }
 
   /**
index a0c77f777dd5d0941394f7b7758b8f4f4f446f36..039069e3e1cd2c42d06f18103e0f0375e0697b6f 100644 (file)
@@ -92,8 +92,6 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task {
   /**
    * Set default values for the form.
    *
-   * @param null
-   *
    * @return array
    *   array of default values
    */
index a66c3e6857aa7e7ee34536475996e2c7d8f66a2a..f081e32b5f1647f02d6b8544f7cd5b2abbe7df9f 100644 (file)
@@ -144,7 +144,6 @@ class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDF
       if (isset($tokens[$entity]) && is_array($tokens[$entity])) {
         foreach ($tokens[$entity] as $token) {
           if (!self::isHtmlTokenInTableCell($token, $entity, $html)) {
-            ;
             return FALSE;
           }
         }
index cafff343e5155f0f51452b5752f4b6ad49266f57..342486dc628a250fd771aca215fa772050b01b3e 100644 (file)
@@ -364,15 +364,14 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address {
       CRM_Utils_Address_USPS::checkAddress($params);
 
       // do street parsing again if enabled, since street address might have changed
-      $parseStreetAddress =
-        CRM_Utils_Array::value(
-          'street_address_parsing',
-          CRM_Core_BAO_Setting::valueOptions(
-            CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
-            'address_options'
-          ),
-          FALSE
-        );
+      $parseStreetAddress = CRM_Utils_Array::value(
+        'street_address_parsing',
+        CRM_Core_BAO_Setting::valueOptions(
+          CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
+          'address_options'
+        ),
+        FALSE
+      );
 
       if ($parseStreetAddress && !empty($params['street_address'])) {
         foreach (array(
@@ -711,8 +710,10 @@ ORDER BY civicrm_address.is_primary DESC, civicrm_address.location_type_id DESC,
    * NB: civic street formats for en_CA and fr_CA used by default if those locales are active
    *     otherwise en_US format is default action
    *
-   * @param string Street address including number and apt
-   * @param string Locale - to set locale used to parse address
+   * @param string $streetAddress
+   *   Street address including number and apt.
+   * @param string $locale
+   *   Locale used to parse address.
    *
    * @return array
    *   parsed fields values.
@@ -893,11 +894,10 @@ ORDER BY civicrm_address.is_primary DESC, civicrm_address.location_type_id DESC,
   public static function validateAddressOptions($fields) {
     static $addressOptions = NULL;
     if (!$addressOptions) {
-      $addressOptions =
-        CRM_Core_BAO_Setting::valueOptions(
-          CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
-          'address_options'
-        );
+      $addressOptions = CRM_Core_BAO_Setting::valueOptions(
+        CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
+        'address_options'
+      );
     }
 
     if (is_array($fields) && !empty($fields)) {
@@ -1033,8 +1033,11 @@ SELECT is_primary,
     $uniqueAddress = array();
     foreach (array_keys($rows) as $rowID) {
       // load complete address as array key
-      $address =
-        trim($rows[$rowID]['street_address']) . trim($rows[$rowID]['city']) . trim($rows[$rowID]['state_province']) . trim($rows[$rowID]['postal_code']) . trim($rows[$rowID]['country']);
+      $address = trim($rows[$rowID]['street_address'])
+        . trim($rows[$rowID]['city'])
+        . trim($rows[$rowID]['state_province'])
+        . trim($rows[$rowID]['postal_code'])
+        . trim($rows[$rowID]['country']);
       if (isset($rows[$rowID]['last_name'])) {
         $name = $rows[$rowID]['last_name'];
       }
index 8bd142da0a899bed25bafe0a15c4c2ab7498643f..c923c542ac2e567ba1d85f50af457f11af4810d6 100644 (file)
@@ -63,8 +63,6 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
   /**
    * Build and retrieve the list of data types and descriptions
    *
-   * @param NULL
-   *
    * @return array
    *   Data type => Description
    */
@@ -1609,7 +1607,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
     );
 
     if (!array_key_exists($customFieldId, $customFields)) {
-      return;
+      return NULL;
     }
 
     // return if field is a 'code' field
index 0cee4a3381386113ae4671a8231ced9c69f8250a..98aa0b6321bea67b3182cf983d2d8fa45338f679 100644 (file)
@@ -80,8 +80,7 @@ class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup {
       $params['extends'][0] == 'ParticipantEventName' ||
       $params['extends'][0] == 'ParticipantEventType'
     ) {
-      $group->extends_entity_column_id =
-        CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $params['extends'][0], 'value', 'name');
+      $group->extends_entity_column_id = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $params['extends'][0], 'value', 'name');
     }
 
     //this is format when form get submit.
@@ -274,9 +273,7 @@ class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup {
     $dao = new CRM_Core_DAO_CustomGroup();
     $dao->extends = $extends;
     $dao->extends_entity_column_id = $columnId;
-    $escapedValue =
-      CRM_Core_DAO::VALUE_SEPARATOR . CRM_Core_DAO::escapeString($columnValue) .
-      CRM_Core_DAO::VALUE_SEPARATOR;
+    $escapedValue = CRM_Core_DAO::VALUE_SEPARATOR . CRM_Core_DAO::escapeString($columnValue) . CRM_Core_DAO::VALUE_SEPARATOR;
     $dao->whereAdd("extends_entity_column_value LIKE \"%$escapedValue%\"");
     //$dao->extends_entity_column_value = $columnValue;
     return $dao->find() ? TRUE : FALSE;
@@ -517,8 +514,7 @@ ORDER BY civicrm_custom_group.weight,
     }
 
     $cacheKey = "CRM_Core_DAO_CustomGroup_Query " . md5($cacheString);
-    $multipleFieldGroupCacheKey =
-      "CRM_Core_DAO_CustomGroup_QueryMultipleFields " . md5($cacheString);
+    $multipleFieldGroupCacheKey = "CRM_Core_DAO_CustomGroup_QueryMultipleFields " . md5($cacheString);
     $cache = CRM_Utils_Cache::singleton();
     $tablesWithEntityData = array();
     if ($fromCache) {
@@ -827,12 +823,9 @@ ORDER BY civicrm_custom_group.weight,
               'entity_id',
               'file_id'
             );
-            $customValue['imageURL'] =
-              str_replace('persist/contribute', 'custom', $config->imageUploadURL) .
+            $customValue['imageURL'] = str_replace('persist/contribute', 'custom', $config->imageUploadURL) .
               $fileDAO->uri;
-            list($path) = CRM_Core_BAO_File::path($fileDAO->id, $entityId,
-              NULL, NULL
-            );
+            list($path) = CRM_Core_BAO_File::path($fileDAO->id, $entityId, NULL, NULL);
             if ($path && file_exists($path)) {
               list($imageWidth, $imageHeight) = getimagesize($path);
               list($imageThumbWidth, $imageThumbHeight) = CRM_Contact_BAO_Contact::getThumbSize($imageWidth, $imageHeight);
@@ -1169,11 +1162,11 @@ ORDER BY civicrm_custom_group.weight,
    * Add the whereAdd clause for the DAO depending on the type of entity
    * the custom group is extending.
    *
-   * @param $customGroupDAO
+   * @param object $customGroupDAO
    * @param string $entityType
    *   What entity are we extending here ?.
    *
-   * @param object CRM_Core_DAO_CustomGroup (reference) - Custom Group DAO.
+   * @param int $entityID
    * @param bool $allSubtypes
    *
    * @return void
@@ -1461,10 +1454,9 @@ ORDER BY civicrm_custom_group.weight,
           case 'CheckBox':
             if (!empty($v)) {
               $customValue = array_keys($v);
-              $groupTree[$groupID]['fields'][$fieldId]['customValue']['data'] =
-                CRM_Core_DAO::VALUE_SEPARATOR .
-                implode(CRM_Core_DAO::VALUE_SEPARATOR, $customValue) .
-                CRM_Core_DAO::VALUE_SEPARATOR;
+              $groupTree[$groupID]['fields'][$fieldId]['customValue']['data'] = CRM_Core_DAO::VALUE_SEPARATOR
+                . implode(CRM_Core_DAO::VALUE_SEPARATOR, $customValue)
+                . CRM_Core_DAO::VALUE_SEPARATOR;
             }
             else {
               $groupTree[$groupID]['fields'][$fieldId]['customValue']['data'] = NULL;
@@ -1477,10 +1469,9 @@ ORDER BY civicrm_custom_group.weight,
             //added for Multi-Select
           case 'Multi-Select':
             if (!empty($v)) {
-              $groupTree[$groupID]['fields'][$fieldId]['customValue']['data'] =
-                CRM_Core_DAO::VALUE_SEPARATOR .
-                implode(CRM_Core_DAO::VALUE_SEPARATOR, $v) .
-                CRM_Core_DAO::VALUE_SEPARATOR;
+              $groupTree[$groupID]['fields'][$fieldId]['customValue']['data'] = CRM_Core_DAO::VALUE_SEPARATOR
+                . implode(CRM_Core_DAO::VALUE_SEPARATOR, $v)
+                . CRM_Core_DAO::VALUE_SEPARATOR;
             }
             else {
               $groupTree[$groupID]['fields'][$fieldId]['customValue']['data'] = NULL;
@@ -1802,7 +1793,7 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1,
    * @param array $groupTree
    * @param int $groupCount
    *   Group count by default 1, but can varry for multiple value custom data.
-   * @param object form object
+   * @param object $form
    *
    * @return array
    */
index 32ea5c9be1870a28ec6a5965946e6050de673a8b..14cd04f52c142e113551712f0e8d1535a3d16398 100644 (file)
@@ -90,7 +90,7 @@ class CRM_Core_BAO_Phone extends CRM_Core_DAO_Phone {
    * Given the list of params in the params array, fetch the object
    * and store the values in the values array
    *
-   * @param array entityBlock input parameters to find object
+   * @param array $entityBlock
    *
    * @return array
    *   array of phone objects
index ada8d3eecc842f3bdc5664a67530d88e634d49d2..f42e66c6f98d669ea54e30e687285f4204205970 100644 (file)
@@ -304,15 +304,14 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
           }
         }
         else {
-          $setting =
-            CRM_Core_BAO_Setting::getItem(
-              $fields['values'][$name]['group_name'],
-              $name,
-              CRM_Utils_Array::value('component_id', $params),
-              NULL,
-              CRM_Utils_Array::value('contact_id', $params),
-              $domainID
-            );
+          $setting = CRM_Core_BAO_Setting::getItem(
+            $fields['values'][$name]['group_name'],
+            $name,
+            CRM_Utils_Array::value('component_id', $params),
+            NULL,
+            CRM_Utils_Array::value('contact_id', $params),
+            $domainID
+          );
         }
         if (!is_null($setting)) {
           // we won't return if not set - helps in return all scenario - otherwise we can't indentify the missing ones
index 7d868d19160703b55ca842467426416404bd9951..b68f8fef6505e6c6e93a8ab598f7d646cedfa17e 100644 (file)
@@ -502,10 +502,11 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   /**
    * Add default Next / Back buttons
    *
-   * @param array array of associative arrays in the order in which the buttons should be
-   *                displayed. The associate array has 3 fields: 'type', 'name' and 'isDefault'
-   *                The base form class will define a bunch of static arrays for commonly used
-   *                formats
+   * @param array $params
+   *   Array of associative arrays in the order in which the buttons should be
+   *   displayed. The associate array has 3 fields: 'type', 'name' and 'isDefault'
+   *   The base form class will define a bunch of static arrays for commonly used
+   *   formats.
    *
    * @return void
    */
@@ -620,7 +621,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   /**
    * Setter function for options
    *
-   * @param mixed
+   * @param mixed $options
    *
    * @return void
    */
@@ -661,7 +662,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   /**
    * Setter function for Form Action
    *
-   * @param string
+   * @param string $action
    *
    * @return void
    */
@@ -763,9 +764,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   /**
    * Store the variable with the value in the form scope
    *
-   * @param string name : name of the variable
-   * @param mixed value : value of the variable
-   *
+   * @param string $name
+   *   Name of the variable.
+   * @param mixed $value
+   *   Value of the variable.
    *
    * @return void
    */
@@ -776,8 +778,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   /**
    * Get the variable from the form scope
    *
-   * @param string name : name of the variable
-   *
+   * @param string $name
+   *   Name of the variable
    *
    * @return mixed
    */
index 743b5baadbcf0af9fc84404abc04fcb1a84f54f8..40f96a5b46babb65792d42ffc9205f4d9ce3f7e3 100644 (file)
@@ -369,28 +369,26 @@ class CRM_Core_Form_RecurringEntity {
           if ($optionGroupIdExists) {
             CRM_Core_BAO_OptionGroup::del($optionGroupIdExists);
           }
-          $optionGroupParams =
-            array(
-              'name' => $type . '_repeat_exclude_dates_' . $actionScheduleObj->entity_value,
-              'title' => $type . ' recursion',
-              'is_reserved' => 0,
-              'is_active' => 1,
-            );
+          $optionGroupParams = array(
+            'name' => $type . '_repeat_exclude_dates_' . $actionScheduleObj->entity_value,
+            'title' => $type . ' recursion',
+            'is_reserved' => 0,
+            'is_active' => 1,
+          );
           $opGroup = CRM_Core_BAO_OptionGroup::add($optionGroupParams);
           if ($opGroup->id) {
             $oldWeight = 0;
             $fieldValues = array('option_group_id' => $opGroup->id);
             foreach ($excludeDates as $val) {
-              $optionGroupValue =
-                array(
-                  'option_group_id' => $opGroup->id,
-                  'label' => CRM_Utils_Date::processDate($val),
-                  'value' => CRM_Utils_Date::processDate($val),
-                  'name' => $opGroup->name,
-                  'description' => 'Used for recurring ' . $type,
-                  'weight' => CRM_Utils_Weight::updateOtherWeights('CRM_Core_DAO_OptionValue', $oldWeight, CRM_Utils_Array::value('weight', $params), $fieldValues),
-                  'is_active' => 1,
-                );
+              $optionGroupValue = array(
+                'option_group_id' => $opGroup->id,
+                'label' => CRM_Utils_Date::processDate($val),
+                'value' => CRM_Utils_Date::processDate($val),
+                'name' => $opGroup->name,
+                'description' => 'Used for recurring ' . $type,
+                'weight' => CRM_Utils_Weight::updateOtherWeights('CRM_Core_DAO_OptionValue', $oldWeight, CRM_Utils_Array::value('weight', $params), $fieldValues),
+                'is_active' => 1,
+              );
               $excludeDateList[] = $optionGroupValue['value'];
               CRM_Core_BAO_OptionValue::add($optionGroupValue);
             }
index dd66874cd257ec8f49284f13eb0978ab49046455..f461bf693b3f130c2a03486eb61c80b4a45f999e 100644 (file)
@@ -167,7 +167,7 @@ class CRM_Core_Payment_BaseIPN {
         CRM_Core_Error::debug_log_message($e->getMessage());
       }
       if (!empty($error_handling['echo_error'])) {
-        echo($e->getMessage());
+        echo $e->getMessage();
       }
       if (!empty($error_handling['return_error'])) {
         return array(
index 4404f71034358896dc756cee1fe4afebf472ef73..4a3be6df748f5a97f7715518d80d2a55f8a99ab1 100644 (file)
@@ -248,8 +248,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     //$args['desc']           = 'Recurring Contribution';
     $args['totalbillingcycles'] = $params['installments'];
     $args['version'] = '56.0';
-    $args['profilereference'] =
-      "i={$params['invoiceID']}" .
+    $args['profilereference'] = "i={$params['invoiceID']}" .
       "&m=$component" .
       "&c={$params['contactID']}" .
       "&r={$params['contributionRecurID']}" .
@@ -335,7 +334,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
       $args['billingfrequency'] = $params['frequency_interval'];
       $args['method'] = "CreateRecurringPaymentsProfile";
       $args['profilestartdate'] = $start_date;
-      $args['desc'] =
+      $args['desc'] = "" .
         $params['description'] . ": " .
         $params['amount'] . " Per " .
         $params['frequency_interval'] . " " .
@@ -343,7 +342,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
       $args['amt'] = $params['amount'];
       $args['totalbillingcycles'] = $params['installments'];
       $args['version'] = 56.0;
-      $args['PROFILEREFERENCE'] =
+      $args['PROFILEREFERENCE'] = "" .
         "i=" . $params['invoiceID'] . "&m=" . $component .
         "&c=" . $params['contactID'] . "&r=" . $params['contributionRecurID'] .
         "&b=" . $params['contributionID'] . "&p=" . $params['contributionPageID'];
index 91c3b2f6bddba76d8b0b6fc193e03692f8c21344..0aba51b29e4777db47bb73386d5aea5a4ec622b0 100644 (file)
@@ -128,10 +128,6 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
    *
    * @param array $params
    *   Assoc array of input parameters for this transaction.
-   *
-   * @return array|NULL
-   *   the result in an nice formatted array (or an error object)
-   * @abstract
    */
   public function doDirectPayment(&$params) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
index 97cbf01c1bf5c73abd1d040105cbeaf83265f1c1..fd93f5f9eab38749718b5f9e8366bbdfd9c015b9 100644 (file)
@@ -102,7 +102,6 @@ class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base {
    * @inheritDoc
    */
   public function upgradePermissions($permissions) {
-    return;
   }
 
 }
index 782eb289080efdc2ac6f1bb8ef3ae98a640284fa..cc9544bca8c4bd52333dc3ad7b4b766ccbcc1c93 100644 (file)
@@ -51,8 +51,10 @@ interface CRM_Core_Selector_API {
    *  csvString - The html string to display for export as csv
    *  rowCount  - the number of rows to be included
    *
-   * @param string action the action being performed
-   * @param array params the array that the pagerParams will be inserted into
+   * @param string $action
+   *   The action being performed.
+   * @param array $params
+   *   The array that the pagerParams will be inserted into.
    *
    * @return void
    */
@@ -61,7 +63,8 @@ interface CRM_Core_Selector_API {
   /**
    * Returns the sort order array for the given action
    *
-   * @param string action the action being performed
+   * @param string $action
+   *   The action being performed.
    *
    * @return array
    *   the elements that can be sorted along with their properties
@@ -85,7 +88,8 @@ interface CRM_Core_Selector_API {
   /**
    * Returns the number of rows for this action
    *
-   * @param string action the action being performed
+   * @param string $action
+   *   The action being performed.
    *
    * @return int
    *   the total number of rows for this action
@@ -124,7 +128,8 @@ interface CRM_Core_Selector_API {
   /**
    * Return the filename for the exported CSV
    *
-   * @param string type the type of export required: csv/xml/foaf etc
+   * @param string $type
+   *   The type of export required: csv/xml/foaf etc.
    *
    * @return string
    *   the fileName which we will munge to skip spaces and
index 8c6cd75059082ad56a591e5f824b31923fddbd7c..7187541b06447461e2ec9a8a10047c93a0e924a5 100644 (file)
  *   {$my_string|substring:2:4}
  *   returns substring from character 2 until character 6
  * @link based on substr(): http://www.zend.com/manual/function.substr.php
- * @param string
- * @param position: startposition of the substring, beginning with 0
- * @param length: length of substring
+ * @param string $string
+ * @param int $position
+ *   startposition of the substring, beginning with 0
+ * @param int $length
+ *   length of substring
  * @return string
- *
- * -------------------------------------------------------------
  */
 function smarty_modifier_substring($string, $position, $length) {
   return substr($string, $position, $length);
index 6c49c109fe310402e198697674c56602985878d2..d324b1e9e998267969619f63e52ae6f011e44f14 100644 (file)
@@ -712,11 +712,9 @@ GROUP BY  participant.event_id
       $extIdentifier = CRM_Utils_Array::value('external_identifier', $contactFields);
       if ($extIdentifier) {
         $tmpContactField['external_identifier'] = $extIdentifier;
-        $tmpContactField['external_identifier']['title'] =
-          CRM_Utils_Array::value('title', $extIdentifier) . ' (match to contact)';
+        $tmpContactField['external_identifier']['title'] = CRM_Utils_Array::value('title', $extIdentifier) . ' (match to contact)';
       }
-      $tmpFields['participant_contact_id']['title'] =
-        $tmpFields['participant_contact_id']['title'] . ' (match to contact)';
+      $tmpFields['participant_contact_id']['title'] = $tmpFields['participant_contact_id']['title'] . ' (match to contact)';
 
       $fields = array_merge($fields, $tmpContactField);
       $fields = array_merge($fields, $tmpFields);
@@ -1811,14 +1809,16 @@ WHERE cpf.price_set_id = %1 AND cpfv.label LIKE %2";
         $contributionParams['contribution']->financial_type_id, $relationTypeId);
       if (!empty($contributionParams['trxnParams']['from_financial_account_id'])) {
         $contributionParams['trxnParams']['total_amount'] = $mainAmount - $contributionParams['total_amount'];
-        $contributionParams['trxnParams']['payment_processor_id'] = $contributionParams['trxnParams']['payment_instrument_id'] =
-        $contributionParams['trxnParams']['check_number'] = $contributionParams['trxnParams']['trxn_id'] =
-        $contributionParams['trxnParams']['net_amount'] = $contributionParams['trxnParams']['fee_amount'] = NULL;
+        $contributionParams['trxnParams']['payment_processor_id'] = NULL;
+        $contributionParams['trxnParams']['payment_instrument_id'] = NULL;
+        $contributionParams['trxnParams']['check_number'] = NULL;
+        $contributionParams['trxnParams']['trxn_id'] = NULL;
+        $contributionParams['trxnParams']['net_amount'] = NULL;
+        $contributionParams['trxnParams']['fee_amount'] = NULL;
 
         CRM_Core_BAO_FinancialTrxn::create($contributionParams['trxnParams']);
       }
     }
-    return;
   }
 
   /**
@@ -2087,8 +2087,11 @@ WHERE (li.entity_table = 'civicrm_participant' AND li.entity_id = {$participantI
       $ftDetail = CRM_Core_BAO_FinancialTrxn::getBalanceTrxnAmt($contributionId);
       // adjusted amount financial_trxn creation
       if (empty($ftDetail['trxn_id'])) {
-        $updatedContribution =
-          CRM_Contribute_BAO_Contribution::getValues(array('id' => $contributionId), CRM_Core_DAO::$_nullArray, CRM_Core_DAO::$_nullArray);
+        $updatedContribution = CRM_Contribute_BAO_Contribution::getValues(
+          array('id' => $contributionId),
+          CRM_Core_DAO::$_nullArray,
+          CRM_Core_DAO::$_nullArray
+        );
         $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' "));
         $toFinancialAccount = CRM_Contribute_PseudoConstant::financialAccountType($updatedContribution->financial_type_id, $relationTypeId);
 
index 43cf2b20fc7b60168281007688c973687c52ced8..f0166b7185b99c49e7398f4d6ef6a8f51a90e9c6 100644 (file)
@@ -101,7 +101,7 @@ class CRM_Event_Cart_BAO_Cart extends CRM_Event_Cart_DAO_Cart {
   }
 
   /**
-   * @return $this|bool|CRM_Event_Cart_BAO_Cart
+   * @return self|bool|CRM_Event_Cart_BAO_Cart
    */
   public static function find_or_create_for_current_session() {
     $session = CRM_Core_Session::singleton();
index 780fe1f5184381918693bc95d0eadc00d715a16b..4428b7d63a1ba8e8f74e08230bae488fb51e8db9 100644 (file)
@@ -74,8 +74,7 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     $this->_grantType = NULL;
     if ($this->_id) {
-      $this->_grantType =
-        CRM_Core_DAO::getFieldValue('CRM_Grant_DAO_Grant', $this->_id, 'grant_type_id');
+      $this->_grantType = CRM_Core_DAO::getFieldValue('CRM_Grant_DAO_Grant', $this->_id, 'grant_type_id');
     }
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
 
index 174a829ae6b8d404d0830562a853de89bcb2d5fd..7b3da4e6f72b1d9d4b7ad73704e2e7e0a1e3ad00 100644 (file)
@@ -64,8 +64,8 @@ class CRM_Mailing_BAO_Query {
       $query->_element['mailing_id'] = 1;
 
       // base table is contact, so join recipients to it
-      $query->_tables['civicrm_mailing_recipients'] = $query->_whereTables['civicrm_mailing_recipients'] =
-        " INNER JOIN civicrm_mailing_recipients ON civicrm_mailing_recipients.contact_id = contact_a.id ";
+      $query->_tables['civicrm_mailing_recipients'] = $query->_whereTables['civicrm_mailing_recipients']
+        " INNER JOIN civicrm_mailing_recipients ON civicrm_mailing_recipients.contact_id = contact_a.id ";
 
       $query->_tables['civicrm_mailing'] = $query->_whereTables['civicrm_mailing'] = 1;
 
@@ -83,8 +83,8 @@ class CRM_Mailing_BAO_Query {
 
       // get mailing status
       if (!empty($query->_returnProperties['mailing_job_status'])) {
-        $query->_tables['civicrm_mailing_job'] = $query->_whereTables['civicrm_mailing_job'] =
-          " LEFT JOIN civicrm_mailing_job ON civicrm_mailing_job.mailing_id = civicrm_mailing.id AND civicrm_mailing_job.parent_id IS NULL AND civicrm_mailing_job.is_test != 1 ";
+        $query->_tables['civicrm_mailing_job'] = $query->_whereTables['civicrm_mailing_job']
+          " LEFT JOIN civicrm_mailing_job ON civicrm_mailing_job.mailing_id = civicrm_mailing.id AND civicrm_mailing_job.parent_id IS NULL AND civicrm_mailing_job.is_test != 1 ";
         $query->_select['mailing_job_status'] = "civicrm_mailing_job.status as mailing_job_status";
         $query->_element['mailing_job_status'] = 1;
       }
@@ -111,8 +111,8 @@ class CRM_Mailing_BAO_Query {
 
       // mailing job end date / completed date
       if (!empty($query->_returnProperties['mailing_job_end_date'])) {
-        $query->_tables['civicrm_mailing_job'] = $query->_whereTables['civicrm_mailing_job'] =
-          " LEFT JOIN civicrm_mailing_job ON civicrm_mailing_job.mailing_id = civicrm_mailing.id AND civicrm_mailing_job.parent_id IS NULL AND civicrm_mailing_job.is_test != 1 ";
+        $query->_tables['civicrm_mailing_job'] = $query->_whereTables['civicrm_mailing_job']
+          " LEFT JOIN civicrm_mailing_job ON civicrm_mailing_job.mailing_id = civicrm_mailing.id AND civicrm_mailing_job.parent_id IS NULL AND civicrm_mailing_job.is_test != 1 ";
         $query->_select['mailing_job_end_date'] = "civicrm_mailing_job.end_date as mailing_job_end_date";
         $query->_element['mailing_job_end_date'] = 1;
       }
index ad1b027c486e6559f4bf4b256dbcfaad1caebc59..5742c0b6c2839f7c3658a57039295d78f29a740b 100644 (file)
@@ -64,8 +64,6 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task {
   /**
    * Set default values for the form.
    *
-   * @param null
-   *
    * @return array
    *   array of default values
    */
index ba380113832d10fe0b88e4117efe54e75da98b0b..3c8898f2a18c61f74ce050c20b8efb7bcde8babb 100644 (file)
@@ -76,8 +76,6 @@ class CRM_Price_Page_Option 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
    */
@@ -120,8 +118,6 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
   /**
    * Browse all price fields.
    *
-   * @param null
-   *
    * @return void
    */
   public function browse() {
@@ -255,12 +251,9 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
    * This method is called after the page is created. It checks for the
    * type of action and executes that action.
    *
-   * @param null
-   *
    * @return void
    */
   public function run() {
-
     // get the field id
     $this->_fid = CRM_Utils_Request::retrieve('fid', 'Positive',
       $this, FALSE, 0
index 995ec03b283dac88fca23542da7cca9e23f918ed..9314b1f1f06f02d636a65d091e6c409675532911 100644 (file)
@@ -1333,7 +1333,7 @@ class CRM_Report_Form extends CRM_Core_Form {
       case CRM_Report_Form::OP_INT:
       case CRM_Report_Form::OP_FLOAT:
 
-        return array(
+        $result = array(
           'lte' => ts('Is less than or equal to'),
           'gte' => ts('Is greater than or equal to'),
           'bw' => ts('Is between'),
@@ -1345,39 +1345,44 @@ class CRM_Report_Form extends CRM_Core_Form {
           'nll' => ts('Is empty (Null)'),
           'nnll' => ts('Is not empty (Null)'),
         );
+        return $result;
 
       case CRM_Report_Form::OP_SELECT:
-        return array(
+        $result = array(
           'eq' => ts('Is equal to'),
         );
+        return $result;
 
       case CRM_Report_Form::OP_MONTH:
       case CRM_Report_Form::OP_MULTISELECT:
       case CRM_Report_Form::OP_ENTITYREF:
 
-        return array(
+        $result = array(
           'in' => ts('Is one of'),
           'notin' => ts('Is not one of'),
         );
+        return $result;
 
       case CRM_Report_Form::OP_DATE:
 
-        return array(
+        $result = array(
           'nll' => ts('Is empty (Null)'),
           'nnll' => ts('Is not empty (Null)'),
         );
+        return $result;
 
       case CRM_Report_Form::OP_MULTISELECT_SEPARATOR:
         // use this operator for the values, concatenated with separator. For e.g if
         // multiple options for a column is stored as ^A{val1}^A{val2}^A
-        return array(
+        $result = array(
           'mhas' => ts('Is one of'),
           'mnot' => ts('Is not one of'),
         );
+        return $result;
 
       default:
         // type is string
-        return array(
+        $result = array(
           'has' => ts('Contains'),
           'sw' => ts('Starts with'),
           'ew' => ts('Ends with'),
@@ -1387,6 +1392,7 @@ class CRM_Report_Form extends CRM_Core_Form {
           'nll' => ts('Is empty (Null)'),
           'nnll' => ts('Is not empty (Null)'),
         );
+        return $result;
     }
   }
 
index 1583964c24ae475dd4e62d410db54b8d4de81c06..bd7ca05529afacaebdcfc7b243557460359b89ae 100644 (file)
@@ -564,8 +564,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
                 empty($this->_params['activity_type_id_value'])
               ) {
                 $actTypes = array_flip(CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'label', TRUE));
-                $clause =
-                  "( {$this->_aliases['civicrm_activity']}.activity_type_id IN (" .
+                $clause = "( {$this->_aliases['civicrm_activity']}.activity_type_id IN (" .
                   implode(',', $actTypes) . ") )";
               }
             }
index e09cb847dfc81ab5fded705a97b320b39aae3061..d012d3edc3a4dc431785f94f842bd13550eef00d 100644 (file)
@@ -468,8 +468,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
     $dao = CRM_Core_DAO::executeQuery($sql);
 
     while ($dao->fetch()) {
-      $totalAmount[] =
-        CRM_Utils_Money::format($dao->amount, $dao->currency) . " (" .
+      $totalAmount[] = CRM_Utils_Money::format($dao->amount, $dao->currency) . " (" .
         $dao->count . ")";
       $average[] = CRM_Utils_Money::format($dao->avg, $dao->currency);
       $count += $dao->count;
@@ -507,8 +506,7 @@ SELECT COUNT(contribution_soft_civireport.amount ) as count,
 GROUP BY {$this->_aliases['civicrm_contribution']}.currency";
       $dao = CRM_Core_DAO::executeQuery($sql);
       while ($dao->fetch()) {
-        $totalAmount[] =
-          CRM_Utils_Money::format($dao->amount, $dao->currency) . " (" .
+        $totalAmount[] = CRM_Utils_Money::format($dao->amount, $dao->currency) . " (" .
           $dao->count . ")";
         $average[] = CRM_Utils_Money::format($dao->avg, $dao->currency);
         $count += $dao->count;
@@ -550,8 +548,7 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency";
 
     // 1. use main contribution query to build temp table 1
     $sql = $this->buildQuery();
-    $tempQuery =
-      'CREATE TEMPORARY TABLE civireport_contribution_detail_temp1 AS ' . $sql;
+    $tempQuery = 'CREATE TEMPORARY TABLE civireport_contribution_detail_temp1 AS ' . $sql;
     CRM_Core_DAO::executeQuery($tempQuery);
     $this->setPager();
 
@@ -565,8 +562,7 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency";
     $select = str_ireplace("'Contribution' as", "'Soft Credit' as", $select);
     // we inner join with temp1 to restrict soft contributions to those in temp1 table
     $sql = "{$select} {$this->_from} {$this->_where} {$this->_groupBy}";
-    $tempQuery =
-      'CREATE TEMPORARY TABLE civireport_contribution_detail_temp2 AS ' . $sql;
+    $tempQuery = 'CREATE TEMPORARY TABLE civireport_contribution_detail_temp2 AS ' . $sql;
     CRM_Core_DAO::executeQuery($tempQuery);
     if (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) ==
       'soft_credits_only'
index 5361a4e22a6ae2d42a50d61c75e704eabf8bc9a9..9cd7d364df7e1ef9bccfe6faf219741e0dbf52a7 100644 (file)
@@ -314,8 +314,7 @@ class CRM_Report_Form_Contribute_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];
 
@@ -544,15 +543,15 @@ ROUND(AVG({$this->_aliases['civicrm_contribution_soft']}.amount), 2) as civicrm_
     $totalAmount = $average = $softTotalAmount = $softAverage = array();
     $count = $softCount = 0;
     while ($dao->fetch()) {
-      $totalAmount[] =
-        CRM_Utils_Money::format($dao->civicrm_contribution_total_amount_sum, $dao->currency) .
+      $totalAmount[]
+        CRM_Utils_Money::format($dao->civicrm_contribution_total_amount_sum, $dao->currency) .
         " (" . $dao->civicrm_contribution_total_amount_count . ")";
       $average[] = CRM_Utils_Money::format($dao->civicrm_contribution_total_amount_avg, $dao->currency);
       $count += $dao->civicrm_contribution_total_amount_count;
 
       if ($softCredit) {
-        $softTotalAmount[] =
-          CRM_Utils_Money::format($dao->civicrm_contribution_soft_soft_amount_sum, $dao->currency) .
+        $softTotalAmount[]
+          CRM_Utils_Money::format($dao->civicrm_contribution_soft_soft_amount_sum, $dao->currency) .
           " (" . $dao->civicrm_contribution_soft_soft_amount_count . ")";
         $softAverage[] = CRM_Utils_Money::format($dao->civicrm_contribution_soft_soft_amount_avg, $dao->currency);
         $softCount += $dao->civicrm_contribution_soft_soft_amount_count;
index 78d937834c56f1ca7faeb62bfdc3ba4191c5f824..6b3d80fa19599e0f0431b8e06790fe72a6597ee9 100644 (file)
@@ -315,8 +315,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
 
   public function groupBy() {
     $this->assign('chartSupported', TRUE);
-    $this->_groupBy =
-      "Group BY {$this->_aliases['civicrm_contribution']}.contact_id, " .
+    $this->_groupBy = "Group BY {$this->_aliases['civicrm_contribution']}.contact_id, " .
       self::fiscalYearOffset($this->_aliases['civicrm_contribution'] .
         '.receive_date') . " WITH ROLLUP ";
   }
@@ -376,7 +375,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
         $sql = "{$this->_select} {$this->_from} {$this->_where} {$this->_groupBy}";
       }
       else {
-        $sql =
+        $sql = "" .
           "{$this->_select} {$this->_from} WHERE {$this->_aliases['civicrm_contact']}.id IN (" .
           implode(',', $contactIds) .
           ") AND {$this->_aliases['civicrm_contribution']}.is_test = 0 {$this->_statusClause} {$this->_groupBy} ";
@@ -412,8 +411,8 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
           $rows[$dao->civicrm_contribution_contact_id]['civicrm_life_time_total'] = $dao->civicrm_contribution_total_amount;
           if (($dao->civicrm_contribution_total_amount - $contributionSum) > 0
           ) {
-            $rows[$dao->civicrm_contribution_contact_id]["civicrm_upto_{$upTo_year}"] =
-              $dao->civicrm_contribution_total_amount - $contributionSum;
+            $rows[$dao->civicrm_contribution_contact_id]["civicrm_upto_{$upTo_year}"]
+              $dao->civicrm_contribution_total_amount - $contributionSum;
           }
           $contributionSum = 0;
         }
@@ -448,18 +447,18 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
     $interval["upto_{$upto}"] = "Up To {$upto}";
 
     foreach ($rows as $key => $row) {
-      $display["upto_{$upto}"] =
-        CRM_Utils_Array::value("upto_{$upto}", $display) +
-        CRM_Utils_Array::value("civicrm_upto_{$upto}", $row);
-      $display[$previous_year] =
-        CRM_Utils_Array::value($previous_year, $display) +
-        CRM_Utils_Array::value($previous_year, $row);
-      $display[$previous_two_year] =
-        CRM_Utils_Array::value($previous_two_year, $display) +
-        CRM_Utils_Array::value($previous_two_year, $row);
-      $display[$previous_three_year] =
-        CRM_Utils_Array::value($previous_three_year, $display) +
-        CRM_Utils_Array::value($previous_three_year, $row);
+      $display["upto_{$upto}"]
+        = CRM_Utils_Array::value("upto_{$upto}", $display)
+        CRM_Utils_Array::value("civicrm_upto_{$upto}", $row);
+      $display[$previous_year]
+        = CRM_Utils_Array::value($previous_year, $display)
+        CRM_Utils_Array::value($previous_year, $row);
+      $display[$previous_two_year]
+        = CRM_Utils_Array::value($previous_two_year, $display)
+        CRM_Utils_Array::value($previous_two_year, $row);
+      $display[$previous_three_year]
+        = CRM_Utils_Array::value($previous_three_year, $display)
+        CRM_Utils_Array::value($previous_three_year, $row);
     }
 
     $graphRows['value'] = $display;
index b5dee07c19aa9e162a985bd79fe8a3fe5caf070c..062ee279508538aff2a0156108c3a0073c01b85a 100644 (file)
@@ -329,8 +329,7 @@ class CRM_Report_Form_Pledge_Pbnp extends CRM_Report_Form {
       //handle the Financial Type Ids
       if (array_key_exists('civicrm_pledge_financial_type_id', $row)) {
         if ($value = $row['civicrm_pledge_financial_type_id']) {
-          $rows[$rowNum]['civicrm_pledge_financial_type_id'] =
-            CRM_Contribute_PseudoConstant::financialType($value, FALSE);
+          $rows[$rowNum]['civicrm_pledge_financial_type_id'] = CRM_Contribute_PseudoConstant::financialType($value, FALSE);
         }
         $entryFound = TRUE;
       }
index f374f904bec55751459a0db51c6f046b0c117174..d6d1c5df11ab7ba9c0ff4419015f0a2aa4429c0d 100644 (file)
@@ -120,7 +120,7 @@ abstract class CRM_SMS_Provider {
    * @param int $jobID
    * @param int $userID
    *
-   * @return $this|null|object
+   * @return self|null|object
    * @throws CRM_Core_Exception
    */
   public function createActivity($apiMsgID, $message, $headers = array(), $jobID = NULL, $userID = NULL) {
@@ -186,7 +186,7 @@ INNER JOIN civicrm_mailing_job mj ON mj.mailing_id = m.id AND mj.id = %1";
    * @param null $to
    * @param int $trackID
    *
-   * @return $this|null|object
+   * @return self|null|object
    * @throws CRM_Core_Exception
    */
   public function processInbound($from, $body, $to = NULL, $trackID = NULL) {
index ea0a28164ef8c5c63594098e92ea6034525d1fe0..50b4b2e3bbc06c36af5bed043f3e18148ad690cd 100644 (file)
@@ -110,7 +110,7 @@ class CRM_Utils_Cache_APCcache {
 
     foreach ($keys as $key) {
       $name = $key['info'];
-      if ($prefix == substr($name, 0, $lp)) { 
+      if ($prefix == substr($name, 0, $lp)) {
         // Ours?
         apc_delete($this->_prefix . $name);
       }
index 25aa5c2fdc27e45a1fa04b5885b6f7c85e0ceaba..3f573db37235a73e6957bd19eba3c2ad73cba488 100644 (file)
@@ -52,11 +52,12 @@ class CRM_Utils_Wrapper {
    * The heart of the callback processing is done by this method.
    * forms are of different type and have different operations.
    *
-   * @param string formName name of the form processing this action
-   * @param string formLabel label for the above form
-   * @param int mode mode of operation.
-   * @param bool addSequence should we add a unique sequence number to the end of the key
-   * @param bool ignoreKey should we not set a qfKey for this controller (for standalone forms)
+   * @param string $formName name of the form processing this action
+   * @param string $formLabel label for the above form
+   * @param array $arguments
+   *  - int mode: mode of operation.
+   *  - bool addSequence: should we add a unique sequence number to the end of the key
+   *  - bool ignoreKey: should we not set a qfKey for this controller (for standalone forms)
    *
    * @return void
    */
index 6cc1bfdc1e5b58bd37a02afd3c9932e8faa4e984..5b43c1079990d5562379c13d8e5306823b5dcd73 100644 (file)
@@ -140,8 +140,6 @@ function civicrm_api3_address_delete($params) {
  * Retrieve one or more addresses on address_id, contact_id, street_name, city
  * or a combination of those
  *
- * @param mixed[] (reference ) input parameters
- *
  * @param array $params
  *   An associative array of name/value pairs.
  *
index bb551985a78871b4055dc3006023c2285d8ee9d1..63ac673ef7ccb7ce5da825ca98b95b952929cc5c 100644 (file)
@@ -39,7 +39,7 @@
 /**
  * Open a new case, add client and manager roles, and add standard timeline
  *
- * @param array (
+ * @param array $params
  * //REQUIRED:
  * 'case_type_id' => int OR
  * 'case_type' => str (provide one or the other)
@@ -182,14 +182,13 @@ function _civicrm_api3_case_delete_spec(&$params) {
  *
  * Please provide one (and only one) of the four get/search parameters:
  *
- * @param array (
- * 'id' => if set, will get all available info about a case, including contacts and activities
- *
- * // if no case_id provided, this function will use one of the following search parameters:
- * 'client_id' => finds all cases with a specific client
- * 'activity_id' => returns the case containing a specific activity
- * 'contact_id' => finds all cases associated with a contact (in any role, not just client)
+ * @param array $params
+ *   'id' => if set, will get all available info about a case, including contacts and activities
  *
+ *   // if no case_id provided, this function will use one of the following search parameters:
+ *   'client_id' => finds all cases with a specific client
+ *   'activity_id' => returns the case containing a specific activity
+ *   'contact_id' => finds all cases associated with a contact (in any role, not just client)
  *
  * @throws API_Exception
  * @return array
@@ -292,14 +291,14 @@ function _civicrm_api3_case_deprecation() {
 /**
  * Update a specified case.
  *
- * @param array (
- * //REQUIRED:
- * 'case_id' => int
+ * @param array $params
+ *   //REQUIRED:
+ *   'case_id' => int
  *
- * //OPTIONAL
- * 'status_id' => int
- * 'start_date' => str datestamp
- * 'contact_id' => int // case client
+ *   //OPTIONAL
+ *   'status_id' => int
+ *   'start_date' => str datestamp
+ *   'contact_id' => int // case client
  *
  * @throws API_Exception
  * @return array
@@ -360,12 +359,12 @@ function civicrm_api3_case_update($params) {
 /**
  * Delete a specified case.
  *
- * @param array (
- * //REQUIRED:
- * 'id' => int
+ * @param array $params
+ *   //REQUIRED:
+ *   'id' => int
  *
- * //OPTIONAL
- * 'move_to_trash' => bool (defaults to false)
+ *   //OPTIONAL
+ *   'move_to_trash' => bool (defaults to false)
  *
  * @throws API_Exception
  * @return bool
index f4d16f4de42f19b0a077712519934d28cbb38d11..d288afef47f3f9536f50d61f83cff0588d8f519a 100644 (file)
@@ -82,11 +82,6 @@ function civicrm_api3_email_delete($params) {
 /**
  * Retrieve one or more emails
  *
- * @param array input parameters
- *
- *
- * @example EmailGet.php Standard Get Example
- *
  * @param array $params
  *   An associative array of name/value pairs.
  *
index 4bf680fc60b4ef15385a210984411bc099edaa66..3646d416e048666c0a7f05ea5036112bf9cc7ca5 100644 (file)
@@ -180,12 +180,12 @@ function civicrm_api3_extension_uninstall($params) {
  * @example ExtensionDownload.php
  */
 function civicrm_api3_extension_download($params) {
-  if (! array_key_exists('key', $params)) {
+  if (!array_key_exists('key', $params)) {
     throw new API_Exception('Missing required parameter: key');
   }
 
-  if (! array_key_exists('url', $params)) {
-    if (! CRM_Extension_System::singleton()->getBrowser()->isEnabled()) {
+  if (!array_key_exists('url', $params)) {
+    if (!CRM_Extension_System::singleton()->getBrowser()->isEnabled()) {
       throw new API_Exception('Automatic downloading is diabled. Try adding parameter "url"');
     }
     if ($reqs = CRM_Extension_System::singleton()->getBrowser()->checkRequirements()) {
@@ -199,7 +199,7 @@ function civicrm_api3_extension_download($params) {
     }
   }
 
-  if (! array_key_exists('url', $params)) {
+  if (!array_key_exists('url', $params)) {
     throw new API_Exception('Cannot resolve download url for extension. Try adding parameter "url"');
   }
 
@@ -207,7 +207,7 @@ function civicrm_api3_extension_download($params) {
     return civicrm_api3_create_error($requirement['message']);
   }
 
-  if (! CRM_Extension_System::singleton()->getDownloader()->download($params['key'], $params['url'])) {
+  if (!CRM_Extension_System::singleton()->getDownloader()->download($params['key'], $params['url'])) {
     return civicrm_api3_create_error('Download failed - ZIP file is unavailable or malformed');
   }
   CRM_Extension_System::singleton()->getCache()->flush();
index e05a6cdca4f869fde0db17727cb76531b1016026..55ba8b5bdf9194e3af56b212200a381dfc5181ec 100644 (file)
@@ -22,8 +22,9 @@ function civicrm_api3_generic_setValue($apiRequest) {
 
   $fields = civicrm_api($entity, 'getFields', array('version' => 3, 'action' => 'create', "sequential"));
   // getfields error, shouldn't happen.
-  if ($fields['is_error'])
-  return $fields;
+  if ($fields['is_error']) {
+    return $fields;
+  }
   $fields = $fields['values'];
 
   $isCustom = strpos($field, 'custom_') === 0;
@@ -68,8 +69,9 @@ function civicrm_api3_generic_setValue($apiRequest) {
 
     case CRM_Utils_Type::T_DATE:
       $value = CRM_Utils_Type::escape($value, "Date", FALSE);
-      if (!$value)
+      if (!$value) {
         return civicrm_api3_create_error("Param '$field' is not a date. format YYYYMMDD or YYYYMMDDHHMMSS");
+      }
       break;
 
     case CRM_Utils_Type::T_BOOLEAN: