INFRA-132 - Batch #7
authormonishdeb <monish.deb@webaccessglobal.com>
Sun, 1 Feb 2015 15:25:14 +0000 (20:55 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Sun, 1 Feb 2015 15:25:14 +0000 (20:55 +0530)
37 files changed:
CRM/ACL/Page/ACLBasic.php
CRM/Admin/Form/ScheduleReminders.php
CRM/Case/Info.php
CRM/Contact/BAO/Relationship.php
CRM/Contact/Form/Edit/IM.php
CRM/Contribute/Form/ContributionPage/Settings.php
CRM/Contribute/Import/Form/DataSource.php
CRM/Core/BAO/MailSettings.php
CRM/Core/I18n/SchemaStructure_3_0_alpha1.php
CRM/Core/Payment/eWAY.php
CRM/Core/Permission/DrupalBase.php
CRM/Core/Permission/Joomla.php
CRM/Custom/Import/Form/DataSource.php
CRM/Dedupe/Merger.php
CRM/Event/Page/Tab.php
CRM/Financial/Page/AJAX.php
CRM/Grant/Form/Task/Delete.php
CRM/Mailing/Form/Unsubscribe.php
CRM/Pledge/Form/Task/Delete.php
CRM/Pledge/Info.php
CRM/Profile/Selector/Listings.php
CRM/Report/Form/Contribute/History.php
CRM/Report/Form/Pledge/Summary.php
CRM/Utils/Hook/Soap.php
CRM/Utils/SoapServer.php
CRM/Utils/System.php
CRM/Utils/System/Drupal.php
CRM/Utils/System/UnitTests.php
CRM/Utils/Tree.php
CRM/Widget/Widget.php
bin/csv/delete.php
tests/phpunit/CRM/Activity/AllTests.php
tests/phpunit/CRM/Core/Config/MailerTest.php
tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php
tests/phpunit/CiviTest/AuthorizeNet.php
tests/phpunit/WebTest/Case/AddCaseTypeTest.php
tests/phpunit/api/v3/ActivityTest.php

index 09f260b79b8100f07c4ca125eceef91f422421d5..4f83ddeba17d342ce09f99973dbd6b0342cda805 100644 (file)
@@ -112,7 +112,7 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
       array(
         'title' => ts('Access Control'),
         'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1'),
-      )
+      ),
     );
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
 
index 3b1ee87705cfe90819da283b48444c2adf6d77c2..8e0c222178df9db58a8a7fcc0d72d8e15bd96dc5 100644 (file)
@@ -67,8 +67,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
       return;
     }
     elseif ($this->_action & (CRM_Core_Action::UPDATE)) {
-      $this->_mappingID =
-        CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionSchedule', $this->_id, 'mapping_id');
+      $this->_mappingID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionSchedule', $this->_id, 'mapping_id');
       if ($this->_context == 'event') {
         $this->_compId = CRM_Utils_Request::retrieve('compId', 'Integer', $this);
       }
index ce9be2e1a692ee44b7247855c6a4ed37cf04c912..7ee506fe4a161bcffd79d2073a1185a21abe98a3 100644 (file)
@@ -199,7 +199,7 @@ class CRM_Case_Info extends CRM_Core_Component_Info {
             'query' => "reset=1&action=add&atype=$atype&context=standalone",
             'ref' => 'new-case',
             'title' => ts('Case'),
-          )
+          ),
         ));
       }
     }
index 17d1a26f8ab30779f47baee658d087614e73cc1c..941f183f356a0146c56b6afc81eaca0e3f8ce616 100644 (file)
@@ -189,16 +189,15 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
    *
    * @param array $params
    *   (reference ) an assoc array of name/value pairs.
-   * @param int $contactId
-   *   This is contact id for adding relationship.
    * @param array $ids
    *   The array that holds all the db ids.
+   * @param int $contactId
+   *   This is contact id for adding relationship.
    *
    * @return CRM_Contact_BAO_Relationship
    */
   public static function add(&$params, $ids = array(), $contactId = NULL) {
-    $relationshipId =
-      CRM_Utils_Array::value('relationship', $ids, CRM_Utils_Array::value('id', $params));
+    $relationshipId = CRM_Utils_Array::value('relationship', $ids, CRM_Utils_Array::value('id', $params));
 
     $hook = 'create';
     if ($relationshipId) {
@@ -372,7 +371,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
    * @param array $params
    *   (reference ) an assoc array of name/value pairs.
    *
-   * @return boolean
+   * @return bool
    */
   public static function dataExists(&$params) {
     // return if no data present
@@ -407,7 +406,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
    * @return array
    *   array reference of all relationship types with context to current contact.
    */
-  static function getContactRelationshipType(
+  public static function getContactRelationshipType(
     $contactId = NULL,
     $contactSuffix = NULL,
     $relationshipId = NULL,
@@ -582,7 +581,6 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
    *
    * @param $action
    *
-   * @return null
    */
   public static function disableEnableRelationship($id, $action) {
     $relationship = self::clearCurrentEmployer($id, $action);
@@ -668,7 +666,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
    * @param int $relationshipTypeId
    *   Relationship type id.
    *
-   * @return boolean
+   * @return bool
    *   true if it is valid relationship else false
    */
   public static function checkRelationshipType($contact_a, $contact_b, $relationshipTypeId) {
@@ -739,7 +737,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
    * @param int $relationshipId
    *   This is relationship id for the contact.
    *
-   * @return boolean
+   * @return bool
    *   true if record exists else false
    */
   public static function checkDuplicateRelationship(&$params, $id, $contactId = 0, $relationshipId = 0) {
@@ -1045,7 +1043,7 @@ LEFT JOIN  civicrm_country ON (civicrm_address.country_id = civicrm_country.id)
    * @return array|int
    *   relationship records
    */
-  static function getRelationship(
+  public static function getRelationship(
     $contactId = NULL,
     $status = 0, $numRelationship = 0,
     $count = 0, $relationshipId = 0,
@@ -1700,7 +1698,7 @@ AND cc.sort_name LIKE '%$name%'";
    *   Api input array.
    * @param null $direction
    *
-   * @return array
+   * @return array|void
    */
   public static function membershipTypeToRelationshipTypes(&$params, $direction = NULL) {
     $membershipType = civicrm_api3('membership_type', 'getsingle', array(
@@ -1709,12 +1707,12 @@ AND cc.sort_name LIKE '%$name%'";
     ));
     $relationshipTypes = $membershipType['relationship_type_id'];
     if (empty($relationshipTypes)) {
-      return;
+      return NULL;
     }
     // if we don't have any contact data we can only filter on type
     if (empty($params['contact_id']) && empty($params['contact_id_a']) && empty($params['contact_id_a'])) {
       $params['relationship_type_id'] = array('IN' => $relationshipTypes);
-      return;
+      return NULL;
     }
     else {
       $relationshipDirections = (array) $membershipType['relationship_direction'];
index 755fc50335dd885d5cafc87bc62aa5e5c6d962a6..07ba127a869403a6b0f71b0edd9e00a5c885d954 100644 (file)
@@ -66,7 +66,7 @@ class CRM_Contact_Form_Edit_IM {
     $form->addSelect("im[$blockId][location_type_id]", array(
         'entity' => 'im',
         'class' => 'eight',
-        'placeholder' => NULL
+        'placeholder' => NULL,
       ));
 
     //IM box
index f1e4efee12ed82f4837d888b60039b13d5982044..d6c8cf23222b76ba5730070427784e8d8f983321 100644 (file)
@@ -144,20 +144,19 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_
     $coreTypes = array('Contact', 'Organization');
 
     $entities[] = array(
-      'entity_name' => array ('contact_1'),
+      'entity_name' => array('contact_1'),
       'entity_type' => 'OrganizationModel',
     );
 
     if ($member && $member['is_active']) {
       $coreTypes[] = 'Membership';
       $entities[] = array(
-        'entity_name' => array ('membership_1'),
+        'entity_name' => array('membership_1'),
         'entity_type' => 'MembershipModel',
       );
     }
-    
-    $allowCoreTypes = array_merge($coreTypes, 
-      CRM_Contact_BAO_ContactType::subTypes('Organization'));
+
+    $allowCoreTypes = array_merge($coreTypes, CRM_Contact_BAO_ContactType::subTypes('Organization'));
     $allowSubTypes = array();
 
     $this->addProfileSelector('onbehalf_profile_id', ts('Organization Profile'), $allowCoreTypes, $allowSubTypes, $entities);
@@ -207,7 +206,7 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_
         'Contact',
         'Individual',
         'Organization',
-        'Household'
+        'Household',
       ), CRM_Contact_BAO_ContactType::subTypes('Individual'));
     $allowSubTypes = array();
 
@@ -349,19 +348,17 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_
     $dao = CRM_Contribute_BAO_ContributionPage::create($params);
 
     $ufJoinParams = array(
-      'onbehalf_profile_id' =>
-        array(
-          'is_active' => 1,
-          'module' => 'OnBehalf',
-          'entity_table' => 'civicrm_contribution_page',
-          'entity_id' => $dao->id,
-        ),
-      'honor_block_is_active' =>
-        array(
-          'module' => 'soft_credit',
-          'entity_table' => 'civicrm_contribution_page',
-          'entity_id' => $dao->id,
-        ),
+      'onbehalf_profile_id' => array(
+        'is_active' => 1,
+        'module' => 'OnBehalf',
+        'entity_table' => 'civicrm_contribution_page',
+        'entity_id' => $dao->id,
+      ),
+      'honor_block_is_active' => array(
+        'module' => 'soft_credit',
+        'entity_table' => 'civicrm_contribution_page',
+        'entity_id' => $dao->id,
+      ),
     );
 
     foreach ($ufJoinParams as $index => $ufJoinParam) {
index fe1ece4e0ce40b550b3e4dce83670b11bc880b85..714ef886ac999141b759ede0ee034212e9724d32 100644 (file)
@@ -68,7 +68,7 @@ class CRM_Contribute_Import_Form_DataSource extends CRM_Core_Form {
     $this->setMaxFileSize($uploadFileSize);
     $this->addRule('uploadFile', ts('File size should be less than %1 MBytes (%2 bytes)', array(
           1 => $uploadSize,
-          2 => $uploadFileSize
+          2 => $uploadFileSize,
         )), 'maxfilesize', $uploadFileSize);
     $this->addRule('uploadFile', ts('A valid file must be uploaded.'), 'uploadedfile');
     $this->addRule('uploadFile', ts('Input file must be in CSV format'), 'utf8File');
index 692a08dd7572499cd647a7d2aac008a27389581e..f3bf998eacfd2f3dfe06981f6e43421e13dd897d 100644 (file)
@@ -54,7 +54,7 @@ class CRM_Core_BAO_MailSettings extends CRM_Core_DAO_MailSettings {
     static $mailSettings = array();
     $domainID = CRM_Core_Config::domainID();
     if (empty($mailSettings[$domainID]) || $reset) {
-      $dao = new self;
+      $dao = new self();
       $dao->is_default = 1;
       $dao->domain_id = $domainID;
       $dao->find(TRUE);
@@ -96,7 +96,7 @@ class CRM_Core_BAO_MailSettings extends CRM_Core_DAO_MailSettings {
   /**
    * Return the "include message ID" flag from the default set of settings.
    *
-   * @return boolean
+   * @return bool
    *   default include message ID
    */
   public static function includeMessageId() {
index 60923ce4a096b1b34d62a117f1a7553bae09e358..cb8796712641fe007f221cd58a409936ef197e99 100644 (file)
@@ -238,9 +238,9 @@ class CRM_Core_I18n_SchemaStructure_3_0_alpha1 {
   }
 
   /**
-   * @return array
+   * @return array $result
    */
-  static function &tables() {
+  public static function &tables() {
     static $result = NULL;
     if (!$result) {
       $result = array_keys(self::columns());
index ee118d5317a42cff43366f8e7b520a3577e0afca..39bf81aa2719c7f9101b2ff1ae5d6046c8de53e3 100644 (file)
@@ -89,7 +89,7 @@
  * ie - all other amounts will return a failed response.
  *
  * -----------------------------------------------------------------------------------------------
- **/
+ */
 class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
   # (not used, implicit in the API, might need to convert?)
   const CHARSET = 'UTF-8';
@@ -102,15 +102,16 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
    */
   static private $_singleton = NULL;
 
-  /**********************************************************
+  /**
+   * *******************************************************
    * Constructor
    *
    * @param string $mode
    *   The mode of operation: live or test.
    *
-   * @param $paymentProcessor
+   * @param int $paymentProcessor
    *
-   * @return \CRM_Core_Payment_eWAY *******************************************************
+   * *******************************************************
    */
   public function __construct($mode, &$paymentProcessor) {
     // require Standard eWAY API libraries
@@ -123,10 +124,12 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
     $this->_processorName = ts('eWay');
   }
 
-  /**********************************************************
+  /**
+   * *******************************************************
    * This function sends request and receives response from
    * eWAY payment process
-   **********************************************************/
+   * *******************************************************
+   */
   public function doDirectPayment(&$params) {
     if (CRM_Utils_Array::value('is_recur', $params) == TRUE) {
       CRM_Core_Error::fatal(ts('eWAY - recurring payments not implemented'));
@@ -144,13 +147,13 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
     //------------------------------------
     // create eWAY gateway objects
     //------------------------------------
-    $eWAYRequest = new GatewayRequest;
+    $eWAYRequest = new GatewayRequest();
 
     if (($eWAYRequest == NULL) || (!($eWAYRequest instanceof GatewayRequest))) {
       return self::errorExit(9001, "Error: Unable to create eWAY Request object.");
     }
 
-    $eWAYResponse = new GatewayResponse;
+    $eWAYResponse = new GatewayResponse();
 
     if (($eWAYResponse == NULL) || (!($eWAYResponse instanceof GatewayResponse))) {
       return self::errorExit(9002, "Error: Unable to create eWAY Response object.");
@@ -420,9 +423,11 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
     return $contribution->find();
   }
 
-  /*************************************************************************************************
+  /**
+   * **********************************************************************************************
    * This function checks the eWAY response status - returning a boolean false if status != 'true'
-   *************************************************************************************************/
+   * ************************************************************************************************
+   */
   public function isError(&$response) {
     $status = $response->Status();
 
@@ -432,9 +437,11 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
     return FALSE;
   }
 
-  /**************************************************
+  /**
+   * ************************************************
    * Produces error message and returns from class
-   **************************************************/
+   * *************************************************
+   */
   public function &errorExit($errorCode = NULL, $errorMessage = NULL) {
     $e = CRM_Core_Error::singleton();
 
@@ -447,14 +454,17 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
     return $e;
   }
 
-  /**************************************************
+  /**
+   * ************************************************
    * NOTE: 'doTransferCheckout' not implemented
-   **************************************************/
+   * ************************************************
+   */
   public function doTransferCheckout(&$params, $component) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
-  /********************************************************************************************
+  /**
+   * *****************************************************************************************
    * This public function checks to see if we have the right processor config values set
    *
    * NOTE: Called by Events and Contribute to check config params are set prior to trying
@@ -467,10 +477,8 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
    *
    * returns string $errorMsg if any errors found - null if OK
    *
-   ******************************************************************************************
+   * *****************************************************************************************
    */
-  //function checkConfig( $mode )          // CiviCRM V1.9 Declaration
-  // CiviCRM V2.0 Declaration
   public function checkConfig() {
     $errorMsg = array();
 
index 18dfbff83452ad996ebd9ffed9b6ad2a6f7cb5c9..a63815eb820ffc6a1383d78cf86e656a70c03bf5 100644 (file)
@@ -259,7 +259,7 @@ class CRM_Core_Permission_DrupalBase extends CRM_Core_Permission_Base {
    * @param array $array
    *   The roles to check.
    *
-   * @return boolean
+   * @return bool
    *   true if yes, else false
    */
   public function checkGroupRole($array) {
index 7110b890ff4e820ccc6dbda983fcd40791bfe876..9ae05208dc41d1aad5829770fb34367326398fe9 100644 (file)
@@ -43,7 +43,7 @@ class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base {
    * @param string $str
    *   The permission to check.
    *
-   * @return boolean
+   * @return bool
    *   true if yes, else false
    */
   public function check($str) {
@@ -104,7 +104,7 @@ class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base {
    * @param array $array
    *   The roles to check.
    *
-   * @return boolean
+   * @return bool
    *   true if yes, else false
    */
   public function checkGroupRole($array) {
index 64c9c7564f8746e9edc66c4af5b125496cce585a..250cf170c88269c1805ea83b9a41caf11375d70f 100644 (file)
@@ -97,7 +97,7 @@ class CRM_Custom_Import_Form_DataSource extends CRM_Core_Form {
     $this->setMaxFileSize($uploadFileSize);
     $this->addRule('uploadFile', ts('File size should be less than %1 MBytes (%2 bytes)', array(
           1 => $uploadSize,
-          2 => $uploadFileSize
+          2 => $uploadFileSize,
         )), 'maxfilesize', $uploadFileSize);
     $this->addRule('uploadFile', ts('A valid file must be uploaded.'), 'uploadedfile');
     $this->addRule('uploadFile', ts('Input file must be in CSV format'), 'utf8File');
index 1e208b170ebfbaaa1d1f51bc1fe6abb6c6bef431..17daf65be2795afd4dd39c5c0c83d0c4ad9a9fab 100644 (file)
@@ -563,7 +563,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
    *   Helps decide how to behave when there are conflicts.
    *                              A 'safe' value skips the merge if there are any un-resolved conflicts.
    *                              Does a force merge otherwise.
-   * @param bool $autoFlipWether to let api decide which contact to retain and which to delete.
+   * @param bool $autoFlip to let api decide which contact to retain and which to delete.
    *   Wether to let api decide which contact to retain and which to delete.
    * @param bool $redirectForPerformance
    *
@@ -608,7 +608,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
    *   Helps decide how to behave when there are conflicts.
    *                             A 'safe' value skips the merge if there are any un-resolved conflicts.
    *                             Does a force merge otherwise (aggressive mode).
-   * @param bool $autoFlipWether to let api decide which contact to retain and which to delete.
+   * @param bool $autoFlip to let api decide which contact to retain and which to delete.
    *   Wether to let api decide which contact to retain and which to delete.
    *
    *
@@ -823,7 +823,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
       $params = array(
         'contact_id' => $cid,
         'version' => 3,
-        'return' => array_merge(array('display_name'), self::getContactFields())
+        'return' => array_merge(array('display_name'), self::getContactFields()),
       );
       $result = civicrm_api('contact', 'get', $params);
 
@@ -855,11 +855,10 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
         $specialValues[$moniker]['preferred_communication_method'] = CRM_Core_DAO::VALUE_SEPARATOR . $prefCommList . CRM_Core_DAO::VALUE_SEPARATOR;
       }
       $names = array(
-        'preferred_communication_method' =>
-          array(
-            'newName' => 'preferred_communication_method_display',
-            'groupName' => 'preferred_communication_method',
-          ),
+        'preferred_communication_method' => array(
+          'newName' => 'preferred_communication_method_display',
+          'groupName' => 'preferred_communication_method',
+        ),
       );
       CRM_Core_OptionGroup::lookupValues($specialValues[$moniker], $names);
 
@@ -1430,7 +1429,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
                 if (in_array($htmlType, array(
                   'CheckBox',
                   'Multi-Select',
-                  'AdvMulti-Select'
+                  'AdvMulti-Select',
                 ))) {
                   $submitted[$key] = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR,
                       $mergeValue
@@ -1443,7 +1442,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
             }
             elseif (in_array($htmlType, array(
               'Multi-Select Country',
-              'Multi-Select State/Province'
+              'Multi-Select State/Province',
             ))) {
               //we require submitted values should be in array format
               if ($value) {
@@ -1617,7 +1616,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
       'modified_date',
       'primary_contact_id',
       'sort_name',
-      'user_unique_id'
+      'user_unique_id',
     );
     foreach ($contactFields as $field => $value) {
       if (in_array($field, $invalidFields)) {
@@ -1629,10 +1628,10 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
 
   /**
    * Added for CRM-12695
-   * Based on the contactId provided
+   * Based on the contactID provided
    * add/update membership(s) to related contacts
    *
-   * @param contactId
+   * @param int $contactID
    */
   public static function addMembershipToRealtedContacts($contactID) {
     $dao = new CRM_Member_DAO_Membership();
index 1cc1f3f996248fffe6b3550efc5362f24ebb78e5..861598ad95389b2998b80e147f0ef3c067c769f1 100644 (file)
@@ -39,8 +39,6 @@ class CRM_Event_Page_Tab extends CRM_Core_Page {
 
   /**
    * called when action is browse
-   *
-   * @return null
    */
   public function browse() {
     $controller = new CRM_Core_Controller_Simple(
@@ -283,8 +281,6 @@ class CRM_Event_Page_Tab extends CRM_Core_Page {
   /**
    * used for the to show the associated
    * contribution for the participant
-   *
-   * @return null
    */
   public function associatedContribution() {
     if (CRM_Core_Permission::access('CiviContribute')) {
index 6832c9afd88e8076083f6c5003bb40c7ce5e9bee..6e4bd6abb6530c683fa2cb63c91f0d98e4586a96 100644 (file)
@@ -85,9 +85,9 @@ class CRM_Financial_Page_AJAX {
           $selectedArray['selected'] = 'Selected';
         }
         $elements[] = array(
-            'name' => $name,
-            'value' => $id,
-          ) + $selectedArray;
+          'name' => $name,
+          'value' => $id,
+        ) + $selectedArray;
       }
     }
     CRM_Utils_JSON::output($elements);
@@ -261,18 +261,17 @@ class CRM_Financial_Page_AJAX {
   }
 
   public static function getFinancialTransactionsList() {
-    $sortMapper =
-      array(
-        0 => '',
-        1 => '',
-        2 => 'sort_name',
-        3 => 'amount',
-        4 => 'trxn_id',
-        5 => 'transaction_date',
-        6 => 'payment_method',
-        7 => 'status',
-        8 => 'name',
-      );
+    $sortMapper = array(
+      0 => '',
+      1 => '',
+      2 => 'sort_name',
+      3 => 'amount',
+      4 => 'trxn_id',
+      5 => 'transaction_date',
+      6 => 'payment_method',
+      7 => 'status',
+      8 => 'name',
+    );
 
     $sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
     $offset = isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
@@ -290,34 +289,32 @@ class CRM_Financial_Page_AJAX {
       $params['sortBy'] = $sort . ' ' . $sortOrder;
     }
 
-    $returnvalues =
-      array(
-        'civicrm_financial_trxn.payment_instrument_id as payment_method',
-        'civicrm_contribution.contact_id as contact_id',
-        'civicrm_contribution.id as contributionID',
-        'contact_a.sort_name',
-        'civicrm_financial_trxn.total_amount as amount',
-        'civicrm_financial_trxn.trxn_id as trxn_id',
-        'contact_a.contact_type',
-        'contact_a.contact_sub_type',
-        'civicrm_financial_trxn.trxn_date as transaction_date',
-        'name',
-        'civicrm_contribution.currency as currency',
-        'civicrm_financial_trxn.status_id as status',
-        'civicrm_financial_trxn.check_number as check_number',
-      );
+    $returnvalues = array(
+      'civicrm_financial_trxn.payment_instrument_id as payment_method',
+      'civicrm_contribution.contact_id as contact_id',
+      'civicrm_contribution.id as contributionID',
+      'contact_a.sort_name',
+      'civicrm_financial_trxn.total_amount as amount',
+      'civicrm_financial_trxn.trxn_id as trxn_id',
+      'contact_a.contact_type',
+      'contact_a.contact_sub_type',
+      'civicrm_financial_trxn.trxn_date as transaction_date',
+      'name',
+      'civicrm_contribution.currency as currency',
+      'civicrm_financial_trxn.status_id as status',
+      'civicrm_financial_trxn.check_number as check_number',
+    );
 
-    $columnHeader =
-      array(
-        'contact_type' => '',
-        'sort_name' => ts('Contact Name'),
-        'amount' => ts('Amount'),
-        'trxn_id' => ts('Trxn ID'),
-        'transaction_date' => ts('Received'),
-        'payment_method' => ts('Payment Method'),
-        'status' => ts('Status'),
-        'name' => ts('Type'),
-      );
+    $columnHeader = array(
+      'contact_type' => '',
+      'sort_name' => ts('Contact Name'),
+      'amount' => ts('Amount'),
+      'trxn_id' => ts('Trxn ID'),
+      'transaction_date' => ts('Received'),
+      'payment_method' => ts('Payment Method'),
+      'status' => ts('Status'),
+      'name' => ts('Type'),
+    );
 
     if ($sort && $sortOrder) {
       $params['sortBy'] = $sort . ' ' . $sortOrder;
@@ -450,19 +447,18 @@ class CRM_Financial_Page_AJAX {
     }
 
     $iFilteredTotal = $iTotal = $params['total'];
-    $selectorElements =
-      array(
-        'check',
-        'contact_type',
-        'sort_name',
-        'amount',
-        'trxn_id',
-        'transaction_date',
-        'payment_method',
-        'status',
-        'name',
-        'action',
-      );
+    $selectorElements = array(
+      'check',
+      'contact_type',
+      'sort_name',
+      'amount',
+      'trxn_id',
+      'transaction_date',
+      'payment_method',
+      'status',
+      'name',
+      'action',
+    );
 
     echo CRM_Utils_JSON::encodeDataTableSelector($financialitems, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
     CRM_Utils_System::civiExit();
@@ -484,12 +480,11 @@ class CRM_Financial_Page_AJAX {
     foreach ($cIDs as $key => $value) {
       $recordPID = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialTrxn', $value, 'payment_instrument_id');
       if ($action == 'Remove' || ($recordPID == $batchPID && $action == 'Assign') || !isset($batchPID)) {
-        $params =
-          array(
-            'entity_id' => $value,
-            'entity_table' => 'civicrm_financial_trxn',
-            'batch_id' => $entityID,
-          );
+        $params = array(
+          'entity_id' => $value,
+          'entity_table' => 'civicrm_financial_trxn',
+          'batch_id' => $entityID,
+        );
         if ($action == 'Assign') {
           $updated = CRM_Batch_BAO_Batch::addBatchEntity($params);
         }
@@ -512,18 +507,17 @@ class CRM_Financial_Page_AJAX {
     $params = array('id' => $batchID);
     $batchInfo = CRM_Batch_BAO_Batch::retrieve($params, $value);
     $batchTotals = CRM_Batch_BAO_Batch::batchTotals(array($batchID));
-    $batchSummary =
-      array(
-        'created_by' => CRM_Contact_BAO_Contact::displayName($batchInfo->created_id),
-        'status' => CRM_Core_OptionGroup::getLabel('batch_status', $batchInfo->status_id),
-        'description' => $batchInfo->description,
-        'payment_instrument' => CRM_Core_OptionGroup::getLabel('payment_instrument', $batchInfo->payment_instrument_id),
-        'item_count' => $batchInfo->item_count,
-        'assigned_item_count' => $batchTotals[$batchID]['item_count'],
-        'total' => CRM_Utils_Money::format($batchInfo->total),
-        'assigned_total' => CRM_Utils_Money::format($batchTotals[$batchID]['total']),
-        'opened_date' => CRM_Utils_Date::customFormat($batchInfo->created_date),
-      );
+    $batchSummary = array(
+      'created_by' => CRM_Contact_BAO_Contact::displayName($batchInfo->created_id),
+      'status' => CRM_Core_OptionGroup::getLabel('batch_status', $batchInfo->status_id),
+      'description' => $batchInfo->description,
+      'payment_instrument' => CRM_Core_OptionGroup::getLabel('payment_instrument', $batchInfo->payment_instrument_id),
+      'item_count' => $batchInfo->item_count,
+      'assigned_item_count' => $batchTotals[$batchID]['item_count'],
+      'total' => CRM_Utils_Money::format($batchInfo->total),
+      'assigned_total' => CRM_Utils_Money::format($batchTotals[$batchID]['total']),
+      'opened_date' => CRM_Utils_Date::customFormat($batchInfo->created_date),
+    );
 
     CRM_Utils_JSON::output($batchSummary);
   }
index 30f55d2d99a42c00211ab82a5e392f79543c881c..6ac833fa80ba4db5e94089f44d9d34091240259b 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Grant_Form_Task_Delete extends CRM_Grant_Form_Task {
    *
    * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     parent::preProcess();
 
     //check permission for delete.
index 876aa3ab528109774697184184eb7bc7eaf3980d..991b4d2dd905f0049e196c9e304b0cc31d6699dd 100644 (file)
@@ -103,13 +103,10 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
   }
 
   public function postProcess() {
-
     $values = $this->exportValues();
 
     // check if EmailTyped matches Email address
     $result = CRM_Utils_String::compareStr($this->_email, $values['email_confirm'], TRUE);
-
-
     $job_id = $this->_job_id;
     $queue_id = $this->_queue_id;
     $hash = $this->_hash;
index a33008b6f8a7d8df9e5dc986c4e3fb529d4b4aca..9d36ada167003c64ed68036958f2b919329eded6 100644 (file)
@@ -50,10 +50,8 @@ class CRM_Pledge_Form_Task_Delete extends CRM_Pledge_Form_Task {
 
   /**
    * Build all the data structures needed to build the form
-   *
-   * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     //check for delete
     if (!CRM_Core_Permission::checkActionPermission('CiviPledge', CRM_Core_Action::DELETE)) {
       CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
@@ -87,7 +85,7 @@ class CRM_Pledge_Form_Task_Delete extends CRM_Pledge_Form_Task {
 
     $status = ts('Deleted Pledge(s): %1 (Total Selected: %2) ', array(
         1 => $deletedPledges,
-        2 => count($this->_pledgeIds)
+        2 => count($this->_pledgeIds),
       ));
     CRM_Core_Session::setStatus($status, '', 'info');
   }
index 8f5f3c2db5d79335c3fd83b593e5ee35ce1ff3dd..e3eee49aa7e9b99a64ffa4aab4a03484858cd0ee 100644 (file)
@@ -180,7 +180,7 @@ class CRM_Pledge_Info extends CRM_Core_Component_Info {
           'query' => 'reset=1&action=add&context=standalone',
           'ref' => 'new-pledge',
           'title' => ts('Pledge'),
-        )
+        ),
       ));
     }
   }
index 2816bf2260bb03b2e8bed25d9327f6b1af6db30c..9a48e63a7becfe30b9354456dd6e43ff5ce4af1d 100644 (file)
@@ -129,17 +129,16 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
   /**
    * Class constructor
    *
-   * @param array $params
-   * @param $customFields
-   * @param string params the params for the where clause
-   *
+   * @param array $params the params for the where clause
+   * @param array $customFields
+   * @param array $ufGroupIds
    * @param bool $map
    * @param bool $editLink
    * @param bool $linkToUF
    *
    * @return \CRM_Profile_Selector_Listings
    */
-  function __construct(
+  public function __construct(
     &$params,
     &$customFields,
     $ufGroupIds = NULL,
@@ -274,8 +273,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
    * @param array $params
    */
   public function getPagerParams($action, &$params) {
-    $status =
-      CRM_Utils_System::isNull($this->_multiRecordTableName) ? ts('Contact %%StatusMessage%%') : ts('Contact Multi Records %%StatusMessage%%');
+    $status = CRM_Utils_System::isNull($this->_multiRecordTableName) ? ts('Contact %%StatusMessage%%') : ts('Contact Multi Records %%StatusMessage%%');
     $params['status'] = $status;
     $params['csvString'] = NULL;
     $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
@@ -341,7 +339,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
               if (in_array($fieldName, array(
                 'phone',
                 'im',
-                'email'
+                'email',
               ))) {
                 if ($type) {
                   $name = "`$locationTypeName-$fieldName-$type`";
@@ -552,7 +550,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
             if (in_array($fieldName, array(
               'phone',
               'im',
-              'email'
+              'email',
             ))) {
               if ($type) {
                 $names[] = "{$locationTypeName}-{$fieldName}-{$type}";
@@ -665,14 +663,14 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
         elseif (in_array($name, array(
           'addressee',
           'email_greeting',
-          'postal_greeting'
+          'postal_greeting',
         ))) {
           $dname = $name . '_display';
           $row[] = $result->$dname;
         }
         elseif (in_array($name, array(
           'birth_date',
-          'deceased_date'
+          'deceased_date',
         ))) {
           $row[] = CRM_Utils_Date::customFormat($result->$name);
         }
@@ -771,10 +769,10 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
           }
 
           if ($isSubmitted) {
-            $this->_multiRecordTableName = $multiRecordTableName =
-              CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupId, 'table_name');
+            $this->_multiRecordTableName
+              = $multiRecordTableName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupId, 'table_name');
             if ($multiRecordTableName) {
-              return;
+              return NULL;
             }
           }
 
@@ -786,14 +784,14 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR
     }
 
     if (!isset($customGroupId) || !$customGroupId) {
-      return;
+      return NULL;
     }
 
     //if the field is in selector and not a searchable field
     //get the proper customvalue table name
     if ($selectorSet) {
-      $this->_multiRecordTableName = $multiRecordTableName =
-        CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupId, 'table_name');
+      $this->_multiRecordTableName
+        = $multiRecordTableName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupId, 'table_name');
     }
   } //func close
 }
index 9ae238833fc25203ab98dde10ed3886ded362c23..686e0d92e7674c2a12c6a5b6a1b9b56483b7834f 100644 (file)
@@ -80,131 +80,131 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
     }
 
     $this->_columns = array(
-        'civicrm_contact' => array(
-          'dao' => 'CRM_Contact_DAO_Contact',
-          'fields' => array(
-            'sort_name' => array(
-              'title' => ts('Contact Name'),
-              'default' => TRUE,
-              'required' => TRUE,
-              'no_repeat' => TRUE,
-            ),
-            'id' => array(
-              'no_display' => TRUE,
-              'default' => TRUE,
-              'required' => TRUE,
-            ),
-            'contact_type' => array(
-              'title' => ts('Contact Type'),
-            ),
-            'contact_sub_type' => array(
-              'title' => ts('Contact Subtype'),
-            ),
+      'civicrm_contact' => array(
+        'dao' => 'CRM_Contact_DAO_Contact',
+        'fields' => array(
+          'sort_name' => array(
+            'title' => ts('Contact Name'),
+            'default' => TRUE,
+            'required' => TRUE,
+            'no_repeat' => TRUE,
           ),
-          'grouping' => 'contact-fields',
-          'filters' => array(
-            'sort_name' => array('title' => ts('Contact Name')),
-            'id' => array(
-              'title' => ts('Contact ID'),
-              'no_display' => TRUE,
-            ),
+          'id' => array(
+            'no_display' => TRUE,
+            'default' => TRUE,
+            'required' => TRUE,
+          ),
+          'contact_type' => array(
+            'title' => ts('Contact Type'),
+          ),
+          'contact_sub_type' => array(
+            'title' => ts('Contact Subtype'),
           ),
         ),
-        'civicrm_email' => array(
-          'dao' => 'CRM_Core_DAO_Email',
-          'fields' => array(
-            'email' => array(
-              'title' => ts('Email'),
-              'no_repeat' => TRUE,
-            ),
+        'grouping' => 'contact-fields',
+        'filters' => array(
+          'sort_name' => array('title' => ts('Contact Name')),
+          'id' => array(
+            'title' => ts('Contact ID'),
+            'no_display' => TRUE,
           ),
-          'grouping' => 'contact-fields',
         ),
-        'civicrm_phone' => array(
-          'dao' => 'CRM_Core_DAO_Phone',
-          'fields' => array(
-            'phone' => array(
-              'title' => ts('Phone'),
-              'no_repeat' => TRUE,
-            ),
+      ),
+      'civicrm_email' => array(
+        'dao' => 'CRM_Core_DAO_Email',
+        'fields' => array(
+          'email' => array(
+            'title' => ts('Email'),
+            'no_repeat' => TRUE,
           ),
-          'grouping' => 'contact-fields',
         ),
-      ) + $this->addAddressFields(FALSE, FALSE, FALSE, array()) + array(
-        'civicrm_relationship' => array(
-          'dao' => 'CRM_Contact_DAO_Relationship',
-          'fields' => array(
-            'relationship_type_id' => array(
-              'title' => ts('Relationship Type'),
-              'default' => TRUE,
-            ),
-            'contact_id_a' => array('no_display' => TRUE),
-            'contact_id_b' => array('no_display' => TRUE),
+        'grouping' => 'contact-fields',
+      ),
+      'civicrm_phone' => array(
+        'dao' => 'CRM_Core_DAO_Phone',
+        'fields' => array(
+          'phone' => array(
+            'title' => ts('Phone'),
+            'no_repeat' => TRUE,
           ),
-          'filters' => array(
-            'relationship_type_id' => array(
-              'title' => ts('Relationship Type'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => $relationTypeOp,
-              'type' => CRM_Utils_Type::T_STRING,
-            ),
+        ),
+        'grouping' => 'contact-fields',
+      ),
+    ) + $this->addAddressFields(FALSE, FALSE, FALSE, array()) + array(
+      'civicrm_relationship' => array(
+        'dao' => 'CRM_Contact_DAO_Relationship',
+        'fields' => array(
+          'relationship_type_id' => array(
+            'title' => ts('Relationship Type'),
+            'default' => TRUE,
           ),
+          'contact_id_a' => array('no_display' => TRUE),
+          'contact_id_b' => array('no_display' => TRUE),
         ),
-      ) + array(
-        'civicrm_contribution' => array(
-          'dao' => 'CRM_Contribute_DAO_Contribution',
-          'fields' => array(
-            'total_amount' => array(
-              'title' => ts('Amount Statistics'),
-              'default' => TRUE,
-              'required' => TRUE,
-              'no_display' => TRUE,
-              'statistics' => array('sum' => ts('Aggregate Amount')),
-            ),
-            'receive_date' => array(
-              'required' => TRUE,
-              'default' => TRUE,
-              'no_display' => TRUE,
-            ),
+        'filters' => array(
+          'relationship_type_id' => array(
+            'title' => ts('Relationship Type'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => $relationTypeOp,
+            'type' => CRM_Utils_Type::T_STRING,
           ),
-          'grouping' => 'contri-fields',
-          'filters' => array(
-            'this_year' => array(
-              'title' => ts('This Year'),
-              'operatorType' => CRM_Report_Form::OP_SELECT,
-              'options' => $optionYear,
-              'default' => '',
-            ),
-            'other_year' => array(
-              'title' => ts('Other Years'),
-              'operatorType' => CRM_Report_Form::OP_SELECT,
-              'options' => $optionYear,
-              'default' => '',
-            ),
-            'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE),
-            'contribution_status_id' => array(
-              'title' => ts('Contribution Status'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
-              'default' => array(1),
-            ),
-            'financial_type_id' => array(
-              'title' => ts('Financial Type'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::financialType(),
-            ),
-            'total_amount' => array(
-              'title' => ts('Contribution Amount'),
-            ),
-            'total_sum' => array(
-              'title' => ts('Aggregate Amount'),
-              'type' => CRM_Report_Form::OP_INT,
-              'dbAlias' => 'civicrm_contribution_total_amount_sum',
-              'having' => TRUE,
-            ),
+        ),
+      ),
+    ) + array(
+      'civicrm_contribution' => array(
+        'dao' => 'CRM_Contribute_DAO_Contribution',
+        'fields' => array(
+          'total_amount' => array(
+            'title' => ts('Amount Statistics'),
+            'default' => TRUE,
+            'required' => TRUE,
+            'no_display' => TRUE,
+            'statistics' => array('sum' => ts('Aggregate Amount')),
+          ),
+          'receive_date' => array(
+            'required' => TRUE,
+            'default' => TRUE,
+            'no_display' => TRUE,
           ),
         ),
-      );
+        'grouping' => 'contri-fields',
+        'filters' => array(
+          'this_year' => array(
+            'title' => ts('This Year'),
+            'operatorType' => CRM_Report_Form::OP_SELECT,
+            'options' => $optionYear,
+            'default' => '',
+          ),
+          'other_year' => array(
+            'title' => ts('Other Years'),
+            'operatorType' => CRM_Report_Form::OP_SELECT,
+            'options' => $optionYear,
+            'default' => '',
+          ),
+          'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE),
+          'contribution_status_id' => array(
+            'title' => ts('Contribution Status'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+            'default' => array(1),
+          ),
+          'financial_type_id' => array(
+            'title' => ts('Financial Type'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::financialType(),
+          ),
+          'total_amount' => array(
+            'title' => ts('Contribution Amount'),
+          ),
+          'total_sum' => array(
+            'title' => ts('Aggregate Amount'),
+            'type' => CRM_Report_Form::OP_INT,
+            'dbAlias' => 'civicrm_contribution_total_amount_sum',
+            'having' => TRUE,
+          ),
+        ),
+      ),
+    );
 
     $this->_columns['civicrm_contribution']['fields']['civicrm_upto_' .
     $this->_yearStatisticsFrom] = array(
@@ -623,8 +623,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
       return $rows;
     }
 
-    $sqlContribution =
-      "{$this->_select} {$this->_from} WHERE {$this->_aliases['civicrm_contact']}.id IN (" .
+    $sqlContribution = "{$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} ";
 
@@ -681,8 +680,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form {
     if (!empty($this->_relationshipColumns)) {
       $addRelSelect = ', ' . implode(', ', $this->_relationshipColumns);
     }
-    $sqlRelationship =
-      "SELECT {$this->_aliases['civicrm_relationship']}.relationship_type_id as relationship_type_id, {$this->_aliases['civicrm_relationship']}.contact_id_a as contact_id_a, {$this->_aliases['civicrm_relationship']}.contact_id_b as contact_id_b {$addRelSelect} FROM civicrm_contact {$relContactAlias} {$this->_relationshipFrom} WHERE {$relContactAlias}.id IN (" .
+    $sqlRelationship = "SELECT {$this->_aliases['civicrm_relationship']}.relationship_type_id as relationship_type_id, {$this->_aliases['civicrm_relationship']}.contact_id_a as contact_id_a, {$this->_aliases['civicrm_relationship']}.contact_id_b as contact_id_b {$addRelSelect} FROM civicrm_contact {$relContactAlias} {$this->_relationshipFrom} WHERE {$relContactAlias}.id IN (" .
       implode(',', $contactIds) .
       ") AND {$this->_aliases['civicrm_relationship']}.is_active = 1 {$this->_relationshipWhere} GROUP BY {$this->_aliases['civicrm_relationship']}.contact_id_a, {$this->_aliases['civicrm_relationship']}.contact_id_b";
     $relationshipTypes = CRM_Core_PseudoConstant::relationshipType();
index a4a9ff39205b0d69744d07af7a3ac6c6b16f3916..59e091b35de64ee68d50e658b4293563a16c6488 100644 (file)
@@ -47,127 +47,127 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form {
    */
   public function __construct() {
     $this->_columns = array(
-        'civicrm_contact' => array(
-          'dao' => 'CRM_Contact_DAO_Contact',
-          'fields' => array(
-            'sort_name' => array(
-              'title' => ts('Contact Name'),
-              'no_repeat' => TRUE,
-            ),
-            'postal_greeting_display' => array('title' => ts('Postal Greeting')),
-            'id' => array(
-              'no_display' => TRUE,
-              'required' => TRUE,
-            ),
+      'civicrm_contact' => array(
+        'dao' => 'CRM_Contact_DAO_Contact',
+        'fields' => array(
+          'sort_name' => array(
+            'title' => ts('Contact Name'),
+            'no_repeat' => TRUE,
           ),
-          'grouping' => 'contact-fields',
-          'group_bys' => array(
-            'id' => array('title' => ts('Contact ID')),
-            'sort_name' => array(
-              'title' => ts('Contact Name'),
-            ),
+          'postal_greeting_display' => array('title' => ts('Postal Greeting')),
+          'id' => array(
+            'no_display' => TRUE,
+            'required' => TRUE,
           ),
         ),
-        'civicrm_email' => array(
-          'dao' => 'CRM_Core_DAO_Email',
-          'fields' => array(
-            'email' => array(
-              'no_repeat' => TRUE,
-              'title' => ts('email'),
-            ),
+        'grouping' => 'contact-fields',
+        'group_bys' => array(
+          'id' => array('title' => ts('Contact ID')),
+          'sort_name' => array(
+            'title' => ts('Contact Name'),
           ),
-          'grouping' => 'contact-fields',
         ),
-        'civicrm_pledge' => array(
-          'dao' => 'CRM_Pledge_DAO_Pledge',
-          'fields' => array(
-            'id' => array(
-              'no_display' => TRUE,
-              'required' => FALSE,
-            ),
-            'currency' => array(
-              'required' => TRUE,
-              'no_display' => TRUE,
-            ),
-            'amount' => array(
-              'title' => ts('Pledge Amount'),
-              'required' => TRUE,
-              'type' => CRM_Utils_Type::T_MONEY,
-              'statistics' => array(
-                'sum' => ts('Aggregate Amount Pledged'),
-                'count' => ts('Pledges'),
-                'avg' => ts('Average'),
-              ),
-            ),
-            'frequency_unit' => array(
-              'title' => ts('Frequency Unit'),
-            ),
-            'installments' => array(
-              'title' => ts('Installments'),
-            ),
-            'pledge_create_date' => array(
-              'title' => ts('Pledge Made Date'),
-            ),
-            'start_date' => array(
-              'title' => ts('Pledge Start Date'),
-              'type' => CRM_Utils_Type::T_DATE,
-            ),
-            'end_date' => array(
-              'title' => ts('Pledge End Date'),
-              'type' => CRM_Utils_Type::T_DATE,
-            ),
-            'status_id' => array(
-              'title' => ts('Pledge Status'),
-            ),
+      ),
+      'civicrm_email' => array(
+        'dao' => 'CRM_Core_DAO_Email',
+        'fields' => array(
+          'email' => array(
+            'no_repeat' => TRUE,
+            'title' => ts('email'),
           ),
-          'filters' => array(
-            'pledge_create_date' => array(
-              'title' => 'Pledge Made Date',
-              'operatorType' => CRM_Report_Form::OP_DATE,
-            ),
-            'pledge_amount' => array(
-              'title' => ts('Pledged Amount'),
-              'operatorType' => CRM_Report_Form::OP_INT,
-            ),
-            'currency' => array(
-              'title' => 'Currency',
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
-              'default' => NULL,
-              'type' => CRM_Utils_Type::T_STRING,
-            ),
-            'sid' => array(
-              'name' => 'status_id',
-              'title' => ts('Pledge Status'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Core_OptionGroup::values('contribution_status'),
-            ),
+        ),
+        'grouping' => 'contact-fields',
+      ),
+      'civicrm_pledge' => array(
+        'dao' => 'CRM_Pledge_DAO_Pledge',
+        'fields' => array(
+          'id' => array(
+            'no_display' => TRUE,
+            'required' => FALSE,
           ),
-          'group_bys' => array(
-            'pledge_create_date' => array(
-              'frequency' => TRUE,
-              'default' => TRUE,
-              'chart' => TRUE,
-            ),
-            'frequency_unit' => array(
-              'title' => ts('Frequency Unit'),
-            ),
-            'status_id' => array(
-              'title' => ts('Pledge Status'),
+          'currency' => array(
+            'required' => TRUE,
+            'no_display' => TRUE,
+          ),
+          'amount' => array(
+            'title' => ts('Pledge Amount'),
+            'required' => TRUE,
+            'type' => CRM_Utils_Type::T_MONEY,
+            'statistics' => array(
+              'sum' => ts('Aggregate Amount Pledged'),
+              'count' => ts('Pledges'),
+              'avg' => ts('Average'),
             ),
           ),
+          'frequency_unit' => array(
+            'title' => ts('Frequency Unit'),
+          ),
+          'installments' => array(
+            'title' => ts('Installments'),
+          ),
+          'pledge_create_date' => array(
+            'title' => ts('Pledge Made Date'),
+          ),
+          'start_date' => array(
+            'title' => ts('Pledge Start Date'),
+            'type' => CRM_Utils_Type::T_DATE,
+          ),
+          'end_date' => array(
+            'title' => ts('Pledge End Date'),
+            'type' => CRM_Utils_Type::T_DATE,
+          ),
+          'status_id' => array(
+            'title' => ts('Pledge Status'),
+          ),
         ),
-        'civicrm_pledge_payment' => array(
-          'dao' => 'CRM_Pledge_DAO_PledgePayment',
-          'fields' => array(
-            'total_paid' => array(
-              'title' => ts('Total Amount Paid'),
-              'type' => CRM_Utils_Type::T_STRING,
-              'dbAlias' => 'sum(pledge_payment_civireport.actual_amount)',
-            ),
+        'filters' => array(
+          'pledge_create_date' => array(
+            'title' => 'Pledge Made Date',
+            'operatorType' => CRM_Report_Form::OP_DATE,
+          ),
+          'pledge_amount' => array(
+            'title' => ts('Pledged Amount'),
+            'operatorType' => CRM_Report_Form::OP_INT,
+          ),
+          'currency' => array(
+            'title' => 'Currency',
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
+            'default' => NULL,
+            'type' => CRM_Utils_Type::T_STRING,
+          ),
+          'sid' => array(
+            'name' => 'status_id',
+            'title' => ts('Pledge Status'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Core_OptionGroup::values('contribution_status'),
+          ),
+        ),
+        'group_bys' => array(
+          'pledge_create_date' => array(
+            'frequency' => TRUE,
+            'default' => TRUE,
+            'chart' => TRUE,
+          ),
+          'frequency_unit' => array(
+            'title' => ts('Frequency Unit'),
+          ),
+          'status_id' => array(
+            'title' => ts('Pledge Status'),
+          ),
+        ),
+      ),
+      'civicrm_pledge_payment' => array(
+        'dao' => 'CRM_Pledge_DAO_PledgePayment',
+        'fields' => array(
+          'total_paid' => array(
+            'title' => ts('Total Amount Paid'),
+            'type' => CRM_Utils_Type::T_STRING,
+            'dbAlias' => 'sum(pledge_payment_civireport.actual_amount)',
           ),
         ),
-      ) + $this->addAddressFields();
+      ),
+    ) + $this->addAddressFields();
 
     $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
index f7aecb08575d88a98a6d53d92e9713bc284c065a..a454a10bf24dd39be88fb7ea02e98554d824a7c3 100644 (file)
@@ -67,12 +67,12 @@ class CRM_Utils_Hook_Soap extends CRM_Utils_Hook {
    *
    * @return mixed
    */
-  function invoke(
+  public function invoke(
     $numParams,
     &$arg1, &$arg2, &$arg3, &$arg4, &$arg5, &$arg6,
     $fnSuffix
   ) {
     // suppress all hok calls during soap
-    return;
+    return NULL;
   }
 }
index eecd779c238ea06f3567ab8895688ae4c0ddaa27..ef81824aac7c4acdaad6927dccf2269a1393cdcb 100644 (file)
@@ -146,7 +146,9 @@ class CRM_Utils_SoapServer {
     return sha1($result[2]);
   }
 
-  /*** MAILER API ***/
+  /**
+   * MAILER API
+   */
   public function mailer_event_bounce($key, $job, $queue, $hash, $body) {
     $this->verify($key);
     $params = array(
index 353d59351cad325278a9f55aae808a2c27e5db60..1b04f30272b6f681febab80dfeb62209bc5b051d 100644 (file)
@@ -1300,13 +1300,13 @@ class CRM_Utils_System {
    * @param array $params
    *   An array of parameters (see CRM_Utils_System::docURL2 method for names)
    *
-   * @return string|void
+   * @return void|string
    *   URL or link to documentation page, based on provided parameters.
    */
   public static function docURL($params) {
 
     if (!isset($params['page'])) {
-      return;
+      return NULL;
     }
 
     if (CRM_Utils_Array::value('resource', $params) == 'wiki') {
@@ -1464,16 +1464,12 @@ class CRM_Utils_System {
     CRM_ACL_BAO_Cache::resetCache();
 
     // reset various static arrays used here
-    CRM_Contact_BAO_Contact::$_importableFields
-      = CRM_Contact_BAO_Contact::$_exportableFields
+    CRM_Contact_BAO_Contact::$_importableFields = CRM_Contact_BAO_Contact::$_exportableFields
       = CRM_Contribute_BAO_Contribution::$_importableFields
-      = CRM_Contribute_BAO_Contribution::$_exportableFields
-      = CRM_Pledge_BAO_Pledge::$_exportableFields
-      = CRM_Contribute_BAO_Query::$_contributionFields
-      = CRM_Core_BAO_CustomField::$_importFields
-      = CRM_Core_BAO_Cache::$_cache
-      = CRM_Core_DAO::$_dbColumnValueCache
-      = NULL;
+        = CRM_Contribute_BAO_Contribution::$_exportableFields
+          = CRM_Pledge_BAO_Pledge::$_exportableFields = CRM_Contribute_BAO_Query::$_contributionFields
+            = CRM_Core_BAO_CustomField::$_importFields
+              = CRM_Core_BAO_Cache::$_cache = CRM_Core_DAO::$_dbColumnValueCache = NULL;
 
     CRM_Core_OptionGroup::flushAll();
     CRM_Utils_PseudoConstant::flushAll();
index 7af9cc659192bd8941b6c233fe4a1af594afee30..52a1f139c9c60fdfc8f56f045c820b12471b2e93 100644 (file)
@@ -416,8 +416,6 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase {
   /**
    * Rewrite various system urls to https
    *
-   * @param null
-   *
    * @return void
    */
   public function mapConfigToSSL() {
@@ -454,10 +452,7 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase {
    *   Load cms bootstrap?.
    * @param NULL|string $realPath filename of script
    *
-   * @return mixed
-   *   false if no auth
-   *               array(
-   *  contactID, ufID, unique string ) if success
+   * @return mixed false if no auth array(contactID, ufID, unique string ) if success
    */
   public static function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
     require_once 'DB.php';
@@ -561,7 +556,7 @@ AND    u.status = 1
    * e.g. for drupal: records a watchdog message about the new session, saves the login timestamp,
    * calls hook_user op 'login' and generates a new session.
    *
-   * @param array params
+   * @param array $params
    *
    * FIXME: Document values accepted/required by $params
    */
@@ -815,7 +810,7 @@ AND    u.status = 1
   /**
    * Check is user logged in.
    *
-   * @return boolean
+   * @return bool
    */
   public function isUserLoggedIn() {
     $isloggedIn = FALSE;
index 4c9002373b752394985722bb11aabe2f00366c2e..895b3e2db156f786a0f6e5932b28c4f9e03a2c67 100644 (file)
@@ -59,7 +59,7 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
    * @param null $pageTitle
    */
   public function setTitle($title, $pageTitle = NULL) {
-    return;
+    return NULL;
   }
 
   /**
@@ -103,11 +103,11 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
    * @param $breadCrumbs
    */
   public function appendBreadCrumb($breadCrumbs) {
-    return;
+    return NULL;
   }
 
   public function resetBreadCrumb() {
-    return;
+    return NULL;
   }
 
   /**
@@ -122,7 +122,7 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
    * @param string $head
    */
   public function addHTMLHead($head) {
-    return;
+    return NULL;
   }
 
   public function mapConfigToSSL() {
@@ -142,10 +142,10 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
   /**
    * @param mix $action
    *
-   * @return string
+   * @return void
    */
   public function postURL($action) {
-    return;
+    return NULL;
   }
 
   /**
@@ -182,7 +182,7 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
    *
    * @return string
    */
-  function url(
+  public function url(
     $path = NULL, $query = NULL, $absolute = FALSE,
     $fragment = NULL, $htmlize = TRUE,
     $frontend = FALSE, $forceBackend = FALSE
@@ -270,7 +270,7 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
    * @param string $message
    */
   public function setMessage($message) {
-    return;
+    return NULL;
   }
 
   public function permissionDenied() {
@@ -289,7 +289,7 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
    *   with the locale or null for none
    */
   /**
-   * @return string
+   * @return void
    */
   public function getUFLocale() {
     return NULL;
@@ -314,8 +314,7 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal {
    * @param string $destination
    *   If present, add destination to querystring (works for Drupal only).
    *
-   * @throws Exception
-   * @return string
+   * @Throws Exception
    *   loginURL for the current CMS
    */
   public function getLoginURL($destination = '') {
index cbbafa0f4d7357479479214bfff6b6c97e0e16ed..ce7140275c0ba0d95e6fc2f60b100d55f1e1f909 100644 (file)
@@ -109,10 +109,8 @@ class CRM_Utils_Tree {
    *   Name of the node we are searching for.
    * @param array (ref) $parentNode which parent node should we search in ?
    *
-   * @return array(
-   * ref) | false node if found else false
+   * @return array(ref) | false node if found else false
    */
-  //public function &findNode(&$parentNode, $name)
   public function &findNode($name, &$parentNode) {
     // if no parent node specified, please start from root node
     if (!$parentNode) {
@@ -146,10 +144,9 @@ class CRM_Utils_Tree {
    * Check if node is a leaf node.
    * Currently leaf nodes are strings and non-leaf nodes are arrays
    *
-   * @param array (
-   * ref) $node node which needs to checked
+   * @param array $node node which needs to checked
    *
-   * @return boolean
+   * @return bool
    */
   public function isLeafNode(&$node) {
     return (count($node['children']) ? TRUE : FALSE);
@@ -176,7 +173,7 @@ class CRM_Utils_Tree {
    *
    * @param string $parentName
    *   Name of the parent ?.
-   * @param array (ref) - node to be added
+   * @param array (ref) $node - node to be added
    *
    * @return void
    */
@@ -190,10 +187,9 @@ class CRM_Utils_Tree {
   /**
    * Add Data
    *
-   * @param string $parentName
-   *   Name of the parent ?.
-   * @param mixed - data to be added
-   * @param string - key to be used (optional)
+   * @param string $parentName Name of the parent ?.
+   * @param string $childName - key to be used (optional)
+   * @param mixed $data - data to be added
    *
    * @return void
    */
@@ -212,8 +208,6 @@ class CRM_Utils_Tree {
   /**
    * Get Tree
    *
-   * @param none
-   *
    * @return tree
    */
   public function getTree() {
@@ -223,8 +217,6 @@ class CRM_Utils_Tree {
   /**
    * Print the tree
    *
-   * @param none
-   *
    * @return void
    */
   public function display() {
index f15a93b5a568f14e8410d695771dad2cc3c4ca0b..020738e5fb7871c87e10b6e413fc21a1344cfa06 100644 (file)
@@ -62,7 +62,7 @@ class CRM_Widget_Widget {
    * @param int $contributionPageID
    * @param string $widgetID
    *
-   * @return stdClass
+   * @return object
    */
   public function getContributionPageData($contributionPageID, $widgetID) {
     $config = CRM_Core_Config::singleton();
index eb0b85ec5fb745a7dd65dd8fd862f3f6e321df6f..030939085ce3a75f1df8a9c83b50e93190e8eecc 100644 (file)
@@ -31,7 +31,7 @@
  * php bin/csv/delete.php -e <entity> --file /path/to/csv/file [ -s site.org ]
  * e.g.: php bin/csv/delete.php -e Contact --file /tmp/delete.csv
  *
- **/
+ */
 
 require_once dirname(__DIR__) . '/cli.class.php';
 
index 3efc29f025015935255db0262a2baf509241af9b..e3f8bb0ba301847cd799777c20b45f3c90cc3b5b 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Activity_AllTests extends CiviTestSuite {
    */
   private static function getInstance() {
     if (is_null(self::$instance)) {
-      self::$instance = new self;
+      self::$instance = new self();
     }
     return self::$instance;
   }
index 57cff4d4fd0e51693685346c417cc8354828eeea..f7fc6ebc2433342494c982557eeb432606a35a1c 100644 (file)
@@ -56,21 +56,21 @@ class CRM_Core_Config_MailerTest extends CiviUnitTestCase {
   public function testHookAlterMailer() {
     $test = $this;
     $mockMailer = new CRM_Utils_FakeObject(array(
-      'send' => function ($recipients, $headers, $body) use ($test) {
-        $test->calls['send']++;
-        $test->assertEquals(array('to@example.org'), $recipients);
-        $test->assertEquals('Subject Example', $headers['Subject']);
-      },
+    'send' => function ($recipients, $headers, $body) use ($test) {
+      $test->calls['send']++;
+      $test->assertEquals(array('to@example.org'), $recipients);
+      $test->assertEquals('Subject Example', $headers['Subject']);
+    },
     ));
 
     CRM_Utils_Hook::singleton()->setHook('civicrm_alterMailer',
-      function (&$mailer, $driver, $params) use ($test, $mockMailer) {
-        $test->calls['civicrm_alterMailer']++;
-        $test->assertTrue(is_string($driver) && !empty($driver));
-        $test->assertTrue(is_array($params));
-        $test->assertTrue(is_callable(array($mailer, 'send')));
-        $mailer = $mockMailer;
-      }
+    function (&$mailer, $driver, $params) use ($test, $mockMailer) {
+      $test->calls['civicrm_alterMailer']++;
+      $test->assertTrue(is_string($driver) && !empty($driver));
+      $test->assertTrue(is_array($params));
+      $test->assertTrue(is_callable(array($mailer, 'send')));
+      $mailer = $mockMailer;
+    }
     );
 
     $params = array();
index 4b1e8c7b22fa9710816a78975b319d28f2c7a5f6..3ce716b9bb5c619b4bd7cb4e840a27b12e49fb47 100644 (file)
@@ -75,7 +75,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
     $paypalIPN->main();
     $contribution = $this->callAPISuccess('contribution', 'get', array(
         'contribution_recur_id' => $this->_contributionRecurID,
-        'sequential' => 1
+        'sequential' => 1,
       ));
     $this->assertEquals(2, $contribution['count']);
     $this->assertEquals('secondone', $contribution['values'][1]['trxn_id']);
@@ -102,17 +102,17 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
     $this->assertEquals(strtotime('+ 1 year', strtotime($membershipEndDate)), strtotime($this->callAPISuccessGetValue('membership', array('return' => 'end_date'))));
     $contribution = $this->callAPISuccess('contribution', 'get', array(
         'contribution_recur_id' => $this->_contributionRecurID,
-        'sequential' => 1
+        'sequential' => 1,
       ));
     $this->assertEquals(2, $contribution['count']);
     $this->assertEquals('secondone', $contribution['values'][1]['trxn_id']);
     $this->callAPISuccessGetCount('line_item', array(
         'entity_id' => $this->ids['membership'],
-        'entity_table' => 'civicrm_membership'
+        'entity_table' => 'civicrm_membership',
       ), 2);
     $this->callAPISuccessGetSingle('line_item', array(
         'contribution_id' => $contribution['values'][1]['id'],
-        'entity_table' => 'civicrm_membership'
+        'entity_table' => 'civicrm_membership',
       ));
     $this->callAPISuccessGetSingle('membership_payment', array('contribution_id' => $contribution['values'][1]['id']));
 
@@ -141,7 +141,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
     $paypalIPN->main();
     $contribution = $this->callAPISuccess('contribution', 'get', array(
         'contribution_recur_id' => $this->_contributionRecurID,
-        'sequential' => 1
+        'sequential' => 1,
       ));
     $this->assertEquals(1, $contribution['count']);
     $this->assertEquals('secondone', $contribution['values'][0]['trxn_id']);
@@ -321,11 +321,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
       'amount_per_cycle' => '15.00',
       'mc_gross' => '15.00',
       'payment_date' => '03:59:05 Jul 14, 2013 PDT',
-      'rp_invoice_id' => 'i=' . $this->_invoiceID
-        . '&m=contribute&c='
-        . $this->_contactID
-        . '&r=' . $this->_contributionRecurID
-        . '&b=' . $this->_contributionID . '&p=' . $this->_contributionPageID,
+      'rp_invoice_id' => 'i=' . $this->_invoiceID . '&m=contribute&c=' . $this->_contactID . '&r=' . $this->_contributionRecurID . '&b=' . $this->_contributionID . '&p=' . $this->_contributionPageID,
       'payment_status' => 'Completed',
       'business' => 'nowhere@civicrm.org',
       'last_name' => 'Roberty',
index e0c46fbca4ea4506f7348033bc5d687bc78ffbab..dc64f5d407cfdcd0a962f7faf1e62dd21e533c5e 100644 (file)
@@ -37,7 +37,7 @@ class AuthorizeNet extends PHPUnit_Framework_Testcase {
    * @param int $id
    *   Id of the PayPal Pro payment processor.
    *   to be deleted
-   * @return boolean
+   * @return bool
    *   true if payment processor deleted, false otherwise
    */
   public function delete($id) {
index 3b32266cfe2357a71bc7511f8dab03e58110e090..88f42e0a64fcb0a92064795cead4c65489833c71 100644 (file)
@@ -50,7 +50,7 @@ class WebTest_Case_AddCaseTypeTest 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 32e8ad642547f0ad567e4a4aa9bd5e169cab71c8..65aca47531a33c687696809fc2b69f9edfcee280 100644 (file)
@@ -341,11 +341,11 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
 
     $result = $this->callAPIAndDocument('activity', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
     $result = $this->callAPISuccess('activity', 'get', array(
-        'id' => $result['id'],
-        'version' => $this->_apiversion,
-        'return.assignee_contact_id' => 1,
-        'return.target_contact_id' => 1
-      ));
+      'id' => $result['id'],
+      'version' => $this->_apiversion,
+      'return.assignee_contact_id' => 1,
+      'return.target_contact_id' => 1,
+    ));
 
     $this->assertEquals($this->_contactID, $result['values'][$result['id']]['assignee_contact_id'][0], 'in line ' . __LINE__);
     $this->assertEquals($this->_contactID, $result['values'][$result['id']]['target_contact_id'][0], 'in line ' . __LINE__);
@@ -371,10 +371,10 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $params['custom_' . $ids['custom_field_id']] = "custom string";
     $result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__);
     $result = $this->callAPISuccess($this->_entity, 'get', array(
-        'return.custom_' . $ids['custom_field_id'] => 1,
-        'version' => 3,
-        'id' => $result['id']
-      ));
+      'return.custom_' . $ids['custom_field_id'] => 1,
+      'version' => 3,
+      'id' => $result['id'],
+    ));
     $this->assertEquals("custom string", $result['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
 
     $this->customFieldDelete($ids['custom_field_id']);
@@ -408,9 +408,9 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
 
     $result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__, $description, $subfile, 'Create');
     $result = $this->callAPIAndDocument($this->_entity, 'get', array(
-        'return.custom_' . $customField['id'] => 1,
-        'id' => $result['id']
-      ), __FUNCTION__, __FILE__, 'Get with Contact Ref Custom Field', 'ContactRefCustomFieldGet', 'get');
+      'return.custom_' . $customField['id'] => 1,
+      'id' => $result['id'],
+    ), __FUNCTION__, __FILE__, 'Get with Contact Ref Custom Field', 'ContactRefCustomFieldGet', 'get');
 
     $this->assertEquals('Anderson, Anthony', $result['values'][$result['id']]['custom_' . $customField['id']], ' in line ' . __LINE__);
     $this->assertEquals($this->_contactID, $result['values'][$result['id']]['custom_' . $customField['id'] . "_id"], ' in line ' . __LINE__);
@@ -590,18 +590,18 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $activity = $this->callAPISuccess('Activity', 'Create', $params);
 
     $activityget = $this->callAPISuccess('Activity', 'get', array(
-        'id' => $activity['id'],
-        'target_contact_id' => $contact2,
-        'return.target_contact_id' => 1
-      ));
+      'id' => $activity['id'],
+      'target_contact_id' => $contact2,
+      'return.target_contact_id' => 1,
+    ));
     $this->assertEquals($activity['id'], $activityget['id'], 'In line ' . __LINE__);
     $this->assertEquals($contact2, $activityget['values'][$activityget['id']]['target_contact_id'][0], 'In line ' . __LINE__);
 
     $activityget = $this->callAPISuccess('activity', 'get', array(
-        'target_contact_id' => $this->_contactID,
-        'return.target_contact_id' => 1,
-        'id' => $activity['id']
-      ));
+      'target_contact_id' => $this->_contactID,
+      'return.target_contact_id' => 1,
+      'id' => $activity['id'],
+    ));
     if ($activityget['count'] > 0) {
       $this->assertNotEquals($contact2, $activityget['values'][$activityget['id']]['target_contact_id'][0], 'In line ' . __LINE__);
     }
@@ -633,7 +633,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $this->assertEquals(0, $result['count'], 'No activities of status 1 should exist');
     $result = $this->callAPISuccess('Activity', 'Get', array(
       'version' => $this->_apiversion,
-      'status_id' => '2'
+      'status_id' => '2',
     ));
     $this->assertEquals(0, $result['count'], 'No activities of status 1 should exist');
 
@@ -890,10 +890,10 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
 
     $activityId = $result['id'];
     $result = $this->callAPISuccess($this->_entity, 'get', array(
-        'return.custom_' . $ids['custom_field_id'] => 1,
-        'version' => 3,
-        'id' => $result['id']
-      ));
+      'return.custom_' . $ids['custom_field_id'] => 1,
+      'version' => 3,
+      'id' => $result['id'],
+    ));
     $this->assertEquals("custom string", $result['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
     $this->assertEquals("2009-10-18 00:00:00", $result['values'][$result['id']]['activity_date_time'], ' in line ' . __LINE__);
     $fields = $this->callAPISuccess('activity', 'getfields', array('version' => $this->_apiversion));
@@ -914,10 +914,10 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $result = $this->callAPISuccess('Activity', 'Create', $params);
 
     $result = $this->callAPISuccess($this->_entity, 'get', array(
-        'return.custom_' . $ids['custom_field_id'] => 1,
-        'version' => 3,
-        'id' => $result['id']
-      ));
+      'return.custom_' . $ids['custom_field_id'] => 1,
+      'version' => 3,
+      'id' => $result['id'],
+    ));
     $this->assertEquals("Updated my test data", $result['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
   }
 
@@ -1130,7 +1130,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       ),
       'api.activity.create' => array(
         'subject' => 'send letter',
-        'activity_type_id' => '$value.api.activity_type.create.values.0.value'
+        'activity_type_id' => '$value.api.activity_type.create.values.0.value',
       ),
     ));