INFRA-132 - Misc
authorTim Otten <totten@civicrm.org>
Tue, 20 Jan 2015 03:57:19 +0000 (19:57 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 20 Jan 2015 03:57:19 +0000 (19:57 -0800)
40 files changed:
CRM/ACL/Form/ACL.php
CRM/Activity/Form/Activity.php
CRM/Admin/Page/Navigation.php
CRM/Case/Audit/Audit.php
CRM/Case/Form/Activity.php
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/Group.php
CRM/Contact/Form/Task/Label.php
CRM/Contact/Page/View/Log.php
CRM/Contact/Page/View/Note.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Core/BAO/Address.php
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/CustomGroup.php
CRM/Core/BAO/Discount.php
CRM/Core/Form.php
CRM/Core/Form/RecurringEntity.php
CRM/Core/Payment/BaseIPN.php
CRM/Core/Payment/PaymentExpress.php
CRM/Core/Report/Excel.php
CRM/Core/Smarty/plugins/function.docURL.php
CRM/Core/Smarty/plugins/function.help.php
CRM/Core/Smarty/plugins/modifier.substring.php
CRM/Event/BAO/Participant.php
CRM/Logging/Reverter.php
CRM/Mailing/Form/Browse.php
CRM/Report/Form/Contribute/Detail.php
CRM/Report/Form/Contribute/Summary.php
CRM/Report/Form/Contribute/Sybunt.php
CRM/UF/Form/Field.php
CRM/Utils/Cache/APCcache.php
CRM/Utils/Weight.php
api/v3/Constant.php
api/v3/ContributionRecur.php
tests/phpunit/CRM/Core/ResourcesTest.php
tests/phpunit/WebTest/Contact/SearchBuilderTest.php
tests/phpunit/api/v3/ContributionTest.php
tests/phpunit/api/v3/DomainTest.php
tests/phpunit/api/v3/MembershipStatusTest.php
tests/phpunit/api/v3/SyntaxConformanceTest.php

index 14c1c188bbe1ae156ef34376cff8491a88c4ec3d..d904767aa5b0e0b9ad4b5ab66598bacc2e3b8597 100644 (file)
@@ -156,30 +156,30 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
 
     $label = ts('Role');
     $role = array(
-        '-1' => ts('- select role -'),
-        '0' => ts('Everyone'),
-      ) + CRM_Core_OptionGroup::values('acl_role');
+      '-1' => ts('- select role -'),
+      '0' => ts('Everyone'),
+    ) + CRM_Core_OptionGroup::values('acl_role');
     $this->add('select', 'entity_id', $label, $role, TRUE);
 
     $group = array(
-        '-1' => ts('- select -'),
-        '0' => ts('All Groups'),
-      ) + CRM_Core_PseudoConstant::group();
+      '-1' => ts('- select -'),
+      '0' => ts('All Groups'),
+    ) + CRM_Core_PseudoConstant::group();
 
     $customGroup = array(
-        '-1' => ts('- select -'),
-        '0' => ts('All Custom Groups'),
-      ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
+      '-1' => ts('- select -'),
+      '0' => ts('All Custom Groups'),
+    ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
 
     $ufGroup = array(
-        '-1' => ts('- select -'),
-        '0' => ts('All Profiles'),
-      ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
+      '-1' => ts('- select -'),
+      '0' => ts('All Profiles'),
+    ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
 
     $event = array(
-        '-1' => ts('- select -'),
-        '0' => ts('All Events'),
-      ) + CRM_Event_PseudoConstant::event(NULL, FALSE, "( is_template IS NULL OR is_template != 1 )");
+      '-1' => ts('- select -'),
+      '0' => ts('All Events'),
+    ) + CRM_Event_PseudoConstant::event(NULL, FALSE, "( is_template IS NULL OR is_template != 1 )");
 
     $this->add('select', 'group_id', ts('Group'), $group);
     $this->add('select', 'custom_group_id', ts('Custom Data'), $customGroup);
index b8d9a6959f355e4f3c22f3127c5d013ac9a808e2..5dbdc39f047d52dbb7f9d4a1a6b1065886587e73 100644 (file)
@@ -889,7 +889,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
       CRM_Core_BAO_EntityTag::del($tagParams);
 
       CRM_Core_Session::setStatus(ts("Selected Activity has been deleted successfully."), ts('Record Deleted'), 'success');
-      return;
+      return NULL;
     }
 
     // store the submitted values in an array
index dad54f5b545873b01480356eef1818dddd92794c..6b0b09c481ddcf44b5d697ce60fd22374d744677 100644 (file)
@@ -58,10 +58,11 @@ class CRM_Admin_Page_Navigation extends CRM_Core_Page_Basic {
   /**
    * Get action Links
    *
-   * @return array
+   * @return array|NULL
    *   (reference) of action links
    */
   public function &links() {
+    return NULL;
   }
 
   /**
index fe711c3a0012dcd390a0088031143cf57d2cf75e..1928fa4e4383cc5da7686e2a1a4a44ad64cd1a42 100644 (file)
@@ -212,15 +212,14 @@ class CRM_Case_Audit_Audit {
   }
 
   /**
-   * @param $xmlString
+   * @param string $xmlString
    * @param int $clientID
    * @param int $caseID
    * @param bool $printReport
    *
    * @return mixed
    */
-  static
-  public function run($xmlString, $clientID, $caseID, $printReport = FALSE) {
+  public static function run($xmlString, $clientID, $caseID, $printReport = FALSE) {
     /*
     $fh = fopen('C:/temp/audit2.xml', 'w');
     fwrite($fh, $xmlString);
index 0330fd32d8daea9f6bfbd8da1da0fafb0ea95397..57cce896cf35b254d50de476150c07d59c96a28c 100644 (file)
@@ -281,9 +281,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
       $openCaseID = CRM_Core_OptionGroup::getValue('activity_type', 'Open Case', 'name');
       unset($aTypes[$openCaseID]);
       asort($aTypes);
-      $this->_fields['followup_activity_type_id']['attributes'] = array(
-          '' => '- select activity type -',
-        ) + $aTypes;
+      $this->_fields['followup_activity_type_id']['attributes'] = array('' => '- select activity type -') + $aTypes;
     }
 
     $result = parent::buildQuickForm();
index 677d8c5766a7cc9bb9fe06d68676c57d0ca1531f..8c1731f84c6075a6081eb8bf67194db524f80a3c 100644 (file)
@@ -113,7 +113,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
    * @param array $params
    *   (reference) an assoc array of name/value pairs.
    *
-   * @return CRM_Contact_BAO_Contact|CRM_Core_Error
+   * @return CRM_Contact_BAO_Contact|CRM_Core_Error|NULL
    *   Created or updated contact object or error object.
    *   (error objects are being phased out in favour of exceptions)
    */
@@ -121,7 +121,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
     $contact = new CRM_Contact_DAO_Contact();
 
     if (empty($params)) {
-      return;
+      return NULL;
     }
 
     // Fix for validate contact sub type CRM-5143.
index 333e201d096bc61eaeb7b5d55dc85382ebfd47b9..60d15129f9ff42fdc3e64096038d038b5eb9f57e 100644 (file)
@@ -72,8 +72,6 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
    *
    * @param int $id
    *   Group id.
-   *
-   * @return NULL
    */
   public static function discard($id) {
     CRM_Utils_Hook::pre('delete', 'Group', $id, CRM_Core_DAO::$_nullArray);
index d7b9ba06728339809e1577bdaf3c56acbabd7090..a0c77f777dd5d0941394f7b7758b8f4f4f446f36 100644 (file)
@@ -390,8 +390,6 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task {
    *   Format in which labels needs to be printed.
    * @param string $fileName
    *   The name of the file to save the label in.
-   *
-   * @return null
    */
   public function createLabel(&$contactRows, &$format, $fileName = 'MailingLabels_CiviCRM.pdf') {
     $pdf = new CRM_Utils_PDF_Label($format, 'mm');
index bac1c3e9d153ed77667d8830dacc543bb6e6750e..7403765adcf8a1d1b56c480d2ec7909700ba874b 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Contact_Page_View_Log extends CRM_Core_Page {
       $this->assign('instanceUrl',
         CRM_Utils_System::url("civicrm/report/instance/{$loggingReport}",
           "reset=1&force=1&snippet=4&section=2&altered_contact_id_op=eq&altered_contact_id_value={$this->_contactId}&cid={$this->_contactId}", FALSE, NULL, FALSE));
-      return;
+      return NULL;
     }
 
     $log = new CRM_Core_DAO_Log();
index 9fe235af337e30aa543bff7f7182b2bc7c031cc2..5a5deeb94953e737a17c113256d253bdaaf838f3 100644 (file)
@@ -81,8 +81,6 @@ class CRM_Contact_Page_View_Note extends CRM_Core_Page {
 
   /**
    * called when action is browse
-   *
-   * @return null
    */
   public function browse() {
     $note = new CRM_Core_DAO_Note();
@@ -160,8 +158,6 @@ class CRM_Contact_Page_View_Note extends CRM_Core_Page {
 
   /**
    * called when action is update or new
-   *
-   * @return null
    */
   public function edit() {
     $controller = new CRM_Core_Controller_Simple('CRM_Note_Form_Note', ts('Contact Notes'), $this->_action);
index c5a8048902660f28d8779e832aadbe23bdded360..de244c49ed70f5d4e9e6d5e10e6e4d8912cd6482 100644 (file)
@@ -89,22 +89,13 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
       'amount_level' => CRM_Utils_Array::value('amount_level', $params),
       'invoice_id' => $params['invoiceID'],
       'currency' => $params['currencyID'],
-      'source' =>
-        (!$online || !empty($params['source'])) ?
-          CRM_Utils_Array::value('source', $params) :
-          CRM_Utils_Array::value('description', $params),
+      'source' => (!$online || !empty($params['source'])) ? CRM_Utils_Array::value('source', $params) : CRM_Utils_Array::value('description', $params),
       'is_pay_later' => CRM_Utils_Array::value('is_pay_later', $params, 0),
       //configure cancel reason, cancel date and thankyou date
       //from 'contribution' type profile if included
       'cancel_reason' => CRM_Utils_Array::value('cancel_reason', $params, 0),
-      'cancel_date' =>
-        isset($params['cancel_date']) ?
-          CRM_Utils_Date::format($params['cancel_date']) :
-          NULL,
-      'thankyou_date' =>
-        isset($params['thankyou_date']) ?
-          CRM_Utils_Date::format($params['thankyou_date']) :
-          NULL,
+      'cancel_date' => isset($params['cancel_date']) ? CRM_Utils_Date::format($params['cancel_date']) : NULL,
+      'thankyou_date' => isset($params['thankyou_date']) ? CRM_Utils_Date::format($params['thankyou_date']) : NULL,
       'campaign_id' => $campaignId,
       'is_test' => $isTest,
       'address_id' => $addressID,
index 4305fd3e85e23f7062474656a525c78ca673fe33..093c72bd5e3cf3cd320f19a974a1f41ff70d38c5 100644 (file)
@@ -49,12 +49,12 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address {
    *
    * @param null $entity
    *
-   * @return array
+   * @return array|NULL
    *   array of created address
    */
   public static function create(&$params, $fixAddress = TRUE, $entity = NULL) {
     if (!isset($params['address']) || !is_array($params['address'])) {
-      return;
+      return NULL;
     }
     CRM_Core_BAO_Block::sortPrimaryFirst($params['address']);
     $addresses = array();
@@ -1247,7 +1247,7 @@ SELECT is_primary,
    *
    * @param string $fieldName
    * @param string $context
-   *   @see CRM_Core_DAO::buildOptionsContext.
+   * @see CRM_Core_DAO::buildOptionsContext
    * @param array $props
    *   whatever is known about this dao object.
    *
index 2f5806ca5b37a94f7fc5592134128b73dd3c2af9..9e00a723930b7229e71aac4c7a4aef68805993cd 100644 (file)
@@ -1083,9 +1083,6 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
    *
    * @param object $field
    *   The field object.
-   *
-   * @return boolean
-   *
    */
   public static function deleteField($field) {
     CRM_Utils_System::flushCache();
@@ -1103,8 +1100,6 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
     $field->delete();
     CRM_Core_BAO_UFField::delUFField($field->id);
     CRM_Utils_Weight::correctDuplicateWeights('CRM_Core_DAO_CustomField');
-
-    return;
   }
 
   /**
@@ -1577,7 +1572,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
    * @param bool $includeViewOnly
    *   If true, fields marked 'View Only' are included. Required for APIv3.
    *
-   * @return array
+   * @return array|NULL
    *   formatted custom field array
    */
   public static function formatCustomField(
@@ -1620,7 +1615,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
 
     // return if field is a 'code' field
     if (!$includeViewOnly && !empty($customFields[$customFieldId]['is_view'])) {
-      return;
+      return NULL;
     }
 
     list($tableName, $columnName, $groupID) = self::getTableColumnGroup($customFieldId);
index 4c71e19ec38c3fc5a1778d4fa94c18291011df2c..c65935f198517b10f153f2605747b40e088a3a89 100644 (file)
@@ -241,7 +241,7 @@ class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup {
    *
    * @param int $id
    *   Id of the database record.
-   * @param bool $is_activeValue we want to set the is_active field.
+   * @param bool $is_active
    *   Value we want to set the is_active field.
    *
    * @return Object
@@ -796,8 +796,8 @@ ORDER BY civicrm_custom_group.weight,
               'name' => ts('Delete Attached File'),
               'url' => 'civicrm/file',
               'qs' => 'reset=1&id=%%id%%&eid=%%eid%%&fid=%%fid%%&action=delete',
-              'extra' => 'onclick = "if (confirm( \'' . $deleteExtra .
-                '\' ) ) this.href+=\'&amp;confirmed=1\'; else return false;"',
+              'extra' => 'onclick = "if (confirm( \'' . $deleteExtra
+              . '\' ) ) this.href+=\'&amp;confirmed=1\'; else return false;"',
             ),
           );
           $customValue['deleteURL'] = CRM_Core_Action::formLink($deleteURL,
@@ -1977,7 +1977,7 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1,
 
     //changed isset CRM-4601
     if (CRM_Utils_System::isNull($value)) {
-      return;
+      return NULL;
     }
 
     $htmlType = CRM_Utils_Array::value('html_type', $field);
@@ -2203,12 +2203,12 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1,
    * @param array $fieldIds
    *   Array of custom field ids.
    *
-   * @return array
+   * @return array|NULL
    *   array consisting of groups and fields labels with ids.
    */
   public static function getGroupTitles($fieldIds) {
     if (!is_array($fieldIds) && empty($fieldIds)) {
-      return;
+      return NULL;
     }
 
     $groupLabels = array();
@@ -2250,12 +2250,12 @@ SELECT  civicrm_custom_group.id as groupID, civicrm_custom_group.title as groupT
    * @param int $gID
    *   Custom group id.
    *
-   * @return boolean
+   * @return bool|NULL
    *   true if empty otherwise false.
    */
   public static function isGroupEmpty($gID) {
     if (!$gID) {
-      return;
+      return NULL;
     }
 
     $tableName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup',
index 0cacf3a42e71631685b2d322918002bf8307bec6..496b8cf21d44b3c79f4b44e27cdf0f1dc55c9d5d 100644 (file)
@@ -83,7 +83,7 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount {
    * Determine whether the given table/id
    * has discount associated with it
    *
-   * @param int $entityIdEntity id to be searched.
+   * @param int $entityId
    *   Entity id to be searched.
    * @param string $entityTable
    *   Entity table to be searched.
index 9aee8a8933c2bca8a0eb97b1d05e75ea16ccdf90..4f35d1ab3b26783393928f20ccc0505ef287b81f 100644 (file)
@@ -388,10 +388,11 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
    *
    * access        public
    *
-   * @return array
+   * @return array|NULL
    *   reference to the array of default values
    */
   public function setDefaultValues() {
+    return NULL;
   }
 
   /**
@@ -1276,20 +1277,23 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
 
   /**
    * Add date
-   * @param string $name
-   *   Name of the element.
-   * @param string $label
-   *   Label of the element.
-   * @param array $attributes
-   *   Key / value pair.
    *
+   * @code
    * // if you need time
    * $attributes = array(
    *   'addTime' => true,
    *   'formatType' => 'relative' or 'birth' etc check advanced date settings
    * );
+   * @endcode
+   *
+   * @param string $name
+   *   Name of the element.
+   * @param string $label
+   *   Label of the element.
    * @param bool $required
    *   True if required.
+   * @param array $attributes
+   *   Key / value pair.
    */
   public function addDate($name, $label, $required = FALSE, $attributes = NULL) {
     if (!empty($attributes['formatType'])) {
index 02d6be9972a0b628647e059e3a93ee50de7ebc1e..743b5baadbcf0af9fc84404abc04fcb1a84f54f8 100644 (file)
@@ -235,8 +235,8 @@ class CRM_Core_Form_RecurringEntity {
   /**
    * Global validation rules for the form
    *
-   * @param array $fields
-   *   Posted values of the form .
+   * @param array $values
+   *   Posted values of the form.
    *
    * @return array
    *   list of errors to be posted back to the form
index aaa911a2fb8c249f72c882a37701058ffcff6257..f0f04990092c7fbdebab845764bbc67d93b4819a 100644 (file)
@@ -792,7 +792,7 @@ LIMIT 1;";
    * it is unclear whether it is a function on the way in or on the way out
    *
    * @param array $params
-   * @return void|int
+   * @return void|NULL|int
    */
   public function updateContributionStatus(&$params) {
     // get minimum required values.
@@ -802,7 +802,7 @@ LIMIT 1;";
     $contributionId = CRM_Utils_Array::value('contribution_id', $params);
 
     if (!$contributionId || !$componentId || !$componentName || !$statusId) {
-      return;
+      return NULL;
     }
 
     $input = $ids = $objects = array();
index 7cf9e374d14c2ee0c09ab5416254c048d27358c0..91c3b2f6bddba76d8b0b6fc193e03692f8c21344 100644 (file)
@@ -129,7 +129,7 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
    * @param array $params
    *   Assoc array of input parameters for this transaction.
    *
-   * @return array
+   * @return array|NULL
    *   the result in an nice formatted array (or an error object)
    * @abstract
    */
index b18d5093121369f26ba7bad98ebd5e79d3ac0a85..04a51a80d709632f722fdd7bc9a0ef7ad22d8c26 100644 (file)
@@ -43,9 +43,8 @@ class CRM_Core_Report_Excel {
    * @param string $rows
    *   (reference ) result set rows.
    * @param null $titleHeader
-   * @param bool $printShould the output be printed.
+   * @param bool $print
    *   Should the output be printed.
-   *
    * @param bool $outputHeader
    *
    * @return mixed
index b23152ed0e61656ce96cd03691ba5ec4cf45f4b6..dea7d732286dfdc2cdcaa4e7e8b1bd10cabe1bd4 100644 (file)
  * @param CRM_Core_Smarty $smarty
  *   Reference to the smarty object.
  *
- * @return string
+ * @return string|NULL
  *   HTML code of a link to documentation
  */
 function smarty_function_docURL($params, &$smarty) {
   if (!isset($smarty)) {
-    return;
+    return NULL;
   }
   else {
     return CRM_Utils_System::docURL($params);
index 68dc0c7763683825af79572dcc576ab290a2d9b5..d070f3e939f10c1e58dc418bef5916f11e3e08d4 100644 (file)
@@ -46,7 +46,7 @@
  */
 function smarty_function_help($params, &$smarty) {
   if (!isset($params['id']) || !isset($smarty->_tpl_vars['config'])) {
-    return;
+    return NULL;
   }
 
   if (empty($params['file']) && isset($smarty->_tpl_vars['tplFile'])) {
index cf52f34403ff5bf1241fcd0616ed39f15f408470..8c6cd75059082ad56a591e5f824b31923fddbd7c 100644 (file)
  *
  */
 
-/*
  * Smarty plugin
  * Type: modifier
  * Name: substring
  * Version: 0.1
  * Date: 2006-16-02
  * Author: Thorsten Albrecht <thor_REMOVE.THIS_@wolke7.net>
  * Purpose: "substring" allows you to retrieve a small part (substring) of a string.
  * Notes: The substring is specified by giving the start  position and the length.
  * Unlike the original function substr() in PHP the position of the characters
  * in the string starts at 1 (not at 0 as usual in php).
  * Example smarty code:
  *   {$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
  * @return string
  *
  * -------------------------------------------------------------
  */
+/**
+ * Smarty plugin
+ * Type: modifier
+ * Name: substring
+ * Version: 0.1
+ * Date: 2006-16-02
+ * Author: Thorsten Albrecht <thor_REMOVE.THIS_@wolke7.net>
+ * Purpose: "substring" allows you to retrieve a small part (substring) of a string.
+ * Notes: The substring is specified by giving the start  position and the length.
+ * Unlike the original function substr() in PHP the position of the characters
+ * in the string starts at 1 (not at 0 as usual in php).
+ * Example smarty code:
+ *   {$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
+ * @return string
+ *
+ * -------------------------------------------------------------
+ */
 function smarty_modifier_substring($string, $position, $length) {
   return substr($string, $position, $length);
 }
index f1171b00636270bd230d59b054bc9dc1c5662db4..32a611db0b901008d223772e0928c5f0f2a8b9f4 100644 (file)
@@ -750,29 +750,32 @@ GROUP BY  participant.event_id
           'title' => 'Participant Note',
           'name' => 'participant_note',
           'type' => CRM_Utils_Type::T_STRING,
-        ));
+        ),
+      );
 
-        $participantStatus = array(
+      $participantStatus = array(
         'participant_status' => array(
           'title' => 'Participant Status',
           'name' => 'participant_status',
           'type' => CRM_Utils_Type::T_STRING,
-        ));
+        ),
+      );
 
-        $participantRole = array(
+      $participantRole = array(
         'participant_role' => array(
           'title' => 'Participant Role',
           'name' => 'participant_role',
           'type' => CRM_Utils_Type::T_STRING,
-        ));
+        ),
+      );
 
-        $discountFields = CRM_Core_DAO_Discount::export();
+      $discountFields = CRM_Core_DAO_Discount::export();
 
-        $fields = array_merge($participantFields, $participantStatus, $participantRole,  $eventFields, $noteField, $discountFields);
+      $fields = array_merge($participantFields, $participantStatus, $participantRole, $eventFields, $noteField, $discountFields);
 
-        // add custom data
-        $fields = array_merge($fields, CRM_Core_BAO_CustomField::getFieldsForImport('Participant'));
-        self::$_exportableFields = $fields;
+      // add custom data
+      $fields = array_merge($fields, CRM_Core_BAO_CustomField::getFieldsForImport('Participant'));
+      self::$_exportableFields = $fields;
     }
 
     return self::$_exportableFields;
@@ -915,11 +918,11 @@ WHERE  civicrm_participant.id = {$participantId}
   /**
    * Checks duplicate participants
    *
-   * @param array $duplicates
-   *   (reference ) an assoc array of name/value pairs.
    * @param array $input
    *   An assosiative array of name /value pairs.
    *   from other function
+   * @param array $duplicates
+   *   (reference ) an assoc array of name/value pairs.
    *
    * @return CRM_Contribute_BAO_Contribution
    */
@@ -1148,11 +1151,11 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_
    * @param int $newStatusID
    * @param bool $updatePrimaryStatus
    *
-   * @return bool|void
+   * @return bool|NULL
    */
   public static function updateParticipantStatus($participantID, $oldStatusID, $newStatusID = NULL, $updatePrimaryStatus = FALSE) {
     if (!$participantID || !$oldStatusID) {
-      return;
+      return NULL;
     }
 
     if (!$newStatusID) {
@@ -1223,14 +1226,14 @@ UPDATE  civicrm_participant
    * @param bool $returnResult
    * @param bool $skipCascadeRule
    *
-   * @return array
+   * @return array|NULL
    */
   public static function transitionParticipants(
     $participantIds, $toStatusId,
     $fromStatusId = NULL, $returnResult = FALSE, $skipCascadeRule = FALSE
   ) {
     if (!is_array($participantIds) || empty($participantIds) || !$toStatusId) {
-      return;
+      return NULL;
     }
 
     //thumb rule is if we triggering  primary participant need to triggered additional
@@ -2160,7 +2163,7 @@ WHERE (li.entity_table = 'civicrm_participant' AND li.entity_id = {$participantI
    *
    * @param string $fieldName
    * @param string $context
-   *   @see CRM_Core_DAO::buildOptionsContext.
+   * @see CRM_Core_DAO::buildOptionsContext
    * @param array $props
    *   whatever is known about this dao object.
    *
index d2dfd18beab2a084b98ac737850b7223789c5864..b307a84579140907582f926bdab92251891ea48d 100644 (file)
@@ -116,7 +116,7 @@ class CRM_Logging_Reverter {
         // DAO-based tables
 
         case in_array($table, array_keys($daos)):
-          $dao = new $daos[$table];
+          $dao = new $daos[$table]();
           foreach ($row as $id => $changes) {
             $dao->id = $id;
             foreach ($changes as $field => $value) {
index a1ef35516d1c367dad972859bfd96641c400ef81..f8e714d1ab6e541e644489f669cca468e455bb2c 100644 (file)
@@ -71,7 +71,6 @@ class CRM_Mailing_Form_Browse extends CRM_Core_Form {
    *
    * @return void
    */
-
   public function buildQuickForm() {
     $this->addButtons(array(
         array(
index e9badb2211ebfb58fdba1e468c42d278cf267e1d..e09cb847dfc81ab5fded705a97b320b39aae3061 100644 (file)
@@ -59,233 +59,233 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
       asort($this->activeCampaigns);
     }
     $this->_columns = array(
-        'civicrm_contact' => array(
-          'dao' => 'CRM_Contact_DAO_Contact',
-          'fields' => array(
-            'sort_name' => array(
-              'title' => ts('Donor Name'),
-              'required' => TRUE,
-            ),
-            'first_name' => array(
-              'title' => ts('First Name'),
-            ),
-            'last_name' => array(
-              'title' => ts('Last Name'),
-            ),
-            'id' => array(
-              'no_display' => 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('Donor Name'),
+            'required' => TRUE,
           ),
-          'filters' => array(
-            'sort_name' => array(
-              'title' => ts('Donor Name'),
-              'operator' => 'like',
-            ),
-            'id' => array(
-              'title' => ts('Contact ID'),
-              'no_display' => TRUE,
-              'type' => CRM_Utils_Type::T_INT,
-            ),
+          'first_name' => array(
+            'title' => ts('First Name'),
           ),
-          'order_bys' => array(
-            'sort_name' => array(
-              'title' => ts('Last Name, First Name'),
-              'default' => '1',
-              'default_weight' => '0',
-              'default_order' => 'ASC',
-            ),
+          'last_name' => array(
+            'title' => ts('Last Name'),
+          ),
+          'id' => array(
+            'no_display' => TRUE,
+            'required' => TRUE,
+          ),
+          'contact_type' => array(
+            'title' => ts('Contact Type'),
+          ),
+          'contact_sub_type' => array(
+            'title' => ts('Contact Subtype'),
           ),
-          'grouping' => 'contact-fields',
         ),
-        'civicrm_email' => array(
-          'dao' => 'CRM_Core_DAO_Email',
-          'fields' => array(
-            'email' => array(
-              'title' => ts('Donor Email'),
-              'default' => TRUE,
-            ),
+        'filters' => array(
+          'sort_name' => array(
+            'title' => ts('Donor Name'),
+            'operator' => 'like',
+          ),
+          'id' => array(
+            'title' => ts('Contact ID'),
+            'no_display' => TRUE,
+            'type' => CRM_Utils_Type::T_INT,
           ),
-          'grouping' => 'contact-fields',
         ),
-        'civicrm_phone' => array(
-          'dao' => 'CRM_Core_DAO_Phone',
-          'fields' => array(
-            'phone' => array(
-              'title' => ts('Donor Phone'),
-              'default' => TRUE,
-              'no_repeat' => TRUE,
-            ),
+        'order_bys' => array(
+          'sort_name' => array(
+            'title' => ts('Last Name, First Name'),
+            'default' => '1',
+            'default_weight' => '0',
+            'default_order' => 'ASC',
           ),
-          'grouping' => 'contact-fields',
         ),
-        'civicrm_contribution' => array(
-          'dao' => 'CRM_Contribute_DAO_Contribution',
-          'fields' => array(
-            'contribution_id' => array(
-              'name' => 'id',
-              'no_display' => TRUE,
-              'required' => TRUE,
-            ),
-            'list_contri_id' => array(
-              'name' => 'id',
-              'title' => ts('Contribution ID'),
-            ),
-            'financial_type_id' => array(
-              'title' => ts('Financial Type'),
-              'default' => TRUE,
-            ),
-            'contribution_status_id' => array(
-              'title' => ts('Contribution Status'),
-            ),
-            'contribution_page_id' => array(
-              'title' => ts('Contribution Page'),
-            ),
-            'source' => array(
-              'title' => ts('Source'),
-            ),
-            'payment_instrument_id' => array(
-              'title' => ts('Payment Type'),
-            ),
-            'check_number' => array(
-              'title' => ts('Check Number'),
-            ),
-            'currency' => array(
-              'required' => TRUE,
-              'no_display' => TRUE,
-            ),
-            'trxn_id' => NULL,
-            'receive_date' => array('default' => TRUE),
-            'receipt_date' => NULL,
-            'total_amount' => array(
-              'title' => ts('Amount'),
-              'required' => TRUE,
-              'statistics' => array('sum' => ts('Amount')),
-            ),
-            'fee_amount' => NULL,
-            'net_amount' => NULL,
-            'contribution_or_soft' => array(
-              'title' => ts('Contribution OR Soft Credit?'),
-              'dbAlias' => "'Contribution'",
-            ),
-            'soft_credits' => array(
-              'title' => ts('Soft Credits'),
-              'dbAlias' => "NULL",
-            ),
-            'soft_credit_for' => array(
-              'title' => ts('Soft Credit For'),
-              'dbAlias' => "NULL",
-            ),
+        'grouping' => 'contact-fields',
+      ),
+      'civicrm_email' => array(
+        'dao' => 'CRM_Core_DAO_Email',
+        'fields' => array(
+          'email' => array(
+            'title' => ts('Donor Email'),
+            'default' => TRUE,
           ),
-          'filters' => array(
-            'contribution_or_soft' => array(
-              'title' => ts('Contribution OR Soft Credit?'),
-              'clause' => "(1)",
-              'operatorType' => CRM_Report_Form::OP_SELECT,
-              'type' => CRM_Utils_Type::T_STRING,
-              'options' => array(
-                'both' => ts('Both'),
-                'contributions_only' => ts('Contributions Only'),
-                'soft_credits_only' => ts('Soft Credits Only'),
-              ),
-            ),
-            'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE),
-            '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,
-            ),
-            'financial_type_id' => array(
-              'title' => ts('Financial Type'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::financialType(),
-              'type' => CRM_Utils_Type::T_INT,
-            ),
-            'contribution_page_id' => array(
-              'title' => ts('Contribution Page'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::contributionPage(),
-              'type' => CRM_Utils_Type::T_INT,
-            ),
-            'payment_instrument_id' => array(
-              'title' => ts('Payment Type'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::paymentInstrument(),
-              'type' => CRM_Utils_Type::T_INT,
-            ),
-            'contribution_status_id' => array(
-              'title' => ts('Contribution Status'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
-              'default' => array(1),
-              'type' => CRM_Utils_Type::T_INT,
-            ),
-            'total_amount' => array('title' => ts('Contribution Amount')),
+        ),
+        'grouping' => 'contact-fields',
+      ),
+      'civicrm_phone' => array(
+        'dao' => 'CRM_Core_DAO_Phone',
+        'fields' => array(
+          'phone' => array(
+            'title' => ts('Donor Phone'),
+            'default' => TRUE,
+            'no_repeat' => TRUE,
+          ),
+        ),
+        'grouping' => 'contact-fields',
+      ),
+      'civicrm_contribution' => array(
+        'dao' => 'CRM_Contribute_DAO_Contribution',
+        'fields' => array(
+          'contribution_id' => array(
+            'name' => 'id',
+            'no_display' => TRUE,
+            'required' => TRUE,
+          ),
+          'list_contri_id' => array(
+            'name' => 'id',
+            'title' => ts('Contribution ID'),
+          ),
+          'financial_type_id' => array(
+            'title' => ts('Financial Type'),
+            'default' => TRUE,
+          ),
+          'contribution_status_id' => array(
+            'title' => ts('Contribution Status'),
+          ),
+          'contribution_page_id' => array(
+            'title' => ts('Contribution Page'),
+          ),
+          'source' => array(
+            'title' => ts('Source'),
+          ),
+          'payment_instrument_id' => array(
+            'title' => ts('Payment Type'),
+          ),
+          'check_number' => array(
+            'title' => ts('Check Number'),
+          ),
+          'currency' => array(
+            'required' => TRUE,
+            'no_display' => TRUE,
+          ),
+          'trxn_id' => NULL,
+          'receive_date' => array('default' => TRUE),
+          'receipt_date' => NULL,
+          'total_amount' => array(
+            'title' => ts('Amount'),
+            'required' => TRUE,
+            'statistics' => array('sum' => ts('Amount')),
           ),
-          'order_bys' => array(
-            'financial_type_id' => array('title' => ts('Financial Type')),
-            'contribution_status_id' => array('title' => ts('Contribution Status')),
-            'payment_instrument_id' => array('title' => ts('Payment Instrument')),
-            'receive_date' => array('title' => ts('Receive Date')),
+          'fee_amount' => NULL,
+          'net_amount' => NULL,
+          'contribution_or_soft' => array(
+            'title' => ts('Contribution OR Soft Credit?'),
+            'dbAlias' => "'Contribution'",
+          ),
+          'soft_credits' => array(
+            'title' => ts('Soft Credits'),
+            'dbAlias' => "NULL",
+          ),
+          'soft_credit_for' => array(
+            'title' => ts('Soft Credit For'),
+            'dbAlias' => "NULL",
           ),
-          'grouping' => 'contri-fields',
         ),
-        'civicrm_contribution_soft' => array(
-          'dao' => 'CRM_Contribute_DAO_ContributionSoft',
-          'fields' => array(
-            'soft_credit_type_id' => array('title' => ts('Soft Credit Type')),
-          ),
-          'filters' => array(
-            'soft_credit_type_id' => array(
-              'title' => 'Soft Credit Type',
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Core_OptionGroup::values('soft_credit_type'),
-              'default' => NULL,
-              'type' => CRM_Utils_Type::T_STRING,
+        'filters' => array(
+          'contribution_or_soft' => array(
+            'title' => ts('Contribution OR Soft Credit?'),
+            'clause' => "(1)",
+            'operatorType' => CRM_Report_Form::OP_SELECT,
+            'type' => CRM_Utils_Type::T_STRING,
+            'options' => array(
+              'both' => ts('Both'),
+              'contributions_only' => ts('Contributions Only'),
+              'soft_credits_only' => ts('Soft Credits Only'),
             ),
           ),
+          'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE),
+          '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,
+          ),
+          'financial_type_id' => array(
+            'title' => ts('Financial Type'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::financialType(),
+            'type' => CRM_Utils_Type::T_INT,
+          ),
+          'contribution_page_id' => array(
+            'title' => ts('Contribution Page'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::contributionPage(),
+            'type' => CRM_Utils_Type::T_INT,
+          ),
+          'payment_instrument_id' => array(
+            'title' => ts('Payment Type'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::paymentInstrument(),
+            'type' => CRM_Utils_Type::T_INT,
+          ),
+          'contribution_status_id' => array(
+            'title' => ts('Contribution Status'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+            'default' => array(1),
+            'type' => CRM_Utils_Type::T_INT,
+          ),
+          'total_amount' => array('title' => ts('Contribution Amount')),
         ),
-        'civicrm_contribution_ordinality' => array(
-          'dao' => 'CRM_Contribute_DAO_Contribution',
-          'alias' => 'cordinality',
-          'filters' => array(
-            'ordinality' => array(
-              'title' => ts('Contribution Ordinality'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => array(
-                0 => 'First by Contributor',
-                1 => 'Second or Later by Contributor',
-              ),
-              'type' => CRM_Utils_Type::T_INT,
-            ),
+        'order_bys' => array(
+          'financial_type_id' => array('title' => ts('Financial Type')),
+          'contribution_status_id' => array('title' => ts('Contribution Status')),
+          'payment_instrument_id' => array('title' => ts('Payment Instrument')),
+          'receive_date' => array('title' => ts('Receive Date')),
+        ),
+        'grouping' => 'contri-fields',
+      ),
+      'civicrm_contribution_soft' => array(
+        'dao' => 'CRM_Contribute_DAO_ContributionSoft',
+        'fields' => array(
+          'soft_credit_type_id' => array('title' => ts('Soft Credit Type')),
+        ),
+        'filters' => array(
+          'soft_credit_type_id' => array(
+            'title' => 'Soft Credit Type',
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Core_OptionGroup::values('soft_credit_type'),
+            'default' => NULL,
+            'type' => CRM_Utils_Type::T_STRING,
           ),
         ),
-        'civicrm_note' => array(
-          'dao' => 'CRM_Core_DAO_Note',
-          'fields' => array(
-            'contribution_note' => array(
-              'name' => 'note',
-              'title' => ts('Contribution Note'),
-            ),
+      ),
+      'civicrm_contribution_ordinality' => array(
+        'dao' => 'CRM_Contribute_DAO_Contribution',
+        'alias' => 'cordinality',
+        'filters' => array(
+          'ordinality' => array(
+            'title' => ts('Contribution Ordinality'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => array(
+              0 => 'First by Contributor',
+              1 => 'Second or Later by Contributor',
+            ),
+            'type' => CRM_Utils_Type::T_INT,
           ),
-          'filters' => array(
-            'note' => array(
-              'name' => 'note',
-              'title' => ts('Contribution Note'),
-              'operator' => 'like',
-              'type' => CRM_Utils_Type::T_STRING,
-            ),
+        ),
+      ),
+      'civicrm_note' => array(
+        'dao' => 'CRM_Core_DAO_Note',
+        'fields' => array(
+          'contribution_note' => array(
+            'name' => 'note',
+            'title' => ts('Contribution Note'),
+          ),
+        ),
+        'filters' => array(
+          'note' => array(
+            'name' => 'note',
+            'title' => ts('Contribution Note'),
+            'operator' => 'like',
+            'type' => CRM_Utils_Type::T_STRING,
           ),
         ),
-      ) + $this->addAddressFields(FALSE);
+      ),
+    ) + $this->addAddressFields(FALSE);
 
     $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
index 51cf41d266f39e6e35abe06099d7603a3ac13225..5361a4e22a6ae2d42a50d61c75e704eabf8bc9a9 100644 (file)
@@ -45,8 +45,6 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
 
   public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report');
 
-  /**
-   */
   /**
    */
   public function __construct() {
@@ -61,186 +59,186 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
     }
 
     $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,
-            ),
-            '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'),
+            '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,
+          ),
+          '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',
+        'group_bys' => array(
+          'id' => array('title' => ts('Contact ID')),
+          'sort_name' => array(
+            'title' => ts('Contact Name'),
           ),
-          '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',
         ),
-        'civicrm_financial_type' => array(
-          'dao' => 'CRM_Financial_DAO_FinancialType',
-          'fields' => array('financial_type' => NULL),
-          'grouping' => 'contri-fields',
-          'group_bys' => array(
-            'financial_type' => array('title' => ts('Financial Type')),
+        'grouping' => 'contact-fields',
+      ),
+      'civicrm_phone' => array(
+        'dao' => 'CRM_Core_DAO_Phone',
+        'fields' => array(
+          'phone' => array(
+            'title' => ts('Phone'),
+            'no_repeat' => TRUE,
           ),
         ),
-        'civicrm_contribution' => array(
-          'dao' => 'CRM_Contribute_DAO_Contribution',
+        'grouping' => 'contact-fields',
+      ),
+      'civicrm_financial_type' => array(
+        'dao' => 'CRM_Financial_DAO_FinancialType',
+        'fields' => array('financial_type' => NULL),
+        'grouping' => 'contri-fields',
+        'group_bys' => array(
+          'financial_type' => array('title' => ts('Financial Type')),
+        ),
+      ),
+      'civicrm_contribution' => array(
+        'dao' => 'CRM_Contribute_DAO_Contribution',
           //'bao'           => 'CRM_Contribute_BAO_Contribution',
-          'fields' => array(
-            'contribution_source' => array('title' => ts('Source')),
-            'currency' => array(
-              'required' => TRUE,
-              'no_display' => TRUE,
-            ),
-            'total_amount' => array(
-              'title' => ts('Contribution Amount Stats'),
-              'default' => TRUE,
-              'statistics' => array(
-                'sum' => ts('Contribution Aggregate'),
-                'count' => ts('Contributions'),
-                'avg' => ts('Contribution Avg'),
-              ),
-            ),
+        'fields' => array(
+          'contribution_source' => array('title' => ts('Source')),
+          'currency' => array(
+            'required' => TRUE,
+            'no_display' => TRUE,
           ),
-          'grouping' => 'contri-fields',
-          'filters' => array(
-            '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),
-              'type' => CRM_Utils_Type::T_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,
-            ),
-            'financial_type_id' => array(
-              'title' => ts('Financial Type'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::financialType(),
-              'type' => CRM_Utils_Type::T_INT,
-            ),
-            'contribution_page_id' => array(
-              'title' => ts('Contribution Page'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::contributionPage(),
-              'type' => CRM_Utils_Type::T_INT,
-            ),
-            'total_amount' => array(
-              'title' => ts('Contribution Amount'),
-            ),
-            'total_sum' => array(
-              'title' => ts('Contribution Aggregate'),
-              'type' => CRM_Report_Form::OP_INT,
-              'dbAlias' => 'civicrm_contribution_total_amount_sum',
-              'having' => TRUE,
-            ),
-            'total_count' => array(
-              'title' => ts('Contribution Count'),
-              'type' => CRM_Report_Form::OP_INT,
-              'dbAlias' => 'civicrm_contribution_total_amount_count',
-              'having' => TRUE,
-            ),
-            'total_avg' => array(
-              'title' => ts('Contribution Avg'),
-              'type' => CRM_Report_Form::OP_INT,
-              'dbAlias' => 'civicrm_contribution_total_amount_avg',
-              'having' => TRUE,
+          'total_amount' => array(
+            'title' => ts('Contribution Amount Stats'),
+            'default' => TRUE,
+            'statistics' => array(
+              'sum' => ts('Contribution Aggregate'),
+              'count' => ts('Contributions'),
+              'avg' => ts('Contribution Avg'),
             ),
           ),
-          'group_bys' => array(
-            'receive_date' => array(
-              'frequency' => TRUE,
-              'default' => TRUE,
-              'chart' => TRUE,
-            ),
-            'contribution_source' => NULL,
+        ),
+        'grouping' => 'contri-fields',
+        'filters' => array(
+          '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),
+            'type' => CRM_Utils_Type::T_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,
+          ),
+          'financial_type_id' => array(
+            'title' => ts('Financial Type'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::financialType(),
+            'type' => CRM_Utils_Type::T_INT,
+          ),
+          'contribution_page_id' => array(
+            'title' => ts('Contribution Page'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::contributionPage(),
+            'type' => CRM_Utils_Type::T_INT,
+          ),
+          'total_amount' => array(
+            'title' => ts('Contribution Amount'),
+          ),
+          'total_sum' => array(
+            'title' => ts('Contribution Aggregate'),
+            'type' => CRM_Report_Form::OP_INT,
+            'dbAlias' => 'civicrm_contribution_total_amount_sum',
+            'having' => TRUE,
+          ),
+          'total_count' => array(
+            'title' => ts('Contribution Count'),
+            'type' => CRM_Report_Form::OP_INT,
+            'dbAlias' => 'civicrm_contribution_total_amount_count',
+            'having' => TRUE,
+          ),
+          'total_avg' => array(
+            'title' => ts('Contribution Avg'),
+            'type' => CRM_Report_Form::OP_INT,
+            'dbAlias' => 'civicrm_contribution_total_amount_avg',
+            'having' => TRUE,
           ),
         ),
-        'civicrm_contribution_soft' => array(
-          'dao' => 'CRM_Contribute_DAO_ContributionSoft',
-          'fields' => array(
-            'soft_amount' => array(
-              'title' => ts('Soft Credit Amount Stats'),
-              'name' => 'amount',
-              'statistics' => array(
-                'sum' => ts('Soft Credit Aggregate'),
-                'count' => ts('Soft Credits'),
-                'avg' => ts('Soft Credit Avg'),
-              ),
-            ),
+        'group_bys' => array(
+          'receive_date' => array(
+            'frequency' => TRUE,
+            'default' => TRUE,
+            'chart' => TRUE,
           ),
-          'grouping' => 'contri-fields',
-          'filters' => array(
-            'amount' => array(
-              'title' => ts('Soft Credit Amount'),
-            ),
-            'soft_credit_type_id' => array(
-              'title' => 'Soft Credit Type',
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Core_OptionGroup::values('soft_credit_type'),
-              'default' => NULL,
-              'type' => CRM_Utils_Type::T_STRING,
-            ),
-            'soft_sum' => array(
-              'title' => ts('Soft Credit Aggregate'),
-              'type' => CRM_Report_Form::OP_INT,
-              'dbAlias' => 'civicrm_contribution_soft_soft_amount_sum',
-              'having' => TRUE,
-            ),
-            'soft_count' => array(
-              'title' => ts('Soft Credits Count'),
-              'type' => CRM_Report_Form::OP_INT,
-              'dbAlias' => 'civicrm_contribution_soft_soft_amount_count',
-              'having' => TRUE,
-            ),
-            'soft_avg' => array(
-              'title' => ts('Soft Credit Avg'),
-              'type' => CRM_Report_Form::OP_INT,
-              'dbAlias' => 'civicrm_contribution_soft_soft_amount_avg',
-              'having' => TRUE,
+          'contribution_source' => NULL,
+        ),
+      ),
+      'civicrm_contribution_soft' => array(
+        'dao' => 'CRM_Contribute_DAO_ContributionSoft',
+        'fields' => array(
+          'soft_amount' => array(
+            'title' => ts('Soft Credit Amount Stats'),
+            'name' => 'amount',
+            'statistics' => array(
+              'sum' => ts('Soft Credit Aggregate'),
+              'count' => ts('Soft Credits'),
+              'avg' => ts('Soft Credit Avg'),
             ),
           ),
         ),
-      ) + $this->addAddressFields();
+        'grouping' => 'contri-fields',
+        'filters' => array(
+          'amount' => array(
+            'title' => ts('Soft Credit Amount'),
+          ),
+          'soft_credit_type_id' => array(
+            'title' => 'Soft Credit Type',
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Core_OptionGroup::values('soft_credit_type'),
+            'default' => NULL,
+            'type' => CRM_Utils_Type::T_STRING,
+          ),
+          'soft_sum' => array(
+            'title' => ts('Soft Credit Aggregate'),
+            'type' => CRM_Report_Form::OP_INT,
+            'dbAlias' => 'civicrm_contribution_soft_soft_amount_sum',
+            'having' => TRUE,
+          ),
+          'soft_count' => array(
+            'title' => ts('Soft Credits Count'),
+            'type' => CRM_Report_Form::OP_INT,
+            'dbAlias' => 'civicrm_contribution_soft_soft_amount_count',
+            'having' => TRUE,
+          ),
+          'soft_avg' => array(
+            'title' => ts('Soft Credit Avg'),
+            'type' => CRM_Report_Form::OP_INT,
+            'dbAlias' => 'civicrm_contribution_soft_soft_amount_avg',
+            'having' => TRUE,
+          ),
+        ),
+      ),
+    ) + $this->addAddressFields();
 
     // If we have a campaign, build out the relevant elements
     if ($campaignEnabled && !empty($this->activeCampaigns)) {
index 196f63c9448a2c8e96f30460df3ba91b581bb52e..78d937834c56f1ca7faeb62bfdc3ba4191c5f824 100644 (file)
@@ -63,101 +63,101 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
     }
 
     $this->_columns = array(
-        'civicrm_contact' => array(
-          'dao' => 'CRM_Contact_DAO_Contact',
-          'grouping' => 'contact-field',
-          'fields' => array(
-            'sort_name' => array(
-              'title' => ts('Donor Name'),
-              'required' => TRUE,
-            ),
-            'first_name' => array(
-              'title' => ts('First Name'),
-            ),
-            'last_name' => array(
-              'title' => ts('Last Name'),
-            ),
-            'contact_type' => array(
-              'title' => ts('Contact Type'),
-            ),
-            'contact_sub_type' => array(
-              'title' => ts('Contact Subtype'),
-            ),
+      'civicrm_contact' => array(
+        'dao' => 'CRM_Contact_DAO_Contact',
+        'grouping' => 'contact-field',
+        'fields' => array(
+          'sort_name' => array(
+            'title' => ts('Donor Name'),
+            'required' => TRUE,
           ),
-          'filters' => array(
-            'sort_name' => array(
-              'title' => ts('Donor Name'),
-              'operator' => 'like',
-            ),
+          'first_name' => array(
+            'title' => ts('First Name'),
+          ),
+          'last_name' => array(
+            'title' => ts('Last Name'),
+          ),
+          'contact_type' => array(
+            'title' => ts('Contact Type'),
+          ),
+          'contact_sub_type' => array(
+            'title' => ts('Contact Subtype'),
           ),
         ),
-        'civicrm_email' => array(
-          'dao' => 'CRM_Core_DAO_Email',
-          'grouping' => 'contact-field',
-          'fields' => array(
-            'email' => array(
-              'title' => ts('Email'),
-              'default' => TRUE,
-            ),
+        'filters' => array(
+          'sort_name' => array(
+            'title' => ts('Donor Name'),
+            'operator' => 'like',
           ),
         ),
-        'civicrm_phone' => array(
-          'dao' => 'CRM_Core_DAO_Phone',
-          'grouping' => 'contact-field',
-          'fields' => array(
-            'phone' => array(
-              'title' => ts('Phone'),
-              'default' => TRUE,
-            ),
+      ),
+      'civicrm_email' => array(
+        'dao' => 'CRM_Core_DAO_Email',
+        'grouping' => 'contact-field',
+        'fields' => array(
+          'email' => array(
+            'title' => ts('Email'),
+            'default' => TRUE,
           ),
         ),
-      )
-      + $this->addAddressFields()
-      + array(
-        'civicrm_contribution' => array(
-          'dao' => 'CRM_Contribute_DAO_Contribution',
-          'fields' => array(
-            'contact_id' => array(
-              'title' => ts('contactId'),
-              'no_display' => TRUE,
-              'required' => TRUE,
-              'no_repeat' => TRUE,
-            ),
-            'total_amount' => array(
-              'title' => ts('Total Amount'),
-              'no_display' => TRUE,
-              'required' => TRUE,
-              'no_repeat' => TRUE,
-            ),
-            'receive_date' => array(
-              'title' => ts('Year'),
-              'no_display' => TRUE,
-              'required' => TRUE,
-              'no_repeat' => TRUE,
-            ),
+      ),
+      'civicrm_phone' => array(
+        'dao' => 'CRM_Core_DAO_Phone',
+        'grouping' => 'contact-field',
+        'fields' => array(
+          'phone' => array(
+            'title' => ts('Phone'),
+            'default' => TRUE,
+          ),
+        ),
+      ),
+    );
+    $this->_columns += $this->addAddressFields();
+    $this->_columns += array(
+      'civicrm_contribution' => array(
+        'dao' => 'CRM_Contribute_DAO_Contribution',
+        'fields' => array(
+          'contact_id' => array(
+            'title' => ts('contactId'),
+            'no_display' => TRUE,
+            'required' => TRUE,
+            'no_repeat' => TRUE,
+          ),
+          'total_amount' => array(
+            'title' => ts('Total Amount'),
+            'no_display' => TRUE,
+            'required' => TRUE,
+            'no_repeat' => TRUE,
           ),
-          'filters' => array(
-            'yid' => array(
-              'name' => 'receive_date',
-              'title' => ts('This Year'),
-              'operatorType' => CRM_Report_Form::OP_SELECT,
-              'options' => $optionYear,
-              'default' => date('Y'),
-            ),
-            'financial_type_id' => array(
-              'title' => ts('Financial Type'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::financialType(),
-            ),
-            'contribution_status_id' => array(
-              'title' => ts('Contribution Status'),
-              'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-              'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
-              'default' => array('1'),
-            ),
+          'receive_date' => array(
+            'title' => ts('Year'),
+            'no_display' => TRUE,
+            'required' => TRUE,
+            'no_repeat' => TRUE,
           ),
         ),
-      );
+        'filters' => array(
+          'yid' => array(
+            'name' => 'receive_date',
+            'title' => ts('This Year'),
+            'operatorType' => CRM_Report_Form::OP_SELECT,
+            'options' => $optionYear,
+            'default' => date('Y'),
+          ),
+          'financial_type_id' => array(
+            'title' => ts('Financial Type'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::financialType(),
+          ),
+          'contribution_status_id' => array(
+            'title' => ts('Contribution Status'),
+            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+            'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+            'default' => array('1'),
+          ),
+        ),
+      ),
+    );
 
     // If we have a campaign, build out the relevant elements
     if ($campaignEnabled && !empty($this->activeCampaigns)) {
index 8395807cc373288b8304be3c533ba0e652fe21af..968bdf57e6e4f776aa80d7ce4b6536c9ceb781ca 100644 (file)
@@ -615,18 +615,14 @@ class CRM_UF_Form_Field extends CRM_Core_Form {
   /**
    * Validation rule for subtype.
    *
-   * @param array $groupType
-   *   Contains all groupTypes.
-   *
    * @param string $fieldType
    *   Type of field.
-   *
+   * @param array $groupType
+   *   Contains all groupTypes.
    * @param array $errors
-   *
-   * @return array
-   *   list of errors to be posted back to the form
+   *   List of errors to be posted back to the form.
    */
-  public static function formRuleSubType($fieldType, $groupType, $errors) {
+  public static function formRuleSubType($fieldType, $groupType, &$errors) {
     if (in_array($fieldType, array(
       'Participant',
       'Contribution',
index c7a240478d7b86c7ae4a53d438ef6e7fc041e36a..ea0a28164ef8c5c63594098e92ea6034525d1fe0 100644 (file)
@@ -110,7 +110,8 @@ class CRM_Utils_Cache_APCcache {
 
     foreach ($keys as $key) {
       $name = $key['info'];
-      if ($prefix == substr($name, 0, $lp)) {  // Ours?
+      if ($prefix == substr($name, 0, $lp)) { 
+        // Ours?
         apc_delete($this->_prefix . $name);
       }
     }
index 976c5bd46e9b75ceefbc188cc4f1040b648fad7a..77d36873b6df0dbd50ada2a61e96b5135c9cc515 100644 (file)
@@ -303,7 +303,7 @@ class CRM_Utils_Weight {
 
     require_once str_replace('_', DIRECTORY_SEPARATOR, $daoName) . ".php";
 
-    $dao = new $daoName;
+    $dao = new $daoName();
     $table = $dao->getTablename();
     $fields = &$dao->fields();
     $fieldlist = array_keys($fields);
index ed59163a7bbd53f3ba7f3bcd724e9f52efa343a8..5e379c7e540e9ac6bad0aae128454d280731b4ff 100644 (file)
@@ -183,12 +183,12 @@ function _civicrm_api3_constant_get_spec(&$params) {
     'worldRegion',
     'wysiwygEditor',
   );
-  $params = (array(
-  'name' => array(
+  $params = array(
+    'name' => array(
       'title' => 'Constant Name',
       'name' => 'name',
       'api.required' => 1,
-        'options' => array_combine($options, $options),
-      ))
+      'options' => array_combine($options, $options),
+    ),
   );
 }
index 459f0c240422ad7b7a9d0041fa3047b3a457cc4f..08b69df2d1f071d1f84d04fe9ae49ad386ed68e8 100644 (file)
@@ -88,7 +88,6 @@ function civicrm_api3_contribution_recur_get($params) {
  * @return boolean
  *   returns true is successfully cancelled
  */
-
 function civicrm_api3_contribution_recur_cancel($params) {
   civicrm_api3_verify_one_mandatory($params, NULL, array('id'));
   return CRM_Contribute_BAO_ContributionRecur::cancelRecurContribution($params['id'], CRM_Core_DAO::$_nullObject) ? civicrm_api3_create_success() : civicrm_api3_create_error(ts('Error while cancelling recurring contribution'));
index 464ac2a238f876e08e7be906a1a1f06ab28d0821..1c69b36c72ec979c3f45b10eee3baaa31a1a0228 100644 (file)
@@ -84,6 +84,9 @@ class CRM_Core_ResourcesTest extends CiviUnitTestCase {
    * }
    */
 
+  /**
+   * Ensure that adding a script URL creates expected markup.
+   */
   public function testAddScriptURL() {
     $this->res
       ->addScriptUrl('/whiz/foo%20bar.js', 0, 'testAddScriptURL')
index d034eead1f35d3ec9b47a6e697730ca5d8a82b5a..5dd047fc1627e30a5a39706cfb02b720d7767478 100644 (file)
@@ -378,7 +378,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("$name has been created."));
   }
 
-  /*
+  /**
    * Webtest for CRM-12148
    */
   public function testSearchBuilderfinancialType() {
@@ -433,7 +433,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent('6 Contacts'), 'Missing text: ' . '6 Contacts');
   }
 
-  /*
+  /**
    * Webtest for CRM-12588
    */
   public function testSearchBuilderMembershipType() {
index bb21ceeb5cb51341ad9425e6893daa20e8f90344..6ce910e49005da133e5e29f4df5b2d7b412cf458 100644 (file)
@@ -262,6 +262,10 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   }
 
   ///////////////// civicrm_contribution_
+
+  /**
+   * Create an contribution_id=FALSE and financial_type_id=Donation.
+   */
   public function testCreateEmptyContributionIDUseDonation() {
     $params = array(
       'contribution_id' => FALSE,
@@ -342,11 +346,10 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->assertEquals(0, $lineItems['count']);
   }
 
-  /*
+  /**
    * Test checks that passing in line items suppresses the create mechanism
    */
   public function testCreateContributionChainedLineItems() {
-
     $params = array(
       'contact_id' => $this->_individualId,
       'receive_date' => '20120511',
@@ -717,7 +720,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->contributionDelete($contributionId);
   }
 
-  /*
+  /**
    * Function tests that additional financial records are created when fee amount is recorded
    */
   public function testCreateContributionWithFee() {
@@ -856,7 +859,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->_checkFinancialRecords($contribution, 'payLater');
   }
 
-  /*
+  /**
    * Function tests that additional financial records are created when online contribution with pending option
    * is created
    */
@@ -901,7 +904,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->assertEquals('Check', $contribution['payment_instrument']);
   }
 
-  /*
+  /**
    * Function tests that line items, financial records are updated when contribution amount is changed
    */
   public function testCreateUpdateContributionChangeTotal() {
@@ -940,7 +943,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->assertEquals('125.00', $fitemAmount);
   }
 
-  /*
+  /**
    * Function tests that line items, financial records are updated when pay later contribution is received
    */
   public function testCreateUpdateContributionPayLater() {
@@ -968,7 +971,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->_checkFinancialTrxn($contribution, 'payLater');
   }
 
-  /*
+  /**
    * Function tests that financial records are updated when Payment Instrument is changed
    */
   public function testCreateUpdateContributionPaymentInstrument() {
@@ -993,7 +996,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->_checkFinancialTrxn($contribution, 'paymentInstrument', $instrumentId);
   }
 
-  /*
+  /**
    * Function tests that financial records are added when Contribution is Refunded
    */
   public function testCreateUpdateContributionRefund() {
@@ -1018,7 +1021,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->_checkFinancialItem($contribution['id'], 'refund');
   }
 
-  /*
+  /**
    * Function tests invalid contribution status change
    */
   public function testCreateUpdateContributionInValidStatusChange() {
@@ -1040,7 +1043,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
 
   }
 
-  /*
+  /**
    * Function tests that financial records are added when Pending Contribution is Canceled
    */
   public function testCreateUpdateContributionCancelPending() {
@@ -1065,7 +1068,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->_checkFinancialItem($contribution['id'], 'cancelPending');
   }
 
-  /*
+  /**
    * Function tests that financial records are added when Financial Type is Changed
    */
   public function testCreateUpdateContributionChangeFinancialType() {
@@ -1101,8 +1104,11 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     ));
     $this->assertEquals(2, $contribution['contribution_status_id']);
   }
-  //To Update Contribution
-  //CHANGE: we require the API to do an incremental update
+
+  /**
+   * To Update Contribution
+   * CHANGE: we require the API to do an incremental update
+   */
   public function testCreateUpdateContribution() {
 
     $contributionID = $this->contributionCreate($this->_individualId, $this->_financialTypeId, 'idofsh', 212355);
@@ -1171,6 +1177,10 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   }
 
   ///////////////// civicrm_contribution_delete methods
+
+  /**
+   * Attempt (but fail) to delete a contribution without parameters.
+   */
   public function testDeleteEmptyParamsContribution() {
     $params = array();
     $this->callAPIFailure('contribution', 'delete', $params);
index cc78516e208ae699c8033aaaa4c1cb99a1279815..3015a068e068b3eee1d356ac64954e25622d24b8 100644 (file)
@@ -143,11 +143,10 @@ class api_v3_DomainTest extends CiviUnitTestCase {
   }
 
   ///////////////// civicrm_domain_create methods
-  /*
+
+  /**
    * This test checks for a memory leak observed when doing 2 gets on current domain
    */
-
-
   public function testGetCurrentDomainTwice() {
     $domain = $this->callAPISuccess('domain', 'getvalue', array(
       'current_domain' => 1,
index e03e3d4dee892d165cd5a42934d9ac1b7dc2a5c1..3149530ef98228afdcf23ee68e797058e0bf6de4 100644 (file)
@@ -133,6 +133,10 @@ class api_v3_MembershipStatusTest extends CiviUnitTestCase {
 
 
   ///////////////// civicrm_membership_status_delete methods
+
+  /**
+   * Attempt (and fail) to delete membership status without an parameters.
+   */
   public function testDeleteEmptyParams() {
     $result = $this->callAPIFailure('membership_status', 'delete', array());
   }
index fa549353d182f87aa37de66d822aca7ba0527b61..a56149017b23f21026673b83c9547d7ccab55bc2 100644 (file)
@@ -932,10 +932,10 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
 
     // create entities
     $baoObj1 = CRM_Core_DAO::createTestObject($baoString, array('currency' => 'USD'));
-    $this->assertTrue(is_integer($baoObj1->id), 'check first id');
+    $this->assertTrue(is_int($baoObj1->id), 'check first id');
     $this->deletableTestObjects[$baoString][] = $baoObj1->id;
     $baoObj2 = CRM_Core_DAO::createTestObject($baoString, array('currency' => 'USD'));
-    $this->assertTrue(is_integer($baoObj2->id), 'check second id');
+    $this->assertTrue(is_int($baoObj2->id), 'check second id');
     $this->deletableTestObjects[$baoString][] = $baoObj2->id;
 
     // fetch first by ID
@@ -984,7 +984,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
     }
   }
 
-  /** testing the _create **/
+  /* ---- testing the _create ---- */
 
   /**
    * @dataProvider toBeSkipped_create
@@ -1407,7 +1407,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
     while ($i < $count) {
       // create entities
       $baoObj = CRM_Core_DAO::createTestObject($baoString, array('currency' => 'USD'));
-      $this->assertTrue(is_integer($baoObj->id), 'check first id');
+      $this->assertTrue(is_int($baoObj->id), 'check first id');
       $this->deletableTestObjects[$baoString][] = $baoObj->id;
       $baos[] = $baoObj;
       $i++;