more code tidy ups
authorEileen McNaughton <eileen@fuzion.co.nz>
Thu, 15 Jan 2015 04:06:51 +0000 (17:06 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Thu, 15 Jan 2015 04:06:51 +0000 (17:06 +1300)
16 files changed:
CRM/Activity/BAO/Activity.php
CRM/Admin/Form/Setting.php
CRM/Campaign/Form/Gotv.php
CRM/Contact/BAO/Contact.php
CRM/Contact/Form/Edit/Phone.php
CRM/Contact/Form/RelatedContact.php
CRM/Contact/Form/Task.php
CRM/Contact/Selector/Custom.php
CRM/Contribute/Controller/ContributionPage.php
CRM/Core/Controller/Simple.php
CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php
CRM/SMS/Form/Provider.php
api/v3/MailingEventConfirm.php
tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php
tests/phpunit/CRM/Extension/Container/AllTests.php
tests/phpunit/CRM/Utils/QueryFormatterTest.php

index 71d9810cb690c97c4342152e8f17e78a7df6a18c..50e65192e389b6d618291fd496cdb341a9fcb56a 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 
 /**
@@ -1711,7 +1710,7 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
   }
 
   /**
-   * get the Activities of a target contact
+   * Get the Activities of a target contact.
    *
    * @param int $contactId
    *   Id of the contact whose activities need to find.
@@ -1784,7 +1783,7 @@ WHERE      activity.id IN ($activityIds)";
   }
 
   /**
-   * Add activity for Membership/Event/Contribution
+   * Add activity for Membership/Event/Contribution.
    *
    * @param object $activity
    *   (reference) particular component object.
@@ -1903,13 +1902,13 @@ SELECT  display_name
   }
 
   /**
-   * Get Parent activity for currently viewed activity
+   * Get Parent activity for currently viewed activity.
    *
    * @param int $activityId
    *   Current activity id.
    *
    * @return int
-   *   $parentId  Id of parent activity otherwise false.
+   *   Id of parent activity otherwise false.
    */
   public static function getParentActivity($activityId) {
     static $parentActivities = array();
@@ -1931,7 +1930,7 @@ SELECT  display_name
   }
 
   /**
-   * Get total count of prior revision of currently viewd activity
+   * Get total count of prior revision of currently viewed activity.
    *
    * @param $activityID
    *   Current activity id.
index 35a60e44c8e3bb6cca068419ff8c8d0c13accd50..0740797e8a38f59ce8af97e6d69a802c2d5b9c35 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 
 /**
index dd2fb7833b992efe5d315f6b3cc7da2070af813d..f576b1225787b09c3876cdf2f103492416634870 100755 (executable)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 
 /**
index 2689c3ed56ad52b72ab817a7d32962023bd61784..428d173dfb088291b5a82466208b3b82804d0851 100644 (file)
@@ -1698,7 +1698,7 @@ WHERE id={$id}; ";
   }
 
   /**
-   * Return the primary location type of a contact
+   * Return the primary location type of a contact.
    *
    * $params int     $contactId contact_id
    * $params boolean $isPrimaryExist if true, return primary contact location type otherwise null
@@ -1766,7 +1766,7 @@ WHERE  civicrm_contact.id = %1 ";
   }
 
   /**
-   * Get the display name, primary email and location type of a contact
+   * Get the display name, primary email and location type of a contact.
    *
    * @param int $id
    *   Id of the contact.
@@ -1822,7 +1822,7 @@ ORDER BY civicrm_email.is_primary DESC";
    *   Specifies the default group to which contact is added.
    * @param int $ufGroupId
    *   Uf group id (profile id).
-   * @param ctype
+   * @param string $ctype
    * @param bool $visibility
    *   Basically lets us know where this request is coming from.
    *                                if via a profile from web, we restrict what groups are changed
@@ -1830,7 +1830,7 @@ ORDER BY civicrm_email.is_primary DESC";
    * @return int
    *   contact id created/edited
    */
-  static function createProfileContact(
+  public static function createProfileContact(
     &$params,
     &$fields,
     $contactID = NULL,
@@ -1922,6 +1922,8 @@ ORDER BY civicrm_email.is_primary DESC";
   }
 
   /**
+   * Format profile contact parameters.
+   *
    * @param array $params
    * @param $fields
    * @param int $contactID
@@ -1931,7 +1933,7 @@ ORDER BY civicrm_email.is_primary DESC";
    *
    * @return array
    */
-  static function formatProfileContactParams(
+  public static function formatProfileContactParams(
     &$params,
     &$fields,
     $contactID = NULL,
@@ -2292,9 +2294,10 @@ ORDER BY civicrm_email.is_primary DESC";
   }
 
   /**
-   * Find the get contact details
-   * does not respect ACLs for now, which might need to be rectified at some
-   * stage based on how its used
+   * Find the get contact details.
+   *
+   * This function does not respect ACLs for now, which might need to be rectified at some
+   * stage based on how its used.
    *
    * @param string $mail
    *   Primary email address of the contact.
@@ -2315,7 +2318,6 @@ SELECT     civicrm_contact.id as contact_id,
 FROM       civicrm_contact
 INNER JOIN civicrm_email    ON ( civicrm_contact.id = civicrm_email.contact_id )";
 
-
     if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME, 'uniq_email_per_site')) {
       // try to find a match within a site (multisite).
       $groups = CRM_Core_BAO_Domain::getChildGroupIds();
@@ -2346,7 +2348,7 @@ WHERE      civicrm_email.email = %1 AND civicrm_contact.is_deleted=0";
   }
 
   /**
-   * Find the contact details associated with an OpenID
+   * Find the contact details associated with an OpenID.
    *
    * @param string $openId
    *   OpenId of the contact.
@@ -2385,13 +2387,13 @@ WHERE      civicrm_openid.openid = %1";
   }
 
   /**
-   * Funtion to get primary email of the contact
+   * Get primary email of the contact.
    *
    * @param int $contactID
    *   Contact id.
    *
    * @return string
-   *   >email  email address if present else null
+   *   Email address if present else null
    */
   public static function getPrimaryEmail($contactID) {
     // fetch the primary email
@@ -2413,7 +2415,7 @@ LEFT JOIN civicrm_email    ON ( civicrm_contact.id = civicrm_email.contact_id )
   }
 
   /**
-   * Funtion to get primary OpenID of the contact
+   * Function to get primary OpenID of the contact.
    *
    * @param int $contactID
    *   Contact id.
@@ -2441,15 +2443,15 @@ AND       civicrm_openid.is_primary = 1";
   }
 
   /**
-   * Given the list of params in the params array, fetch the object
-   * and store the values in the values array
+   * Fetch the object and store the values in the values array.
    *
    * @param array $params
    *   Input parameters to find object.
    * @param array $values
    *   Output values of the object.
    *
-   * @return CRM_Contact_BAO_Contact|null the found object or null
+   * @return CRM_Contact_BAO_Contact|null
+   *   The found object or null
    */
   public static function getValues(&$params, &$values) {
     $contact = new CRM_Contact_BAO_Contact();
index 71c48d2b27c5f4ad67aa9ad6d66324997a72bdda..b48758e50d68d885dd737f6201ea73a7d2ea1350 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 
 /**
index 5ef9d24927f54ca00cac521a040a29c75c5a35fc..487da255cb841f576ccc9b9c90f8b96e91d28b99 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 
 /**
@@ -65,9 +64,7 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
   protected $_defaults = array();
 
   /**
-   * Build all the data structures needed to build the form
-   *
-   * @return void
+   * Build all the data structures needed to build the form.
    */
   public function preProcess() {
     // reset action from the session
index 134c6965207b79df788610b5b7f7e86fb95eb2c1..e9ca3c6caca3586df2175180cd4c19679b4bf699 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 
 /**
@@ -89,9 +88,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
   /**
    * Build all the data structures needed to build the form
    *
-   * @param
-   *
-   * @return void
+   * @param object $this
    */
   public function preProcess() {
     self::preProcessCommon($this);
@@ -338,17 +335,13 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
   }
 
   /**
-   * add the rules for form.
-   *
-   * @return void
+   * Add the rules for form.
    */
   public function addRules() {
   }
 
   /**
    * Build the form object
-   *
-   * @return void
    */
   public function buildQuickForm() {
     $this->addDefaultButtons(ts('Confirm Action'));
@@ -356,16 +349,14 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
 
   /**
    * Process the form after the input has been submitted and validated
-   *
-   *
-   * @return void
    */
   public function postProcess() {
   }
 
   /**
-   * Simple shell that derived classes can call to add buttons to
-   * the form with a customized title for the main Submit
+   * Simple shell that derived classes can call to add form buttons.
+   *
+   * Allows customized title for the main Submit
    *
    * @param string $title
    *   Title of the main button.
@@ -373,8 +364,6 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
    *   Button type for the form after processing.
    * @param string $backType
    * @param bool $submitOnce
-   *
-   * @return void
    */
   public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
     $this->addButtons(array(
index 7cefaae357f8967e572b89f11f8cdf3aa7145e00..4e8eed51e4b8de4a467dfc98991214ded59fea4f 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id: Selector.php 11510 2007-09-18 09:21:34Z lobo $
- *
  */
 
 /**
index 821173bde7c7f2f865a34d76fb8621be3370e7c3..12d8b8d15ac43f608dc3cbef4ecb583a8ed253b7 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 
 /**
index 0c7a4addfbce102b9f8dd6622f2bb5e1ce2058fc..7606058132e1a1060854a93600f070b6c8155d91 100644 (file)
@@ -34,7 +34,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
- *
  */
 class CRM_Core_Controller_Simple extends CRM_Core_Controller {
 
index 973242b41fcf40fdbde86cf09118e0a82268602a..c04fa9894c3e31dcc4cba993019c991301b3fd94 100644 (file)
@@ -7,7 +7,9 @@
 class CRM_Dedupe_BAO_QueryBuilder_IndividualSupervised extends CRM_Dedupe_BAO_QueryBuilder {
 
   /**
-   * @param $rg
+   * Record - what do I do?
+   *
+   * @param object $rg
    *
    * @return array
    */
@@ -35,7 +37,9 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualSupervised extends CRM_Dedupe_BAO_Qu
   }
 
   /**
-   * @param $rg
+   * Internal - what do I do.
+   *
+   * @param object $rg
    *
    * @return array
    */
index c6e532a617e791a82096834c7164f422c092ee3c..e3d1910624fadf676e52660d38e167cb3204ce98 100644 (file)
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2014
  * $Id: $
- *
  */
 
 /**
- *
+ * SMS Form.
  */
 class CRM_SMS_Form_Provider extends CRM_Core_Form {
   protected $_id = NULL;
index 902ab77489d3665720a3301e42500f338cc83cb8..60a34522e4c2c72c9aa3a42ac3f2da7ee4a327f0 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 /**
- * Handle a confirm event
+ * Handle a confirm event.
  *
  * @param array $params
  *   Associative array of property.
@@ -45,7 +45,6 @@
  * @throws Exception
  * @return array
  *   api result array
- * {@getfields mailing_event_confirm_create}
  */
 function civicrm_api3_mailing_event_confirm_create($params) {
 
index 76f4a7bd5f21b562ef20245e0f02f379eaf907f4..3cf45d7cd433f12861590b0aae116fbf69a24d0e 100644 (file)
@@ -43,7 +43,7 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
     require_once 'CiviTest/CiviMailUtils.php';
     $this->mut = new CiviMailUtils($this, TRUE);
 
-    $this->fixtures['rolling_membership'] = array(// createTestObject
+    $this->fixtures['rolling_membership'] = array(
       'membership_type_id' => array(
         'period_type' => 'rolling',
         'duration_unit' => 'month',
index 2eee6875bf6345ee07f4baa3c0dfdf4dc20b1eb9..6948c09426a3da67f9a11b43e7bb04474322b47a 100644 (file)
@@ -44,6 +44,7 @@ class CRM_Extension_Container_AllTests extends CiviTestSuite {
   private static $instance = NULL;
 
   /**
+   * Get instance.
    */
   private static function getInstance() {
     if (is_null(self::$instance)) {
index 574dd79f0a7d612a2634e280fb239647945a55cf..89dc6ceb641714a39f5f20a2d9e95e96b973d43c 100644 (file)
@@ -14,81 +14,81 @@ class CRM_Utils_QueryFormatterTest extends CiviUnitTestCase {
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_LIKE,
       CRM_Utils_QueryFormatter::MODE_NONE,
-      '%first second%'
+      '%first second%',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_LIKE,
       CRM_Utils_QueryFormatter::MODE_PHRASE,
-      '%first second%'
+      '%first second%',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_LIKE,
       CRM_Utils_QueryFormatter::MODE_WILDPHRASE,
-      '%first second%'
+      '%first second%',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_LIKE,
       CRM_Utils_QueryFormatter::MODE_WILDWORDS,
-      '%first%second%'
+      '%first%second%',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_LIKE,
       CRM_Utils_QueryFormatter::MODE_WILDWORDS_SUFFIX,
-      '%first%second%'
+      '%first%second%',
     );
 
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTS,
       CRM_Utils_QueryFormatter::MODE_NONE,
-      'first second'
+      'first second',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTS,
       CRM_Utils_QueryFormatter::MODE_PHRASE,
-      '"first second"'
+      '"first second"',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTS,
       CRM_Utils_QueryFormatter::MODE_WILDPHRASE,
-      '"*first second*"'
+      '"*first second*"',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTS,
       CRM_Utils_QueryFormatter::MODE_WILDWORDS,
-      '*first* *second*'
+      '*first* *second*',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTS,
       CRM_Utils_QueryFormatter::MODE_WILDWORDS_SUFFIX,
-      'first* second*'
+      'first* second*',
     );
 
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL,
       CRM_Utils_QueryFormatter::MODE_NONE,
-      '+first +second'
+      '+first +second',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL,
       CRM_Utils_QueryFormatter::MODE_PHRASE,
-      '+"first second"'
+      '+"first second"',
     );
     $cases[] = array(
       'first second',
       CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL,
       CRM_Utils_QueryFormatter::MODE_WILDPHRASE,
-      '+"*first second*"'
+      '+"*first second*"',
     );
     $cases[] = array(
       'first second',