INFRA-132 - Batch 14 (g)
authorTim Otten <totten@civicrm.org>
Thu, 15 Jan 2015 02:59:26 +0000 (18:59 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 15 Jan 2015 02:59:26 +0000 (18:59 -0800)
48 files changed:
CRM/Activity/Form/Task/AddToTag.php
CRM/Contact/BAO/Contact/Utils.php
CRM/Contact/Form/Edit/TagsAndGroups.php
CRM/Contact/Form/Task/Delete.php
CRM/Contact/Form/Task/HookSample.php
CRM/Contact/Import/Form/Summary.php
CRM/Contact/Import/Parser.php
CRM/Contribute/BAO/Contribution/Utils.php
CRM/Core/BAO/File.php
CRM/Core/BAO/OptionGroup.php
CRM/Core/BAO/PrevNextCache.php
CRM/Extension/Downloader.php
CRM/Extension/Manager.php
CRM/Financial/BAO/PaymentProcessorType.php
CRM/Financial/Form/FinancialAccount.php
CRM/Group/Form/Edit.php
CRM/Logging/ReportSummary.php
CRM/Logging/Schema.php
CRM/Mailing/Event/BAO/Unsubscribe.php
CRM/Member/Page/Tab.php
CRM/PCP/Form/PCP.php
CRM/Pledge/Form/Pledge.php
CRM/Price/Form/Field.php
CRM/Report/Form/Contact/Detail.php
CRM/Report/Form/Contribute/Lybunt.php
CRM/Report/Form/Contribute/TopDonor.php
CRM/Report/Form/Event/ParticipantListing.php
CRM/Report/Page/InstanceList.php
CRM/UF/Page/Field.php
CRM/Upgrade/Form.php
CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php
CRM/Utils/API/HTMLInputCoder.php
CRM/Utils/File.php
CRM/Utils/Hook/Joomla.php
CRM/Utils/Mail.php
CRM/Utils/Mail/EmailProcessor.php
CRM/Utils/System/Drupal6.php
api/v3/CustomGroup.php
api/v3/MessageTemplate.php
api/v3/PledgePayment.php
install/template.css
tests/phpunit/CRM/Group/Page/AjaxTest.php
tests/phpunit/CRM/Member/BAO/MembershipTest.php
tests/phpunit/CRM/Pledge/AllTests.php
tests/phpunit/WebTest/Case/CaseCustomFieldsTest.php
tests/phpunit/WebTest/Release/ReleaseTestCase.php
tests/phpunit/api/v3/CustomFieldTest.php
tests/phpunit/api/v3/ProductTest.php

index b7d825aac1ccc35ec679c26ee2d24bcffa6ccbb6..6fc196e5fcd05921f6ba5be769965e08b0b8aff9 100644 (file)
@@ -148,9 +148,9 @@ class CRM_Activity_Form_Task_AddToTag extends CRM_Activity_Form_Task {
       $status = array(ts('%count activities tagged', array('count' => $added, 'plural' => '%count activities tagged')));
       if ($notAdded) {
         $status[] = ts('%count activities already had this tag', array(
-            'count' => $notAdded,
-            'plural' => '%count activities already had this tag'
-          ));
+          'count' => $notAdded,
+          'plural' => '%count activities already had this tag',
+        ));
       }
       $status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
       CRM_Core_Session::setStatus($status, ts("Added Tag <em>%1</em>", array(1 => $this->_tags[$key])), 'success', array('expires' => 0));
index 0fc398c8c09151998626d28fffc2abc501e68519..7c9a4b8742b21dc402a1030cb98f22df08f57deb 100644 (file)
@@ -222,7 +222,7 @@ WHERE  id IN ( $idString )
    * @param string $inputCheck
    *   Checksum to match against.
    *
-   * @return boolean
+   * @return bool
    *   true if valid, else false
    */
   public static function validChecksum($contactID, $inputCheck) {
@@ -329,10 +329,8 @@ UNION
         'relationship_type_id' => $relTypeId . '_a_b',
         'contact_check' => array($organization => TRUE),
       );
-      list($valid, $invalid, $duplicate,
-        $saved, $relationshipIds
-        ) = CRM_Contact_BAO_Relationship::createMultiple($relationshipParams, $cid);
-
+      list($valid, $invalid, $duplicate, $saved, $relationshipIds)
+        = CRM_Contact_BAO_Relationship::createMultiple($relationshipParams, $cid);
 
       // In case we change employer, clean previous employer related records.
       if (!$previousEmployerID && !$newContact) {
@@ -606,7 +604,7 @@ UPDATE civicrm_contact
       // check permission on acl basis.
       if (in_array($task, array(
         'view',
-        'edit'
+        'edit',
       ))) {
         $aclPermission = CRM_Core_Permission::VIEW;
         if ($task == 'edit') {
@@ -724,7 +722,7 @@ LEFT JOIN  civicrm_email ce ON ( ce.contact_id=c.id AND ce.is_primary = 1 )
     foreach ($returnProperties as $property => $ignore) {
       $value = (in_array($property, array(
         'city',
-        'street_address'
+        'street_address',
       ))) ? 'address' : $property;
       switch ($property) {
         case 'sort_name':
@@ -1079,13 +1077,16 @@ WHERE id IN (" . implode(',', $contactIds) . ")";
    * @param string $greetingType
    *   Greeting type.
    *
-   * @return int
-   *   or null
+   * @return int|NULL
    */
   public static function defaultGreeting($contactType, $greetingType) {
-    $contactTypeFilters = array('Individual' => 1, 'Household' => 2, 'Organization' => 3);
+    $contactTypeFilters = array(
+      'Individual' => 1,
+      'Household' => 2,
+      'Organization' => 3,
+    );
     if (!isset($contactTypeFilters[$contactType])) {
-      return;
+      return NULL;
     }
     $filter = $contactTypeFilters[$contactType];
 
index 65979724a970695d741a8b6b23f587978146158c..de0b5d3e939d7d4637f0974af7c22c7c4359e1ec 100644 (file)
@@ -64,7 +64,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
    * @param string $groupElementType
    *
    */
-  static function buildQuickForm(
+  public static function buildQuickForm(
     &$form,
     $contactId = 0,
     $type = self::ALL,
index 61a4bb795c90c39d9d0594399882edab0d21c311..0bde6dccdbecbcfc22e73fc662c8687f3f145e64 100644 (file)
@@ -128,14 +128,14 @@ class CRM_Contact_Form_Task_Delete extends CRM_Contact_Form_Task {
           // more than one contact deleted
           $message = ts('One of the selected contacts has an address record that is shared with 1 other contact.', array(
               'plural' => 'One or more selected contacts have address records which are shared with %count other contacts.',
-              'count' => $sharedAddressCount
+              'count' => $sharedAddressCount,
             ));
         }
         else {
           // only one contact deleted
           $message = ts('This contact has an address record which is shared with 1 other contact.', array(
               'plural' => 'This contact has an address record which is shared with %count other contacts.',
-              'count' => $sharedAddressCount
+              'count' => $sharedAddressCount,
             ));
         }
         CRM_Core_Session::setStatus($message . ' ' . ts('Shared addresses will not be removed or altered but will no longer be shared.'), ts('Shared Addesses Owner'));
@@ -258,21 +258,21 @@ class CRM_Contact_Form_Task_Delete extends CRM_Contact_Form_Task {
         $status = ts('%1 has been restored from the trash.', array(
             1 => $name,
             'plural' => '%count contacts restored from trash.',
-            'count' => $deleted
+            'count' => $deleted,
           ));
       }
       elseif ($this->_skipUndelete) {
         $status = ts('%1 has been permanently deleted.', array(
             1 => $name,
             'plural' => '%count contacts permanently deleted.',
-            'count' => $deleted
+            'count' => $deleted,
           ));
       }
       else {
         $status = ts('%1 has been moved to the trash.', array(
             1 => $name,
             'plural' => '%count contacts moved to trash.',
-            'count' => $deleted
+            'count' => $deleted,
           ));
       }
       $session->setStatus($status, $title, 'success');
index 7cd440096ae8807cb4c19586e28056643c4f85c0..0f0763044755988c4e00e9cdabfc55c2fb9bcedd 100644 (file)
@@ -57,7 +57,6 @@ WHERE  e.contact_id = c.id
 AND    e.is_primary = 1
 AND    c.id IN ( $contactIDs )";
 
-
     $rows = array();
     $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
index 4522a0e363f31d49af3e98a55f284e7d2bd65d72..d46087cc38c4d9fafb50c9a8bf7dfe61c96663e5 100644 (file)
@@ -113,7 +113,7 @@ class CRM_Contact_Import_Form_Summary extends CRM_Import_Form_Summary {
       'groupAdditions',
       'tagAdditions',
       'unMatchCount',
-      'unparsedAddressCount'
+      'unparsedAddressCount',
     );
     foreach ($properties as $property) {
       $this->assign($property, $this->get($property));
index fddfc8f8bbd211ede749e412253387a14ab04624..81ac494bb58ddfd0fb836b5a8f4598ea3081783f 100644 (file)
@@ -101,7 +101,7 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
    *
    * @return mixed
    */
-  function run(
+  public function run(
     $tableName,
     &$mapper,
     $mode = self::MODE_PREVIEW,
@@ -405,9 +405,8 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
    * Given a list of the importable field keys that the user has selected
    * set the active fields array to this list
    *
-   * @param array mapped array of values
-   *
-   * @return void
+   * @param array $fieldKeys
+   *   Mapped array of values.
    */
   public function setActiveFields($fieldKeys) {
     $this->_activeFieldCount = count($fieldKeys);
@@ -554,10 +553,8 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
           }
 
           $value = array(
-            $this->_activeFields[$i]->_name =>
-              $this->_activeFields[$i]->_value,
-            'location_type_id' =>
-              $this->_activeFields[$i]->_hasLocationType,
+            $this->_activeFields[$i]->_name => $this->_activeFields[$i]->_value,
+            'location_type_id' => $this->_activeFields[$i]->_hasLocationType,
           );
 
           if (isset($this->_activeFields[$i]->_phoneType)) {
@@ -653,7 +650,7 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
    * @param string $dataPattern
    * @param bool $hasLocationType
    */
-  function addField(
+  public function addField(
     $name, $title, $type = CRM_Utils_Type::T_INT,
     $headerPattern = '//', $dataPattern = '//',
     $hasLocationType = FALSE
index 8a99a5aa22fd6b063d08b48e94a0c3cd5d31ee7a..75bd26eb26ff3c8dc0e39b9af7e24ca34bd5bcdf 100644 (file)
@@ -61,7 +61,7 @@ class CRM_Contribute_BAO_Contribution_Utils {
    *   associated array
    *
    */
-  static function processConfirm(
+  public static function processConfirm(
     &$form,
     &$paymentParams,
     &$premiumParams,
@@ -511,7 +511,7 @@ INNER JOIN   civicrm_contact contact ON ( contact.id = contrib.contact_id )
         1 => array(
           'email' => $params['email'],
           'location_type_id' => $billingLocTypeId,
-        )
+        ),
       );
     }
 
@@ -568,7 +568,7 @@ INNER JOIN   civicrm_contact contact ON ( contact.id = contrib.contact_id )
     if (!in_array($type, array(
       'paypal',
       'google',
-      'csv'
+      'csv',
     ))
     ) {
       // return the params as is
@@ -806,10 +806,10 @@ INNER JOIN   civicrm_contact contact ON ( contact.id = contrib.contact_id )
     // if this is a recurring contribution then process it first
     if ($params['trxn_type'] == 'subscrpayment') {
       // see if a recurring record already exists
-      $recurring = new CRM_Contribute_BAO_ContributionRecur;
+      $recurring = new CRM_Contribute_BAO_ContributionRecur();
       $recurring->processor_id = $params['processor_id'];
       if (!$recurring->find(TRUE)) {
-        $recurring = new CRM_Contribute_BAO_ContributionRecur;
+        $recurring = new CRM_Contribute_BAO_ContributionRecur();
         $recurring->invoice_id = $params['invoice_id'];
         $recurring->find(TRUE);
       }
index f78231f25877b7762456bab7b951208eb10df81a..140b433a03ce8563fac9cf3f2d2a68250e7d53a2 100644 (file)
@@ -85,7 +85,7 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File {
    *
    * @throws Exception
    */
-  static function filePostProcess(
+  public static function filePostProcess(
     $data,
     $fileTypeID,
     $entityTable,
@@ -495,7 +495,7 @@ AND       CEF.entity_id    = %2";
    * @param $entityTable
    * @param int $entityID
    */
-  static function formatAttachment(
+  public static function formatAttachment(
     &$formValues,
     &$params,
     $entityTable,
index 03a04f4e2e3d982b29dc884d8055c352157873c0..88bbcba9783721ea1a8be282385275dd429df402 100644 (file)
@@ -113,9 +113,6 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup {
    *
    * @param int $optionGroupId
    *   Id of the Option Group to be deleted.
-   *
-   * @return void
-   *
    */
   public static function del($optionGroupId) {
     // need to delete all option value field before deleting group
@@ -134,9 +131,8 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup {
    * @param int $optionGroupId
    *   Id of the Option Group.
    *
-   * @return String
+   * @return string
    *   title
-   *
    */
   public static function getTitle($optionGroupId) {
     $optionGroup = new CRM_Core_DAO_OptionGroup();
index 00c0882de633a90120368a39b1d3ba9d28e54916..4c2ba15d98d6deffb8f7d34ea7e6e7384a236ad8 100644 (file)
@@ -90,7 +90,6 @@ WHERE  cacheKey     = %3 AND
       $wherePrev = " WHERE pn.id < %1 AND pn.cacheKey = %2 {$where} ORDER BY ID DESC LIMIT 1";
       $sqlPrev = $sql . $wherePrev;
 
-
       $dao = CRM_Core_DAO::executeQuery($sqlPrev, $p);
       if ($dao->fetch()) {
         $pos['prev']['id1'] = $dao->entity_id1;
@@ -147,10 +146,7 @@ WHERE  cacheKey     = %3 AND
     $sql = "DELETE FROM civicrm_prevnext_cache WHERE  entity_table = %1";
     $params = array(1 => array($entityTable, 'String'));
 
-    $pair =
-      !$isViceVersa ?
-        "entity_id1 = %2 AND entity_id2 = %3" :
-        "(entity_id1 = %2 AND entity_id2 = %3) OR (entity_id1 = %3 AND entity_id2 = %2)";
+    $pair = !$isViceVersa ? "entity_id1 = %2 AND entity_id2 = %3" : "(entity_id1 = %2 AND entity_id2 = %3) OR (entity_id1 = %3 AND entity_id2 = %2)";
     $sql .= " AND ( {$pair} )";
     $params[2] = array($id1, 'Integer');
     $params[3] = array($id2, 'Integer');
@@ -408,11 +404,11 @@ WHERE  cacheKey LIKE %1 AND is_selected = 1
    * @param string $entity_table
    *   Entity table.
    *
-   * @return array
+   * @return array|NULL
    */
   public static function getSelection($cacheKey, $action = 'get', $entity_table = 'civicrm_contact') {
     if (!$cacheKey) {
-      return;
+      return NULL;
     }
     $params = array();
 
index 6610b13ae7ebd78448edea9810af34eb62ad6a8d..2e7fed3a0406bb3212184ffb7078e7e67b6ed69b 100644 (file)
@@ -139,7 +139,7 @@ class CRM_Extension_Downloader {
    *   URL of a .zip file.
    * @param string $localFile
    *   Path at which to store the .zip file.
-   * @return boolean
+   * @return bool
    *   Whether the download was successful.
    */
   public function fetch($remoteFile, $localFile) {
index dc9109ed172398a1915f207172db3f0198b8db2c..a94397f6b194a2a359bad15069d469b35599ac6a 100644 (file)
@@ -352,7 +352,6 @@ class CRM_Extension_Manager {
         case self::STATUS_INSTALLED_MISSING:
           throw new CRM_Extension_Exception("Cannot uninstall extension; disable it first: $key");
 
-          break;
         case self::STATUS_DISABLED:
           list ($info, $typeManager) = $this->_getInfoTypeHandler($key); // throws Exception
           $typeManager->onPreUninstall($info);
index 4cf903e6620bba57c337ca3faffc61afdd30f47c..354d5ad0bd1f6c1d7a6169673c24d6d5b31a0883 100644 (file)
@@ -86,8 +86,6 @@ class CRM_Financial_BAO_PaymentProcessorType extends CRM_Financial_DAO_PaymentPr
   /**
    * Retrieve the default payment processor
    *
-   * @param NULL
-   *
    * @return object
    *   The default payment processor object on success,
    *                          null otherwise
@@ -175,7 +173,7 @@ class CRM_Financial_BAO_PaymentProcessorType extends CRM_Financial_DAO_PaymentPr
    * @param int $paymentProcessorTypeId
    *   ID of the processor to be deleted.
    *
-   * @return bool
+   * @return bool|NULL
    */
   public static function del($paymentProcessorTypeId) {
     $query = "
@@ -188,7 +186,7 @@ WHERE pp.payment_processor_type_id = ppt.id AND ppt.id = %1";
 
     if ($dao->fetch()) {
       CRM_Core_Session::setStatus(ts('There is a Payment Processor associated with selected Payment Processor type, hence it can not be deleted.'), ts('Deletion Error'), 'error');
-      return;
+      return NULL;
     }
 
     $paymentProcessorType = new CRM_Financial_DAO_PaymentProcessorType();
index 9f0c13ef02927d8affe41df0c290761b9aa84916..a3b9edd0b8ff1499755bfc4b5601818fb8a8de7e 100644 (file)
@@ -97,9 +97,9 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
     $this->add('text', 'accounting_code', ts('Accounting Code'), $attributes['accounting_code']);
     $elementAccounting = $this->add('text', 'account_type_code', ts('Account Type Code'), $attributes['account_type_code']);
     $this->addEntityRef('contact_id', ts('Owner'), array(
-        'api' => array('params' => array('contact_type' => 'Organization')),
-        'create' => TRUE
-      ));
+      'api' => array('params' => array('contact_type' => 'Organization')),
+      'create' => TRUE,
+    ));
     $this->add('text', 'tax_rate', ts('Tax Rate'), $attributes['tax_rate']);
     $this->add('checkbox', 'is_deductible', ts('Tax-Deductible?'));
     $elementActive = $this->add('checkbox', 'is_active', ts('Enabled?'));
index 0062ef2839ea72c523e9181268dae2cb2b49cccd..a6908ab4ad450eec3878828f317667f101bdd352 100644 (file)
@@ -95,7 +95,7 @@ class CRM_Group_Form_Edit extends CRM_Core_Form {
           'url' => CRM_Utils_System::url('civicrm/group',
             'reset=1'
           ),
-        )
+        ),
       );
       CRM_Utils_System::appendBreadCrumb($breadCrumb);
 
@@ -126,8 +126,7 @@ class CRM_Group_Form_Edit extends CRM_Core_Form {
         $groupValues = array(
           'id' => $this->_id,
           'title' => $this->_title,
-          'saved_search_id' =>
-            isset($this->_groupValues['saved_search_id']) ? $this->_groupValues['saved_search_id'] : '',
+          'saved_search_id' => isset($this->_groupValues['saved_search_id']) ? $this->_groupValues['saved_search_id'] : '',
         );
         if (isset($this->_groupValues['saved_search_id'])) {
           $groupValues['mapping_id'] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch',
@@ -140,13 +139,11 @@ class CRM_Group_Form_Edit extends CRM_Core_Form {
           );
         }
         if (!empty($this->_groupValues['created_id'])) {
-          $groupValues['created_by'] =
-            CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['created_id'], 'sort_name', 'id');
+          $groupValues['created_by'] = CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['created_id'], 'sort_name', 'id');
         }
 
         if (!empty($this->_groupValues['modified_id'])) {
-          $groupValues['modified_by'] =
-            CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['modified_id'], 'sort_name', 'id');
+          $groupValues['modified_by'] = CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", $this->_groupValues['modified_id'], 'sort_name', 'id');
         }
 
         $this->assign_by_ref('group', $groupValues);
@@ -284,8 +281,7 @@ class CRM_Group_Form_Edit extends CRM_Core_Form {
     $this->addButtons(array(
         array(
           'type' => 'upload',
-          'name' =>
-            ($this->_action == CRM_Core_Action::ADD) ? ts('Continue') : ts('Save'),
+          'name' => ($this->_action == CRM_Core_Action::ADD) ? ts('Continue') : ts('Save'),
           'isDefault' => TRUE,
         ),
         array(
index db82501a6af9db7d7236c0de5db4d237eff05495..7487f06b4652151aa8afe7f713fa250cf391a83e 100644 (file)
@@ -56,124 +56,123 @@ class CRM_Logging_ReportSummary extends CRM_Report_Form {
     $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);
     $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts);
 
-    $this->_logTables =
-      array(
-        'log_civicrm_contact' => array(
-          'fk' => 'id',
+    $this->_logTables = array(
+      'log_civicrm_contact' => array(
+        'fk' => 'id',
+      ),
+      'log_civicrm_email' => array(
+        'fk' => 'contact_id',
+        'log_type' => 'Contact',
+      ),
+      'log_civicrm_phone' => array(
+        'fk' => 'contact_id',
+        'log_type' => 'Contact',
+      ),
+      'log_civicrm_address' => array(
+        'fk' => 'contact_id',
+        'log_type' => 'Contact',
+      ),
+      'log_civicrm_note' => array(
+        'fk' => 'entity_id',
+        'entity_table' => TRUE,
+        'bracket_info' => array(
+          'table' => 'log_civicrm_note',
+          'column' => 'subject',
         ),
-        'log_civicrm_email' => array(
-          'fk' => 'contact_id',
-          'log_type' => 'Contact',
+      ),
+      'log_civicrm_note_comment' => array(
+        'fk' => 'entity_id',
+        'table_name' => 'log_civicrm_note',
+        'joins' => array(
+          'table' => 'log_civicrm_note',
+          'join' => "entity_log_civireport.entity_id = fk_table.id AND entity_log_civireport.entity_table = 'civicrm_note'",
         ),
-        'log_civicrm_phone' => array(
-          'fk' => 'contact_id',
-          'log_type' => 'Contact',
+        'entity_table' => TRUE,
+        'bracket_info' => array(
+          'table' => 'log_civicrm_note',
+          'column' => 'subject',
         ),
-        'log_civicrm_address' => array(
-          'fk' => 'contact_id',
-          'log_type' => 'Contact',
+      ),
+      'log_civicrm_group_contact' => array(
+        'fk' => 'contact_id',
+        'bracket_info' => array(
+          'entity_column' => 'group_id',
+          'table' => 'log_civicrm_group',
+          'column' => 'title',
         ),
-        'log_civicrm_note' => array(
-          'fk' => 'entity_id',
-          'entity_table' => TRUE,
-          'bracket_info' => array(
-            'table' => 'log_civicrm_note',
-            'column' => 'subject',
-          ),
+        'action_column' => 'status',
+        'log_type' => 'Group',
+      ),
+      'log_civicrm_entity_tag' => array(
+        'fk' => 'entity_id',
+        'bracket_info' => array(
+          'entity_column' => 'tag_id',
+          'table' => 'log_civicrm_tag',
+          'column' => 'name',
         ),
-        'log_civicrm_note_comment' => array(
-          'fk' => 'entity_id',
-          'table_name' => 'log_civicrm_note',
-          'joins' => array(
-            'table' => 'log_civicrm_note',
-            'join' => "entity_log_civireport.entity_id = fk_table.id AND entity_log_civireport.entity_table = 'civicrm_note'",
-          ),
-          'entity_table' => TRUE,
-          'bracket_info' => array(
-            'table' => 'log_civicrm_note',
-            'column' => 'subject',
-          ),
+        'entity_table' => TRUE,
+      ),
+      'log_civicrm_relationship' => array(
+        'fk' => 'contact_id_a',
+        'bracket_info' => array(
+          'entity_column' => 'relationship_type_id',
+          'table' => 'log_civicrm_relationship_type',
+          'column' => 'label_a_b',
         ),
-        'log_civicrm_group_contact' => array(
-          'fk' => 'contact_id',
-          'bracket_info' => array(
-            'entity_column' => 'group_id',
-            'table' => 'log_civicrm_group',
-            'column' => 'title',
-          ),
-          'action_column' => 'status',
-          'log_type' => 'Group',
+      ),
+      'log_civicrm_activity_for_target' => array(
+        'fk' => 'contact_id',
+        'table_name' => 'log_civicrm_activity',
+        'joins' => array(
+          'table' => 'log_civicrm_activity_contact',
+          'join' => "(entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$targetID})",
         ),
-        'log_civicrm_entity_tag' => array(
-          'fk' => 'entity_id',
-          'bracket_info' => array(
-            'entity_column' => 'tag_id',
-            'table' => 'log_civicrm_tag',
-            'column' => 'name',
-          ),
-          'entity_table' => TRUE,
+        'bracket_info' => array(
+          'entity_column' => 'activity_type_id',
+          'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
         ),
-        'log_civicrm_relationship' => array(
-          'fk' => 'contact_id_a',
-          'bracket_info' => array(
-            'entity_column' => 'relationship_type_id',
-            'table' => 'log_civicrm_relationship_type',
-            'column' => 'label_a_b',
-          ),
+        'log_type' => 'Activity',
+      ),
+      'log_civicrm_activity_for_assignee' => array(
+        'fk' => 'contact_id',
+        'table_name' => 'log_civicrm_activity',
+        'joins' => array(
+          'table' => 'log_civicrm_activity_contact',
+          'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$assigneeID}",
         ),
-        'log_civicrm_activity_for_target' => array(
-          'fk' => 'contact_id',
-          'table_name' => 'log_civicrm_activity',
-          'joins' => array(
-            'table' => 'log_civicrm_activity_contact',
-            'join' => "(entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$targetID})",
-          ),
-          'bracket_info' => array(
-            'entity_column' => 'activity_type_id',
-            'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
-          ),
-          'log_type' => 'Activity',
+        'bracket_info' => array(
+          'entity_column' => 'activity_type_id',
+          'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
         ),
-        'log_civicrm_activity_for_assignee' => array(
-          'fk' => 'contact_id',
-          'table_name' => 'log_civicrm_activity',
-          'joins' => array(
-            'table' => 'log_civicrm_activity_contact',
-            'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$assigneeID}",
-          ),
-          'bracket_info' => array(
-            'entity_column' => 'activity_type_id',
-            'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
-          ),
-          'log_type' => 'Activity',
+        'log_type' => 'Activity',
+      ),
+      'log_civicrm_activity_for_source' => array(
+        'fk' => 'contact_id',
+        'table_name' => 'log_civicrm_activity',
+        'joins' => array(
+          'table' => 'log_civicrm_activity_contact',
+          'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$sourceID}",
         ),
-        'log_civicrm_activity_for_source' => array(
-          'fk' => 'contact_id',
-          'table_name' => 'log_civicrm_activity',
-          'joins' => array(
-            'table' => 'log_civicrm_activity_contact',
-            'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$sourceID}",
-          ),
-          'bracket_info' => array(
-            'entity_column' => 'activity_type_id',
-            'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
-          ),
-          'log_type' => 'Activity',
+        'bracket_info' => array(
+          'entity_column' => 'activity_type_id',
+          'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
         ),
-        'log_civicrm_case' => array(
-          'fk' => 'contact_id',
-          'joins' => array(
-            'table' => 'log_civicrm_case_contact',
-            'join' => 'entity_log_civireport.id = fk_table.case_id',
-          ),
-          'bracket_info' => array(
-            'entity_column' => 'case_type_id',
-            'options' => CRM_Case_PseudoConstant::caseType('title', FALSE),
-          ),
+        'log_type' => 'Activity',
+      ),
+      'log_civicrm_case' => array(
+        'fk' => 'contact_id',
+        'joins' => array(
+          'table' => 'log_civicrm_case_contact',
+          'join' => 'entity_log_civireport.id = fk_table.case_id',
         ),
-      );
+        'bracket_info' => array(
+          'entity_column' => 'case_type_id',
+          'options' => CRM_Case_PseudoConstant::caseType('title', FALSE),
+        ),
+      ),
+    );
 
-    $logging = new CRM_Logging_Schema;
+    $logging = new CRM_Logging_Schema();
 
     // build _logTables for contact custom tables
     $customTables = $logging->entityCustomDataLogTables('Contact');
@@ -187,15 +186,14 @@ class CRM_Logging_ReportSummary extends CRM_Report_Form {
     // build _logTables for address custom tables
     $customTables = $logging->entityCustomDataLogTables('Address');
     foreach ($customTables as $table) {
-      $this->_logTables[$table] =
-        array(
-          'fk' => 'contact_id',// for join of fk_table with contact table
-          'joins' => array(
-            'table' => 'log_civicrm_address', // fk_table
-            'join' => 'entity_log_civireport.entity_id = fk_table.id',
-          ),
-          'log_type' => 'Contact',
-        );
+      $this->_logTables[$table] = array(
+        'fk' => 'contact_id', // for join of fk_table with contact table
+        'joins' => array(
+          'table' => 'log_civicrm_address', // fk_table
+          'join' => 'entity_log_civireport.entity_id = fk_table.id',
+        ),
+        'log_type' => 'Contact',
+      );
     }
 
     // allow log tables to be extended via report hooks
@@ -386,7 +384,6 @@ SELECT {$this->_logTables[$entity]['bracket_info']['entity_column']}
         $entityID = $id;
       }
 
-
       if ($entityID && $logDate &&
         array_key_exists('table', $this->_logTables[$entity]['bracket_info'])
       ) {
index a4902c1461e08bcee1a92e0ad2e43c214829ffab..6bc0dbd3dd88b9a4f913f57e6f71c5fb52bb0a60 100644 (file)
@@ -143,7 +143,7 @@ AND    TABLE_NAME LIKE 'log_civicrm_%'
    * Drop triggers for all logged tables.
    */
   public function dropTriggers($tableName = NULL) {
-    $dao = new CRM_Core_DAO;
+    $dao = new CRM_Core_DAO();
 
     if ($tableName) {
       $tableNames = array($tableName);
@@ -347,13 +347,14 @@ AND    TABLE_NAME LIKE 'log_civicrm_%'
     // add report instances
     $domain_id = CRM_Core_Config::domainID();
     foreach ($this->reports as $report) {
-      $dao = new CRM_Report_DAO_ReportInstance;
+      $dao = new CRM_Report_DAO_ReportInstance();
       $dao->domain_id = $domain_id;
       $dao->report_id = $report;
       $dao->title = $titles[$report];
       $dao->permission = 'administer CiviCRM';
-      if ($report == 'logging/contact/summary')
+      if ($report == 'logging/contact/summary') {
         $dao->is_reserved = 1;
+      }
       $dao->insert();
     }
   }
@@ -407,13 +408,12 @@ WHERE  table_schema IN ('{$this->db}', '{$civiDB}')";
         if (!array_key_exists($dao->TABLE_NAME, $columnSpecs)) {
           $columnSpecs[$dao->TABLE_NAME] = array();
         }
-        $columnSpecs[$dao->TABLE_NAME][$dao->COLUMN_NAME] =
-          array(
-            'COLUMN_NAME' => $dao->COLUMN_NAME,
-            'DATA_TYPE' => $dao->DATA_TYPE,
-            'IS_NULLABLE' => $dao->IS_NULLABLE,
-            'COLUMN_DEFAULT' => $dao->COLUMN_DEFAULT,
-          );
+        $columnSpecs[$dao->TABLE_NAME][$dao->COLUMN_NAME] = array(
+          'COLUMN_NAME' => $dao->COLUMN_NAME,
+          'DATA_TYPE' => $dao->DATA_TYPE,
+          'IS_NULLABLE' => $dao->IS_NULLABLE,
+          'COLUMN_DEFAULT' => $dao->COLUMN_DEFAULT,
+        );
       }
     }
     return $columnSpecs[$table];
@@ -530,7 +530,7 @@ COLS;
     // delete report instances
     $domain_id = CRM_Core_Config::domainID();
     foreach ($this->reports as $report) {
-      $dao = new CRM_Report_DAO_ReportInstance;
+      $dao = new CRM_Report_DAO_ReportInstance();
       $dao->domain_id = $domain_id;
       $dao->report_id = $report;
       $dao->delete();
index a442d3ce31182d248b0c89b7cb13721be5132cb4..438afc6394a3662d65ff48ebd9894782398d9c2a 100755 (executable)
@@ -57,7 +57,7 @@ class CRM_Mailing_Event_BAO_Unsubscribe extends CRM_Mailing_Event_DAO_Unsubscrib
    * @param string $hash
    *   The hash.
    *
-   * @return boolean
+   * @return bool
    *   Was the contact successfully unsubscribed?
    */
   public static function unsub_from_domain($job_id, $queue_id, $hash) {
index 6e9f766d92f3de7489f2912449bc9b9ac12a59f8..e8c2ced583bdd16184895cf00119b1dbd80b6382 100644 (file)
@@ -47,8 +47,6 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
 
   /**
    * called when action is browse
-   *
-   * @return null
    */
   public function browse() {
     $links = self::links('all', $this->_isPaymentProcessor, $this->_accessContribution);
@@ -157,7 +155,8 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
       if (CRM_Utils_Array::value('is_current_member', $statusANDType[$dao->id]) // membership is active
         && CRM_Utils_Array::value('relationship_type_id', $statusANDType[$dao->id]) // membership type allows inheritance
         && empty($dao->owner_membership_id)
-      ) { // not an related membership
+      ) {
+        // not an related membership
         $query = "
  SELECT COUNT(m.id)
    FROM civicrm_membership m
@@ -168,7 +167,7 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
         $max_related = CRM_Utils_Array::value('max_related', $membership[$dao->id]);
         $membership[$dao->id]['related_count'] = ($max_related == '' ? ts('%1 created', array(1 => $num_related)) : ts('%1 out of %2', array(
             1 => $num_related,
-            2 => $max_related
+            2 => $max_related,
           ))
         );
       }
@@ -465,7 +464,7 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
    * @return array
    *   (reference) of action links
    */
-  static function &links(
+  public static function &links(
     $status = 'all',
     $isPaymentProcessor = NULL,
     $accessContribution = NULL,
@@ -578,8 +577,6 @@ class CRM_Member_Page_Tab extends CRM_Core_Page {
    *
    * @param int $contactId
    * @param int $membershipId
-   *
-   * @return null
    */
   public static function associatedContribution($contactId = NULL, $membershipId = NULL) {
     $controller = new CRM_Core_Controller_Simple(
index 8510fc13f1ed874df8bc915855051ceb75412b63..b276c483a0403818ddcf72a48aae51c015afa464 100644 (file)
@@ -42,10 +42,6 @@ class CRM_PCP_Form_PCP extends CRM_Core_Form {
 
   /**
    * Set variables up before form is built
-   *
-   * @param null
-   *
-   * @return void
    */
   public function preProcess() {
     if ($this->_action & CRM_Core_Action::DELETE) {
@@ -122,8 +118,6 @@ class CRM_PCP_Form_PCP extends CRM_Core_Form {
    * Set default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
-   * @param null
-   *
    * @return array
    *   array of default values
    */
@@ -138,10 +132,6 @@ class CRM_PCP_Form_PCP extends CRM_Core_Form {
 
   /**
    * Build the form object
-   *
-   * @param null
-   *
-   * @return void
    */
   public function buildQuickForm() {
     if ($this->_action & CRM_Core_Action::DELETE) {
@@ -191,22 +181,18 @@ class CRM_PCP_Form_PCP extends CRM_Core_Form {
    *
    * @param array $fields
    *   Posted values of the form.
-   *
-   * @param $files
+   * @param array $files
    * @param CRM_Core_Form $form
    *
-   * @return array
+   * @return array|NULL
    *   list of errors to be posted back to the form
    */
   public static function formRule($fields, $files, $form) {
+    return NULL;
   }
 
   /**
    * Process the form
-   *
-   * @param null
-   *
-   * @return void
    */
   public function postProcess() {
     if ($this->_action & CRM_Core_Action::DELETE) {
index 5376314ca1d39fde97e6ad2b7bcf1b99256a383b..5626f2309c21024f5fc01f20a61a013ba279e285 100644 (file)
@@ -237,7 +237,7 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form {
     if ($this->_context == 'standalone') {
       $this->addEntityRef('contact_id', ts('Contact'), array(
           'create' => TRUE,
-          'api' => array('extra' => array('email'))
+          'api' => array('extra' => array('email')),
         ), TRUE);
     }
 
@@ -332,9 +332,7 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form {
     }
     $element = &$this->add('select', 'frequency_unit',
       ts('Frequency'),
-      array(
-        '' => ts('- select -')
-      ) + $freqUnitsDisplay,
+      array('' => ts('- select -')) + $freqUnitsDisplay,
       TRUE
     );
 
@@ -405,9 +403,7 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form {
       $pledgePages[$value['entity_id']] = $pages[$value['entity_id']];
     }
     $ele = $this->add('select', 'contribution_page_id', ts('Self-service Payments Page'),
-      array(
-        '' => ts('- select -')
-      ) + $pledgePages
+      array('' => ts('- select -')) + $pledgePages
     );
 
     $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
@@ -637,7 +633,7 @@ class CRM_Pledge_Form_Pledge extends CRM_Core_Form {
         if (count($processors) > 0) {
           $statusMsg .= ' ' . ts("If a payment is due now, you can record <a href='%1'>a check, EFT, or cash payment for this pledge</a> OR <a href='%2'>submit a credit card payment</a>.", array(
                 1 => $contribURL,
-                2 => $creditURL
+                2 => $creditURL,
               ));
         }
         else {
index e4c82e6cac7cc4d465168a84773b0351119019e5..cc86953868fdbc3ddbf2e2f2cf6f7bfaaa37b432 100644 (file)
@@ -71,10 +71,6 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
 
   /**
    * Set variables up before form is built
-   *
-   * @param null
-   *
-   * @return void
    */
   public function preProcess() {
 
@@ -98,8 +94,6 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
    * Set default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
-   * @param null
-   *
    * @return array
    *   array of default values
    */
@@ -166,10 +160,6 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
 
   /**
    * Build the form object
-   *
-   * @param null
-   *
-   * @return void
    */
   public function buildQuickForm() {
     // lets trim all the whitespace
@@ -291,9 +281,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
         $js = array('onchange' => "calculateRowValues( $i );");
 
         $this->add('select', 'membership_type_id[' . $i . ']', ts('Membership Type'),
-          array(
-            '' => ' '
-          ) + $membershipTypes, FALSE, $js
+          array('' => ' ') + $membershipTypes, FALSE, $js
         );
         $this->add('text', 'membership_num_terms[' . $i . ']', ts('Number of Terms'), CRM_Utils_Array::value('membership_num_terms', $attributes));
       }
@@ -604,10 +592,6 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
 
   /**
    * Process the form
-   *
-   * @param null
-   *
-   * @return void
    */
   public function postProcess() {
     // store the submitted values in an array
index 842841c73c741dd2d28fdaa018f01d7709bd7783..cbb686ca214dc585e3a4a218d5e259cf77919168 100644 (file)
@@ -407,8 +407,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form {
 
     foreach ($this->_component as $val) {
       if (!empty($select[$val])) {
-        $this->_selectComponent[$val] =
-          "SELECT " . implode(', ', $select[$val]) . " ";
+        $this->_selectComponent[$val] = "SELECT " . implode(', ', $select[$val]) . " ";
         unset($select[$val]);
       }
     }
@@ -784,15 +783,12 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form {
 
       //unset Conmponent id and contact id from display
       foreach ($this->_columnHeadersComponent as $componentTitle => $headers) {
-        $id_header =
-          'civicrm_' . substr_replace($componentTitle, '', -11, 11) . '_' .
+        $id_header = 'civicrm_' . substr_replace($componentTitle, '', -11, 11) . '_' .
           substr_replace($componentTitle, '', -11, 11) . '_id';
-        $contact_header =
-          'civicrm_' . substr_replace($componentTitle, '', -11, 11) .
+        $contact_header = 'civicrm_' . substr_replace($componentTitle, '', -11, 11) .
           '_contact_id';
         if ($componentTitle == 'activity_civireport') {
-          $id_header =
-            'civicrm_' . substr_replace($componentTitle, '', -11, 11) . '_id';
+          $id_header = 'civicrm_' . substr_replace($componentTitle, '', -11, 11) . '_id';
         }
 
         unset($this->_columnHeadersComponent[$componentTitle][$id_header]);
@@ -862,8 +858,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form {
           // handle contribution
           if ($component == 'contribution_civireport') {
             if ($val = CRM_Utils_Array::value('civicrm_contribution_financial_type_id', $row)) {
-              $componentRows[$contactID][$component][$rowNum]['civicrm_contribution_financial_type_id'] =
-                CRM_Contribute_PseudoConstant::financialType($val, FALSE);
+              $componentRows[$contactID][$component][$rowNum]['civicrm_contribution_financial_type_id'] = CRM_Contribute_PseudoConstant::financialType($val, FALSE);
             }
 
             if ($val = CRM_Utils_Array::value('civicrm_contribution_contribution_status_id', $row)) {
index 34bfc2411387443fb04638d9959543b9fb1a5da8..1fa3a79327deec7a098b52e5b62a7e0d41f5058a 100644 (file)
@@ -119,9 +119,9 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
           ),
         ),
       ),
-    )
-    + $this->addAddressFields()
-    + array(
+    );
+    $this->_columns += $this->addAddressFields();
+    $this->_columns += array(
       'civicrm_contribution' => array(
         'dao' => 'CRM_Contribute_DAO_Contribution',
         'fields' => array(
@@ -316,8 +316,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
   }
 
   public function groupBy() {
-    $this->_groupBy =
-      "GROUP BY  {$this->_aliases['civicrm_contribution']}.contact_id, " .
+    $this->_groupBy = "GROUP BY  {$this->_aliases['civicrm_contribution']}.contact_id, " .
       self::fiscalYearOffset($this->_aliases['civicrm_contribution'] .
         '.receive_date') . " WITH ROLLUP";
     $this->assign('chartSupported', TRUE);
@@ -380,8 +379,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
         $sql = "{$this->_select} {$this->_from} {$this->_where} {$this->_groupBy}";
       }
       else {
-        $sql =
-          "{$this->_select} {$this->_from} WHERE {$this->_aliases['civicrm_contact']}.id IN (" .
+        $sql = "{$this->_select} {$this->_from} WHERE {$this->_aliases['civicrm_contact']}.id IN (" .
           implode(',', $contactIds) .
           ") AND {$this->_aliases['civicrm_contribution']}.is_test = 0 {$this->_statusClause} {$this->_groupBy} ";
       }
@@ -441,8 +439,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
     foreach ($rows as $key => $row) {
       $display['life_time'] = CRM_Utils_Array::value('life_time', $display) +
         $row['civicrm_life_time_total'];
-      $display[$previous_year] =
-        CRM_Utils_Array::value($previous_year, $display) + $row[$previous_year];
+      $display[$previous_year] = CRM_Utils_Array::value($previous_year, $display) + $row[$previous_year];
     }
 
     $config = CRM_Core_Config::Singleton();
index b485241b7bc01cfa1a61c206e65b8ff4d1a931e9..3c93823395c0bbcc08bea13c1521b73317e37e12 100644 (file)
@@ -44,112 +44,110 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form {
     'pieChart' => 'Pie Chart',
   );
 
-  /**
-   */
   /**
    */
   public function __construct() {
     $this->_columns = array(
-        'civicrm_contact' => array(
-          'dao' => 'CRM_Contact_DAO_Contact',
-          'fields' => array(
-            'id' => array(
-              'no_display' => TRUE,
-              'required' => TRUE,
-            ),
-            'display_name' => array(
-              'title' => ts('Contact Name'),
-              'required' => TRUE,
-              'no_repeat' => 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',
+        'fields' => array(
+          'id' => array(
+            'no_display' => TRUE,
+            'required' => TRUE,
+          ),
+          'display_name' => array(
+            'title' => ts('Contact Name'),
+            'required' => TRUE,
+            'no_repeat' => 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'),
           ),
         ),
-      )
-      + $this->getAddressColumns()
-      + array(
-        'civicrm_contribution' => array(
-          'dao' => 'CRM_Contribute_DAO_Contribution',
-          'fields' => array(
-            'total_amount' => array(
-              'title' => ts('Amount Statistics'),
-              'required' => TRUE,
-              'statistics' => array(
-                'sum' => ts('Aggregate Amount'),
-                'count' => ts('Donations'),
-                'avg' => ts('Average'),
-              ),
-            ),
-            'currency' => array(
-              'required' => TRUE,
-              'no_display' => TRUE,
+      ),
+    );
+    $this->_columns += $this->getAddressColumns();
+    $this->_columns += array(
+      'civicrm_contribution' => array(
+        'dao' => 'CRM_Contribute_DAO_Contribution',
+        'fields' => array(
+          'total_amount' => array(
+            'title' => ts('Amount Statistics'),
+            'required' => TRUE,
+            'statistics' => array(
+              'sum' => ts('Aggregate Amount'),
+              'count' => ts('Donations'),
+              'avg' => ts('Average'),
             ),
           ),
-          'filters' => array(
-            'receive_date' => array(
-              'default' => 'this.year',
-              '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,
-            ),
-            'total_range' => array(
-              'title' => ts('Show no. of Top Donors'),
-              'type' => CRM_Utils_Type::T_INT,
-              'default_op' => 'eq',
-            ),
-            'financial_type_id' => array(
-              'name' => 'financial_type_id',
-              '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),
-            ),
+          'currency' => array(
+            'required' => TRUE,
+            'no_display' => TRUE,
           ),
         ),
-        'civicrm_email' => array(
-          'dao' => 'CRM_Core_DAO_Email',
-          'fields' => array(
-            'email' => array(
-              'title' => ts('Email'),
-              'default' => TRUE,
-              'no_repeat' => TRUE,
-            ),
+        'filters' => array(
+          'receive_date' => array(
+            'default' => 'this.year',
+            '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,
+          ),
+          'total_range' => array(
+            'title' => ts('Show no. of Top Donors'),
+            'type' => CRM_Utils_Type::T_INT,
+            'default_op' => 'eq',
+          ),
+          'financial_type_id' => array(
+            'name' => 'financial_type_id',
+            '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),
           ),
-          'grouping' => 'email-fields',
         ),
-        'civicrm_phone' => array(
-          'dao' => 'CRM_Core_DAO_Phone',
-          'fields' => array(
-            'phone' => array(
-              'title' => ts('Phone'),
-              'default' => TRUE,
-              'no_repeat' => TRUE,
-            ),
+      ),
+      'civicrm_email' => array(
+        'dao' => 'CRM_Core_DAO_Email',
+        'fields' => array(
+          'email' => array(
+            'title' => ts('Email'),
+            'default' => TRUE,
+            'no_repeat' => TRUE,
+          ),
+        ),
+        'grouping' => 'email-fields',
+      ),
+      'civicrm_phone' => array(
+        'dao' => 'CRM_Core_DAO_Phone',
+        'fields' => array(
+          'phone' => array(
+            'title' => ts('Phone'),
+            'default' => TRUE,
+            'no_repeat' => TRUE,
           ),
-          'grouping' => 'phone-fields',
         ),
-      );
+        'grouping' => 'phone-fields',
+      ),
+    );
 
     $this->_groupFilter = TRUE;
     $this->_tagFilter = TRUE;
index 7e2636ab12b1f7949fb061d6969116322b7fe89c..238fb5128a0a933988ef3e5a8cb749ae4e3480f5 100644 (file)
@@ -381,20 +381,18 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event {
 
     // If we have active campaigns add those elements to both the fields and filters
     if ($campaignEnabled && !empty($this->activeCampaigns)) {
-      $this->_columns['civicrm_participant']['fields']['campaign_id'] =
-        array(
-          'title' => ts('Campaign'),
-          'default' => 'false',
-        );
-      $this->_columns['civicrm_participant']['filters']['campaign_id'] =
-        array(
-          'title' => ts('Campaign'),
-          'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-          'options' => $this->activeCampaigns,
-        );
-      $this->_columns['civicrm_participant']['order_bys']['campaign_id'] =
-        array('title' => ts('Campaign'));
-
+      $this->_columns['civicrm_participant']['fields']['campaign_id'] = array(
+        'title' => ts('Campaign'),
+        'default' => 'false',
+      );
+      $this->_columns['civicrm_participant']['filters']['campaign_id'] = array(
+        'title' => ts('Campaign'),
+        'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+        'options' => $this->activeCampaigns,
+      );
+      $this->_columns['civicrm_participant']['order_bys']['campaign_id'] = array(
+        'title' => ts('Campaign'),
+      );
     }
 
     $this->_currencyColumn = 'civicrm_participant_fee_currency';
@@ -402,6 +400,8 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event {
   }
 
   /**
+   * Searches database for priceset values.
+   *
    * @return array
    */
   public function getPriceLevels() {
@@ -424,8 +424,7 @@ ORDER BY  cv.label
     }
 
     return $elements;
-  } //searches database for priceset values
-
+  }
 
   public function preProcess() {
     parent::preProcess();
@@ -573,8 +572,7 @@ ORDER BY  cv.label
       $this->_where = "WHERE {$this->_aliases['civicrm_participant']}.is_test = 0 ";
     }
     else {
-      $this->_where =
-        "WHERE {$this->_aliases['civicrm_participant']}.is_test = 0 AND " .
+      $this->_where = "WHERE {$this->_aliases['civicrm_participant']}.is_test = 0 AND " .
         implode(' AND ', $clauses);
     }
     if ($this->_aclWhere) {
index 7edf71f6ffb75b3e4c46061826664a6520ef22c0..c603af071e93e0e172eac32b1b5ff7f4fda045b3 100644 (file)
@@ -46,36 +46,35 @@ class CRM_Report_Page_InstanceList extends CRM_Core_Page {
    * Name of component if report list is filtered
    *
    * @var string
-   **/
+   */
   protected $_compName = NULL;
 
   /**
    * ID of component if report list is filtered
    *
    * @var int
-   **/
+   */
   protected $_compID = NULL;
 
   /**
    * ID of grouping if report list is filtered
    *
    * @var int
-   **/
+   */
   protected $_grouping = NULL;
 
   /**
    * ID of parent report template if list is filtered by template
    *
    * @var int
-   **/
+   */
   protected $_ovID = NULL;
 
-
   /**
    * Title of parent report template if list is filtered by template
    *
    * @var string
-   **/
+   */
   protected $_title = NULL;
 
   /**
index 18c160a25b64989411679ce437cb49744a00bcaf..5425905ca84cda58310d386bfa0495ef9d52a5e0 100644 (file)
@@ -64,7 +64,7 @@ class CRM_UF_Page_Field extends CRM_Core_Page {
    *
    * @return array
    */
-  function &actionLinks() {
+  public function &actionLinks() {
     if (!isset(self::$_actionLinks)) {
       self::$_actionLinks = array(
         CRM_Core_Action::UPDATE => array(
index 475e04dd2f228dd5a5dfd8a08a43337130c8dd2b..803bf2e7d2a33339feb964f51013686f983aab90 100644 (file)
@@ -98,7 +98,7 @@ class CRM_Upgrade_Form extends CRM_Core_Form {
    * @param string $method
    * @param null|string $name
    */
-  function __construct(
+  public function __construct(
     $state = NULL,
     $action = CRM_Core_Action::NONE,
     $method = 'post',
@@ -658,7 +658,7 @@ SET    version = '$version'
     if ($upgrade->checkVersionRelease($rev, 'alpha1')) {
       if (!(is_callable(array(
         $versionObject,
-        'verifyPreDBstate'
+        'verifyPreDBstate',
       )))
       ) {
         CRM_Core_Error::fatal("verifyPreDBstate method was not found for $rev");
@@ -678,7 +678,7 @@ SET    version = '$version'
 
     if (is_callable(array(
       $versionObject,
-      $phpFunctionName
+      $phpFunctionName,
     ))) {
       $versionObject->$phpFunctionName($rev, $originalVer, $latestVer);
     }
@@ -689,7 +689,7 @@ SET    version = '$version'
     // set post-upgrade-message if any
     if (is_callable(array(
       $versionObject,
-      'setPostUpgradeMessage'
+      'setPostUpgradeMessage',
     ))) {
       $postUpgradeMessage = file_get_contents($postUpgradeMessageFile);
       $versionObject->setPostUpgradeMessage($postUpgradeMessage, $rev);
@@ -778,7 +778,7 @@ SET    version = '$version'
         $versionObject = $this->incrementalPhpObject($rev);
         if (is_callable(array(
           $versionObject,
-          'setPreUpgradeMessage'
+          'setPreUpgradeMessage',
         ))) {
           $versionObject->setPreUpgradeMessage($preUpgradeMessage, $rev, $currentVer);
         }
index 1f0beca7adac0089d7209c93f7f561445599d13b..eb36f2259a38b4bea22859a732a36375c1f4e39a 100644 (file)
@@ -278,7 +278,7 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field extends CRM_Upgrade_Snapshot_V4p
           $label = ts('Additional Contribution');
           $useRequired = 0;
         }
-        elseif (!empty($fieldOptions[$optionKey]['label'])) {      //check for label.
+        elseif (!empty($fieldOptions[$optionKey]['label'])) {
           $label = $fieldOptions[$optionKey]['label'];
         }
 
@@ -409,9 +409,7 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field extends CRM_Upgrade_Snapshot_V4p
           }
         }
         $element = &$qf->add('select', $elementName, $label,
-          array(
-            '' => ts('- select -')
-          ) + $selectOption,
+          array('' => ts('- select -')) + $selectOption,
           $useRequired && $field->is_required,
           array('price' => json_encode($priceVal))
         );
@@ -510,7 +508,7 @@ WHERE
 
     $dao = CRM_Core_DAO::executeQuery($query, array(
         1 => array($optionGroupName, 'String'),
-        2 => array($optionLabel, 'String')
+        2 => array($optionLabel, 'String'),
       ));
 
     while ($dao->fetch()) {
@@ -524,8 +522,8 @@ WHERE
    * @param int $id
    *   Field Id.
    *
-   * @return boolean
-   *
+   * @return mixed
+   *   Boolean-ish
    */
   public static function deleteField($id) {
     $field = new CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field();
@@ -567,15 +565,9 @@ WHERE
    * Validate the priceset
    *
    * @param int $priceSetId
-   *   , array $fields.
-   *
-   * retrun the error string
-   *
-   * @param $fields
-   * @param $error
-   *
+   * @param array $fields
+   * @param array $error
    */
-
   public static function priceSetValidation($priceSetId, $fields, &$error) {
     // check for at least one positive
     // amount price field should be selected.
index f1754944cd7e636e2c5502fa9ee176e85960f916..345765825f1b578e7c7ce3917d2de683448db04e 100644 (file)
@@ -133,10 +133,8 @@ class CRM_Utils_API_HTMLInputCoder extends CRM_Utils_API_AbstractFieldCoder {
   }
 
   /**
-   * @param $values
+   * @param array $values
    * @param bool $castToString
-   *
-   * @return mixed|void
    */
   public function decodeOutput(&$values, $castToString = FALSE) {
     if (is_array($values)) {
index c1bd5c1f1b8041d2640ac4fde6adc50b5242004c..d9a115e9a2990102dd165cbecdfa134957aa3570 100644 (file)
@@ -44,7 +44,7 @@ class CRM_Utils_File {
    * @param string $name
    *   Name of file.
    *
-   * @return boolean
+   * @return bool
    *   true if file is ascii
    */
   public static function isAscii($name) {
@@ -72,7 +72,7 @@ class CRM_Utils_File {
    * @param string $name
    *   Name of file.
    *
-   * @return boolean
+   * @return bool
    *   true if file is html
    */
   public static function isHtml($name) {
@@ -177,10 +177,10 @@ class CRM_Utils_File {
   }
 
   /**
-   * @param $source
-   * @param $destination
+   * @param string $source
+   * @param string $destination
    */
-  static function copyDir($source, $destination) {
+  public static function copyDir($source, $destination) {
     if ($dh = opendir($source)) {
       @mkdir($destination);
       while (FALSE !== ($file = readdir($dh))) {
@@ -203,7 +203,7 @@ class CRM_Utils_File {
    * @param string $name
    *   Name of file.
    *
-   * @return boolean
+   * @return bool
    *   whether the file was recoded properly
    */
   public static function toUtf8($name) {
@@ -348,7 +348,7 @@ class CRM_Utils_File {
    * @param string $name
    *   Name of file.
    *
-   * @return boolean
+   * @return bool
    *   whether the file can be include()d or require()d
    */
   public static function isIncludable($name) {
index c3ad47b116b59e1e118b7d237d5e869d25b67be9..48b2529642c3bfebdc5e38aeb6f5067a63149604 100644 (file)
@@ -67,7 +67,7 @@ class CRM_Utils_Hook_Joomla extends CRM_Utils_Hook {
    *
    * @return mixed
    */
-  function invoke(
+  public function invoke(
     $numParams,
     &$arg1, &$arg2, &$arg3, &$arg4, &$arg5, &$arg6,
     $fnSuffix
index d076c10732af2ff69d17e84f04bb9878ab02f2f6..54fda7e2fd8a871932093119ea0378257919bd1b 100644 (file)
@@ -55,8 +55,8 @@ class CRM_Utils_Mail {
    * @param array $params
    *   (by reference).
    *
-   * @return boolean
-   *   true if a mail was sent, else false
+   * @return bool
+   *   TRUE if a mail was sent, else FALSE.
    */
   public static function send(&$params) {
     $returnPath = CRM_Core_BAO_MailSettings::defaultReturnPath();
@@ -91,12 +91,11 @@ class CRM_Utils_Mail {
       $headers = array_merge($headers, $params['headers']);
     }
     $headers['From'] = $params['from'];
-    $headers['To'] =
-      self::formatRFC822Email(
-        CRM_Utils_Array::value('toName', $params),
-        CRM_Utils_Array::value('toEmail', $params),
-        FALSE
-      );
+    $headers['To'] = self::formatRFC822Email(
+      CRM_Utils_Array::value('toName', $params),
+      CRM_Utils_Array::value('toEmail', $params),
+      FALSE
+    );
     $headers['Cc'] = CRM_Utils_Array::value('cc', $params);
     $headers['Bcc'] = CRM_Utils_Array::value('bcc', $params);
     $headers['Subject'] = CRM_Utils_Array::value('subject', $params);
@@ -200,7 +199,7 @@ class CRM_Utils_Mail {
    */
   public static function errorMessage($mailer, $result) {
     $message = '<p>' . ts('An error occurred when CiviCRM attempted to send an email (via %1). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt.', array(
-        1 => 'SMTP'
+        1 => 'SMTP',
       )) . '</p>' . '<p>' . ts('The mail library returned the following error message:') . '<br /><span class="font-red"><strong>' . $result->getMessage() . '</strong></span></p>' . '<p>' . ts('This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM &raquo; System Settings &raquo; Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are:') . '</p>';
 
     if (is_a($mailer, 'Mail_smtp')) {
@@ -211,7 +210,7 @@ class CRM_Utils_Mail {
     }
 
     $message .= '<li>' . ts('The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.') . '</li>' . '</ul>' . '<p>' . ts('Check <a href="%1">this page</a> for more information.', array(
-        1 => CRM_Utils_System::docURL2('user/advanced-configuration/email-system-configuration', TRUE)
+        1 => CRM_Utils_System::docURL2('user/advanced-configuration/email-system-configuration', TRUE),
       )) . '</p>';
 
     return $message;
@@ -274,8 +273,8 @@ class CRM_Utils_Mail {
   /**
    * Get the Active outBound email
    *
-   * @return boolean
-   *   true if valid outBound email configuration found, false otherwise
+   * @return bool
+   *   TRUE if valid outBound email configuration found, false otherwise.
    */
   public static function validOutBoundMail() {
     $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
index d13d2e1461fa2b43beab80df8dd5aacd3ceff332..d15ab20ec0750ef4579537b3f299a1fde6e146ae 100644 (file)
@@ -46,12 +46,12 @@ class CRM_Utils_Mail_EmailProcessor {
   /**
    * Process the default mailbox (ie. that is used by civiMail for the bounce)
    *
-   * @return boolean
-   *   always returns true (for the api). at a later stage we should
-   *                 fix this to return true on success / false on failure etc
+   * @return bool
+   *   Always returns true (for the api). at a later stage we should
+   *   fix this to return true on success / false on failure etc.
    */
   public static function processBounces() {
-    $dao = new CRM_Core_DAO_MailSettings;
+    $dao = new CRM_Core_DAO_MailSettings();
     $dao->domain_id = CRM_Core_Config::domainID();
     $dao->is_default = TRUE;
     $dao->find();
@@ -101,7 +101,7 @@ class CRM_Utils_Mail_EmailProcessor {
    * @return void
    */
   public static function processActivities() {
-    $dao = new CRM_Core_DAO_MailSettings;
+    $dao = new CRM_Core_DAO_MailSettings();
     $dao->domain_id = CRM_Core_Config::domainID();
     $dao->is_default = FALSE;
     $dao->find();
@@ -124,7 +124,7 @@ class CRM_Utils_Mail_EmailProcessor {
    * @return void
    */
   public static function process($civiMail = TRUE) {
-    $dao = new CRM_Core_DAO_MailSettings;
+    $dao = new CRM_Core_DAO_MailSettings();
     $dao->domain_id = CRM_Core_Config::domainID();
     $dao->find();
 
@@ -143,8 +143,8 @@ class CRM_Utils_Mail_EmailProcessor {
     // 0 = activities; 1 = bounce;
     $usedfor = $dao->is_default;
 
-    $emailActivityTypeId =
-      (defined('EMAIL_ACTIVITY_TYPE_ID') && EMAIL_ACTIVITY_TYPE_ID) ? EMAIL_ACTIVITY_TYPE_ID : CRM_Core_OptionGroup::getValue(
+    $emailActivityTypeId
+      (defined('EMAIL_ACTIVITY_TYPE_ID') && EMAIL_ACTIVITY_TYPE_ID) ? EMAIL_ACTIVITY_TYPE_ID : CRM_Core_OptionGroup::getValue(
         'activity_type',
         'Inbound Email',
         'name'
index 795b6541de3d053368bc66b9d1a1fa7fa726bc01..01371fe3c8302c7a0e90f9cd6130dd688dc69e9b 100644 (file)
@@ -401,10 +401,6 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
 
   /**
    * Rewrite various system urls to https
-   *
-   * @param null
-   *
-   * @return void
    */
   public function mapConfigToSSL() {
     global $base_url;
@@ -473,7 +469,8 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
       if (!$contactID) {
         return FALSE;
       }
-      else { //success
+      else {
+        //success
         if ($loadCMSBootstrap) {
           $bootStrapParams = array();
           if ($name && $password) {
@@ -515,7 +512,7 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
    * 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
    */
@@ -763,7 +760,7 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase {
   /**
    * Check is user logged in.
    *
-   * @return boolean
+   * @return bool
    */
   public function isUserLoggedIn() {
     $isloggedIn = FALSE;
index 30439814519cabcf1d4368155bfe6d6eb4d542c0..5d2f03fcc4e899f904a735f39009cc1e4b68dadf 100644 (file)
@@ -115,9 +115,7 @@ function civicrm_api3_custom_group_delete($params) {
  *   Array to search on.
  *
  * @return array
- * * {@getfields CustomGroup_get}
- * @example CustomGroupGet.php
- **/
+ */
 function civicrm_api3_custom_group_get($params) {
   return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
 }
index 5683f8593ae9e5d3527b345e1e3639e9482b61a4..7b534d3f51dd5b2052def8b43b5877eaa4f220a8 100644 (file)
@@ -59,9 +59,8 @@ function _civicrm_api3_message_template_create_spec(&$params) {
 /**
  * @param array $params
  *
- * @return boolean
- *   | error  true if successfull, error otherwise
- * {@getfields message_template_delete}
+ * @return bool
+ *   API result array
  */
 function civicrm_api3_message_template_delete($params) {
   return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
index 73c41662ee31367a666665168c6daaa142afc8bf..340a29d03ed9c7801601a87e4f4c38d5046daa7a 100644 (file)
@@ -131,9 +131,7 @@ function civicrm_api3_pledge_payment_get($params) {
  * Gets field for civicrm_pledge_payment functions
  *
  * @param array $params
- *
- * @return array
- *   fields valid for other functions
+ *   Modifiable list of fields allowed for the PledgePayment.get action.
  */
 function civicrm_api3_pledge_payment_get_spec(&$params) {
   $params['option.create_new'] = array('title' => "Create new field rather than update an unpaid payment");
index 15718c677d19d0dc7a4d95cdb5bec96e94aa8855..68d1101ba0529e27738eaeee146206feb0817630 100644 (file)
@@ -55,7 +55,7 @@ p.error {
 p.warning {
   padding: 0.5em;
   background-color: #e70;
-  border: 1px #A70 solid;
+  border: 1px #a70 solid;
   color: white;
   clear: both;
 }
index 0aa6e64bb7fcba50813822e5af35a78474a616ab..2d0582179d3c14bbfdb790a63dbe4c7c8e9589d9 100644 (file)
@@ -37,12 +37,12 @@ class CRM_Group_Page_AjaxTest extends CiviUnitTestCase {
     $this->_permissionedDisabledGroup = $this->groupCreate(array(
         'title' => 'pick-me-disabled',
         'is_active' => 0,
-        'name' => 'pick-me-disabled'
+        'name' => 'pick-me-disabled',
       ));
     $this->_permissionedGroup = $this->groupCreate(array(
         'title' => 'pick-me-active',
         'is_active' => 1,
-        'name' => 'pick-me-active'
+        'name' => 'pick-me-active',
       ));
     $this->groupCreate(array('title' => 'not-me-disabled', 'is_active' => 0, 'name' => 'not-me-disabled'));
     $this->groupCreate(array('title' => 'not-me-active', 'is_active' => 1, 'name' => 'not-me-active'));
index 6766f001656a943699515b843f8f2f9890338ecb..a6d31bd7e5a9ec04e4e6fcecc6a96d83e720182a 100644 (file)
@@ -519,18 +519,17 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase {
     $config = CRM_Core_Config::singleton();
     $config->keyDisable = TRUE;
 
-    $membershipRenewal = new CRM_Core_Form;
-    $membershipRenewal->controller = new CRM_Core_Controller;
+    $membershipRenewal = new CRM_Core_Form();
+    $membershipRenewal->controller = new CRM_Core_Controller();
     $isTestMembership = 0;
-    $MembershipRenew =
-      CRM_Member_BAO_Membership::renewMembershipFormWrapper(
-        $contactId,
-        $this->_membershipTypeID,
-        $isTestMembership,
-        $membershipRenewal,
-        NULL,
-        NULL
-      );
+    $MembershipRenew = CRM_Member_BAO_Membership::renewMembershipFormWrapper(
+      $contactId,
+      $this->_membershipTypeID,
+      $isTestMembership,
+      $membershipRenewal,
+      NULL,
+      NULL
+    );
     $endDate = date("Y-m-d", strtotime($membership->end_date . " +1 year"));
 
     $this->assertDBNotNull('CRM_Member_BAO_MembershipLog',
@@ -601,8 +600,8 @@ class CRM_Member_BAO_MembershipTest extends CiviUnitTestCase {
     $config = CRM_Core_Config::singleton();
     $config->keyDisable = TRUE;
 
-    $membershipRenewal = new CRM_Core_Form;
-    $membershipRenewal->controller = new CRM_Core_Controller;
+    $membershipRenewal = new CRM_Core_Form();
+    $membershipRenewal->controller = new CRM_Core_Controller();
     $MembershipRenew = CRM_Member_BAO_Membership::renewMembershipFormWrapper($contactId, $this->_membershipTypeID, $isTestMembership = 0, $membershipRenewal, NULL, NULL);
 
     $this->assertDBNotNull('CRM_Member_BAO_MembershipLog',
index 5df3bacd4931bb54e012f39ca42e09352dd617bc..0854f71ba582ad98f835cc6229a94d2234555081 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Pledge_AllTests extends CiviTestSuite {
    */
   private static function getInstance() {
     if (is_null(self::$instance)) {
-      self::$instance = new self;
+      self::$instance = new self();
     }
     return self::$instance;
   }
index 065347fbef88e6bad5164d61160835c9b9c5c18a..fd119a6d797f5f1b29a113d804a05c67ce01d320 100644 (file)
@@ -68,7 +68,7 @@ class WebTest_Case_CaseCustomFieldsTest 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);
 
@@ -209,7 +209,7 @@ class WebTest_Case_CaseCustomFieldsTest extends CiviSeleniumTestCase {
       $this->openCiviPage("admin/custom/group/field", array(
           'reset' => 1,
           'action' => 'browse',
-          'gid' => $customGrpId1
+          'gid' => $customGrpId1,
         ));
       $custom1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr[1]/td[8]/span/a[text()='Edit Field']/@href"));
       $custom1 = $custom1[1];
@@ -241,7 +241,7 @@ class WebTest_Case_CaseCustomFieldsTest extends CiviSeleniumTestCase {
       $this->openCiviPage("admin/custom/group/field", array(
           'reset' => 1,
           'action' => 'browse',
-          'gid' => $customGrpId1
+          'gid' => $customGrpId1,
         ));
       $custom1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr[1]/td[8]/span/a[text()='Edit Field']/@href"));
       $custom1 = $custom1[1];
@@ -268,7 +268,7 @@ class WebTest_Case_CaseCustomFieldsTest extends CiviSeleniumTestCase {
           'action' => 'delete',
           'reset' => '1',
           'gid' => $customGrpId1,
-          'id' => $cValue
+          'id' => $cValue,
         ));
       $this->clickLink("_qf_DeleteField_next-bottom");
     }
@@ -314,7 +314,7 @@ class WebTest_Case_CaseCustomFieldsTest 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 034fcfb51cbfc8386e0f0f2fdf06df4817b311c6..f1d51b8279c8062d1e7c5c17a4c34aa19ccee101 100644 (file)
@@ -50,7 +50,7 @@ class WebTest_Release_ReleaseTestCase extends CiviSeleniumTestCase {
    * @param string $dataName
    * @param array $browser
    */
-  function __construct($name = NULL, array$data = array(), $dataName = '', array$browser = array()) {
+  public function __construct($name = NULL, array$data = array(), $dataName = '', array$browser = array()) {
     parent::__construct($name, $data, $dataName, $browser);
 
     require_once 'CiviTest/ReleaseTestSettings.php';
index 60b50f7d7a1f015ad3fc9b9a6a4d2122fcd94855..a4bb9e14eaf5b4124db21b207767f25702e885bc 100644 (file)
@@ -132,7 +132,7 @@ class api_v3_CustomFieldTest extends CiviUnitTestCase {
 
   /**
    * Check for Each data type: loop through available form input types
-   **/
+   */
   public function testCustomFieldCreateAllAvailableFormInputs() {
     $gid = $this->customGroupCreate(array('extends' => 'Individual', 'title' => 'testAllFormInputs'));
 
@@ -242,11 +242,11 @@ class api_v3_CustomFieldTest extends CiviUnitTestCase {
 
     $this->assertTrue(is_numeric($optionGroupID) && ($optionGroupID > 0));
     $optionGroup = $this->callAPISuccess('option_group', 'getsingle', array(
-      'id' => $optionGroupID
+      'id' => $optionGroupID,
     ));
     $this->assertEquals($optionGroup['title'], 'Country');
     $optionValueCount = $this->callAPISuccess('option_value', 'getcount', array(
-      'option_group_id' => $optionGroupID
+      'option_group_id' => $optionGroupID,
     ));
     $this->assertEquals(0, $optionValueCount);
   }
@@ -451,14 +451,14 @@ class api_v3_CustomFieldTest extends CiviUnitTestCase {
     $contactGroup = $this->customGroupCreate(array('extends' => 'Contact', 'title' => 'test_group_c'));
     $contactField = $this->customFieldCreate(array(
         'custom_group_id' => $contactGroup['id'],
-        'label' => 'For Contacts'
+        'label' => 'For Contacts',
       ));
     $indivGroup = $this->customGroupCreate(array('extends' => 'Individual', 'title' => 'test_group_i'));
     $indivField = $this->customFieldCreate(array('custom_group_id' => $indivGroup['id'], 'label' => 'For Individuals'));
     $activityGroup = $this->customGroupCreate(array('extends' => 'Activity', 'title' => 'test_group_a'));
     $activityField = $this->customFieldCreate(array(
         'custom_group_id' => $activityGroup['id'],
-        'label' => 'For Activities'
+        'label' => 'For Activities',
       ));
 
     // Check getfields
index 26101bc05a8b1ae271dd17c1dffa1add59cf8bdd..676314cc5f1fcf7f16b3bca348632adf9a031243 100644 (file)
@@ -44,10 +44,6 @@ class api_v3_ProductTest extends CiviUnitTestCase {
     );
   }
 
-  //  function tearDown() {
-  //    $this->quickCleanup(array('civicrm_product'), TRUE);
-  //  }
-
   public function testGetFields() {
     $fields = $this->callAPISuccess($this->_entity, 'getfields', array('action' => 'create'));
     $this->assertArrayHasKey('period_type', $fields['values']);