INFRA 32 - Batch #17
authorWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 16 Jan 2015 06:42:31 +0000 (12:12 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 16 Jan 2015 06:42:31 +0000 (12:12 +0530)
57 files changed:
CRM/ACL/API.php
CRM/Activity/Import/Form/MapField.php
CRM/Batch/Form/Entry.php
CRM/Campaign/Form/Search.php
CRM/Campaign/Form/Survey/Main.php
CRM/Campaign/Form/Task/Interview.php
CRM/Case/XMLProcessor/Report.php
CRM/Contact/BAO/Contact/Permission.php
CRM/Contact/BAO/SavedSearch.php
CRM/Contact/Form/Location.php
CRM/Contact/Form/Search/Custom/Base.php
CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php
CRM/Contact/Form/Search/Custom/Group.php
CRM/Contact/Page/View/ContactSmartGroup.php
CRM/Contact/Page/View/UserDashBoard.php
CRM/Contribute/Form/AdditionalPayment.php
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/ContributionPage/Amount.php
CRM/Contribute/Form/Search.php
CRM/Contribute/Import/Parser/Contribution.php
CRM/Contribute/Page/Tab.php
CRM/Core/BAO/IM.php
CRM/Core/BAO/Location.php
CRM/Core/BAO/Navigation.php
CRM/Core/BAO/PaperSize.php
CRM/Core/BAO/PdfFormat.php
CRM/Core/BAO/WordReplacement.php
CRM/Core/CodeGen/Specification.php
CRM/Core/Payment/Form.php
CRM/Core/Permission.php
CRM/Event/BAO/ParticipantPayment.php
CRM/Event/Badge/Logo5395.php
CRM/Event/Form/Task/PickProfile.php
CRM/Event/Import/Form/MapField.php
CRM/Financial/Page/BatchTransaction.php
CRM/Mailing/MailStore/Mbox.php
CRM/Mailing/MailStore/Pop3.php
CRM/Member/BAO/MembershipStatus.php
CRM/Pledge/StateMachine/Search.php
CRM/Price/BAO/PriceSet.php
CRM/Price/Page/Set.php
CRM/Profile/Page/MultipleRecordFieldsListing.php
CRM/Profile/Page/Router.php
CRM/Report/Utils/Report.php
CRM/Utils/SQL/Select.php
api/v3/Contribution.php
api/v3/ContributionPage.php
api/v3/Pledge.php
api/v3/WordReplacement.php
bin/csv/export.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php
tests/phpunit/CRM/Contact/BAO/QueryTest.php
tests/phpunit/CRM/Queue/Queue/AllTests.php
tests/phpunit/WebTest/Contribute/OnBehalfOfOrganization.php
tests/phpunit/WebTest/Contribute/UpdateContributionTest.php
tests/phpunit/api/v3/CustomValueContactTypeTest.php
tests/phpunit/api/v3/SurveyTest.php

index 0ceb4b124da8f25c83d0faf240192b5db29ecbf4..4a85ba1dda5499a9e6fbc685ddc53292c38c94bf 100644 (file)
@@ -54,7 +54,7 @@ class CRM_ACL_API {
    * @param int $contactID
    *   The contactID for whom the check is made.
    *
-   * @return boolean
+   * @return bool
    *   true if yes, else false
    */
   public static function check($str, $contactID = NULL) {
@@ -208,7 +208,7 @@ class CRM_ACL_API {
     //adding a way for unit tests to flush the cache
     if ($flush) {
       $cache = array();
-      return;
+      return NULL;
     }
     if (!$contactID) {
       $session = CRM_Core_Session::singleton();
index c1fdd6014ab613d0220b878cc1c24c8697589ba8..6ce40979d3973c09f859cd150920827f4251375d 100644 (file)
@@ -72,7 +72,7 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField {
       'activity_type_id',
       'activity_label',
       'target_contact_id',
-      'activity_subject'
+      'activity_subject',
     );
     foreach ($requiredFields as $val) {
       $highlightedFields[] = $val;
@@ -195,7 +195,7 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField {
             $defaults["mapper[$i]"] = array(
               $this->defaultFromHeader($this->_columnHeaders[$i],
                 $headerPatterns
-              )
+              ),
             );
           }
           else {
index 0673689d4478b37848a3472bb9e7b59342006ce5..854ca2ba758197240682e2838b94ef14da00dffb 100755 (executable)
@@ -202,7 +202,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
     for ($rowNumber = 1; $rowNumber <= $this->_batchInfo['item_count']; $rowNumber++) {
       $this->addEntityRef("primary_contact_id[{$rowNumber}]", '', array(
           'create' => TRUE,
-          'placeholder' => ts('- select -')
+          'placeholder' => ts('- select -'),
         ));
 
       // special field specific to membership batch udpate
@@ -253,7 +253,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
         'contact' => array(
           'return' => implode(',', $contactReturnProperties),
           'fieldmap' => array_flip($contactReturnProperties),
-        )
+        ),
       ));
 
     // don't set the status message when form is submitted.
index a36fb93d6d35d643104b83dc2ceac7b9b8e2fc2a..5d16dfc5de30b0a62e54f745726834b64cd7488b 100755 (executable)
@@ -74,7 +74,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search {
    *
    * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     $this->_done = FALSE;
     $this->_defaults = array();
 
@@ -96,7 +96,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search {
     if (!in_array($this->_operation, array(
       'reserve',
       'release',
-      'interview'
+      'interview',
     ))
     ) {
       $this->_operation = 'reserve';
@@ -232,7 +232,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search {
         $taskValue = array(
           $currentTaskValue => ts('Record %1 Responses',
             array(1 => $activityTypes[$surveyTypeId])
-          )
+          ),
         );
       }
 
@@ -356,7 +356,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search {
     $contactType = CRM_Campaign_BAO_Survey::getSurveyContactType(CRM_Utils_Array::value('campaign_survey_id', $this->_formValues));
     if ($contactType && in_array($this->_operation, array(
         'reserve',
-        'interview'
+        'interview',
       ))
     ) {
       $this->_formValues['contact_type'][$contactType] = 1;
index 84ab2f6a47a464657c17c56b1a5ff47862bb1fe6..8163555c9865da8b0722c6625741c103169cfddf 100644 (file)
@@ -104,8 +104,6 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey {
    * 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
    */
@@ -143,8 +141,6 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey {
   /**
    * Build the form object
    *
-   * @param null
-   *
    * @return void
    */
   public function buildQuickForm() {
@@ -190,8 +186,6 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey {
   /**
    * Process the form
    *
-   * @param null
-   *
    * @return void
    */
   public function postProcess() {
@@ -229,7 +223,7 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey {
           1 => array(
             $this->_values['result_id'],
             'Positive',
-          )
+          ),
         )
       );
       // delete option group if no any survey is using it.
index 99f77408d3a9a461d9e7d5d517aa574b1496a98c..e742e619c4064708b2c5c381e0bf66c6f137ae20 100755 (executable)
@@ -108,8 +108,8 @@ class CRM_Campaign_Form_Task_Interview extends CRM_Campaign_Form_Task {
       $orderByParams = CRM_Utils_Array::value('order_bys', $_POST);
     }
     elseif (CRM_Core_OptionGroup::getValue('activity_type', 'WalkList') == $this->_surveyDetails['activity_type_id']) {
-      $orderByParams =
-        array(
+      $orderByParams
+        array(
           1 => array(
             'column' => 'civicrm_address.street_name',
             'order' => 'ASC',
@@ -288,8 +288,8 @@ WHERE {$clause}
   public function buildQuickForm() {
     $this->assign('surveyTypeId', $this->_surveyTypeId);
 
-    $options =
-      array(
+    $options
+      array(
         '' => ' - none - ',
         'civicrm_address.street_name' => 'Street Name',
         'civicrm_address.street_number%2' => 'Odd / Even Street Number',
@@ -408,8 +408,8 @@ WHERE {$clause}
     }
 
     if (CRM_Core_OptionGroup::getValue('activity_type', 'WalkList') == $this->_surveyDetails['activity_type_id']) {
-      $defaults['order_bys'] =
-        array(
+      $defaults['order_bys']
+        array(
           1 => array(
             'column' => 'civicrm_address.street_name',
             'order' => 'ASC',
@@ -429,8 +429,8 @@ WHERE {$clause}
         );
     }
     else {
-      $defaults['order_bys'] =
-        array(
+      $defaults['order_bys']
+        array(
           1 => array(
             'column' => 'contact_a.sort_name',
             'order' => 'ASC',
index d5dded61d2b288bebfe1e3f57c6941a0ed6cf761..5408b52a98f27943d00fb9799445e502525734f2 100644 (file)
@@ -68,7 +68,7 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor {
   public function &getRedactionRules() {
     foreach (array(
                'redactionStringRules',
-               'redactionRegexRules'
+               'redactionRegexRules',
              ) as $key => $rule) {
       $$rule = CRM_Case_PseudoConstant::redactionRule($key);
 
@@ -96,7 +96,7 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor {
    *
    * @return array
    */
-  function &caseInfo(
+  public function &caseInfo(
     $clientID,
     $caseID
   ) {
@@ -323,7 +323,7 @@ WHERE      a.id = %1
       $clientID = CRM_Utils_Type::escape($clientID, 'Integer');
       if (!in_array($activityTypeInfo['name'], array(
         'Email',
-        'Inbound Email'
+        'Inbound Email',
       ))
       ) {
         $activity['editURL'] = CRM_Utils_System::url('civicrm/case/activity',
@@ -637,7 +637,7 @@ AND    cg.extends = 'Activity'";
         1 => array(
           $activityTypeID,
           'Integer',
-        )
+        ),
       );
       $dao = CRM_Core_DAO::executeQuery($query, $params);
 
index e9b4355b03d37b9e89d12a99f57a677d6814703d..04f36414bd4b82458095605225b58ffc0f46e662 100644 (file)
@@ -41,7 +41,7 @@ class CRM_Contact_BAO_Contact_Permission {
    *   Contact id.
    * @param int|string $type the type of operation (view|edit)
    *
-   * @return boolean
+   * @return bool
    *   true if the user has permission, false otherwise
    */
   public static function allow($id, $type = CRM_Core_Permission::VIEW) {
@@ -143,8 +143,6 @@ ON DUPLICATE KEY UPDATE
 
     CRM_Core_DAO::executeQuery('DELETE FROM civicrm_acl_contact_cache WHERE contact_id IN (SELECT id FROM civicrm_contact WHERE is_deleted = 1)');
     $_processed[$userID] = 1;
-
-    return;
   }
 
   /**
@@ -154,9 +152,9 @@ ON DUPLICATE KEY UPDATE
    * @param int $contactID
    *   Contact id.
    *
-   * @return boolean
+   * @return bool
    */
-  static function hasContactsInCache(
+  public static function hasContactsInCache(
     $type = CRM_Core_Permission::VIEW,
     $contactID = NULL
   ) {
index 35818a546651b16671c44f7e999b2e1e5027d1f7..fe1f399a78e0b01438775f0d5ce8d5b0fe13a631 100644 (file)
@@ -254,8 +254,6 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
         $this->where_tables = serialize($whereTables);
       }
     }
-
-    return;
   }
 
   public function save() {
index 008291f0418eb7525c1863f2a5e853a93842e6cc..8c2f938740bd1af5b62e08199f44cc8561960386 100644 (file)
@@ -56,7 +56,7 @@ class CRM_Contact_Form_Location {
     $className = CRM_Utils_System::getClassName($form);
     if (in_array($className, array(
       'CRM_Event_Form_ManageEvent_Location',
-      'CRM_Contact_Form_Domain'
+      'CRM_Contact_Form_Domain',
     ))) {
       $form->_blocks = array(
         'Address' => ts('Address'),
index cca35084f2123b249f6b7db219a6f7cc32f77b58..dd1d45bc3ac4d52a834863245e0d683b0ab51a41 100644 (file)
@@ -95,7 +95,7 @@ class CRM_Contact_Form_Search_Custom_Base {
    *
    * @return string
    */
-  function sql(
+  public function sql(
     $selectClause,
     $offset = 0,
     $rowcount = 0,
index a1f3153f859a16bb007c39eeb61edccc5f94e73d..814360b6a3363666f1991a6a6588c0703e688593 100644 (file)
@@ -161,9 +161,9 @@ $sqlStatement
           }
 
           $query = $tableValues + array(
-              'text' => CRM_Utils_QueryFormatter::singleton()
-                ->format($queryText, CRM_Utils_QueryFormatter::LANG_SOLR),
-            );
+            'text' => CRM_Utils_QueryFormatter::singleton()
+            ->format($queryText, CRM_Utils_QueryFormatter::LANG_SOLR),
+          );
           list($intLimit, $intOffset) = $this->parseLimitOffset($limit);
           $files = $searcher->search($query, $intLimit, $intOffset);
           $matches = array();
index 53ebf0e47b147f19d11720ddaa331f3ad38b0b1c..66ea3e178604259fa30c11f52dc79afe3e016d8d 100644 (file)
@@ -68,8 +68,6 @@ class CRM_Contact_Form_Search_Custom_Group
     $this->_groups = FALSE;
     $this->_tags = FALSE;
     $this->_andOr = CRM_Utils_Array::value('andOr', $this->_formValues);
-
-
     //make easy to check conditions for groups and tags are
     //selected or it is empty search
     if (empty($this->_includeGroups) && empty($this->_excludeGroups) &&
@@ -183,7 +181,7 @@ class CRM_Contact_Form_Search_Custom_Group
    *
    * @return string
    */
-  function all(
+  public function all(
     $offset = 0, $rowcount = 0, $sort = NULL,
     $includeContactIDs = FALSE, $justIDs = FALSE
   ) {
@@ -354,8 +352,6 @@ WHERE  gcc.group_id = {$ssGroup->id}
                  SELECT              civicrm_contact.id as contact_id, ''
                  FROM                civicrm_contact";
       }
-
-
       //used only when exclude group is selected
       if ($xGroups != 0) {
         $includeGroup .= " LEFT JOIN        Xg_{$this->_tableName}
index 7ac5c0a5f4a5900031128981aa13bcde6f129813..5d88beabe14d633d02c1714293fcf53f7518c239 100644 (file)
@@ -42,7 +42,6 @@ class CRM_Contact_Page_View_ContactSmartGroup extends CRM_Core_Page {
   /**
    * called when action is browse
    *
-   * @return null
    */
   public function browse() {
     $in = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Added');
index a14f730d4c59344e1a6512d467680468db5d3bcb..c769dc5a37f0b5d3aff751ac2129442f695b65ea 100644 (file)
@@ -176,7 +176,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
         'sectionTitle' => ts('Your Assigned Activities'),
         'weight' => 5,
       );
-      $userDashboard = new CRM_Activity_Page_UserDashboard;
+      $userDashboard = new CRM_Activity_Page_UserDashboard();
       $userDashboard->run();
     }
 
@@ -214,7 +214,6 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
    * @return array
    *   (reference) of action links
    */
-  static
   public function &links() {
     if (!(self::$_links)) {
       $disableExtra = ts('Are you sure you want to disable this relationship?');
index 96aa20b062f476da45305cf235119a9de1f0d70d..806e5062ebd1ed21fd30f2e656f55f9b40ebecb2 100644 (file)
@@ -161,7 +161,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
    */
   public function setDefaultValues() {
     if ($this->_view == 'transaction' && ($this->_action & CRM_Core_Action::BROWSE)) {
-      return;
+      return NULL;
     }
     $defaults = array();
     if ($this->_mode) {
@@ -333,8 +333,6 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
         ),
       )
     );
-
-
     $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
       'mailing_backend'
     );
@@ -429,8 +427,8 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
 
     //get the payment processor id as per mode.
     //@todo unclear relevance of mode - seems like a lot of duplicated params here!
-    $this->_params['payment_processor'] = $params['payment_processor_id'] =
-      $this->_params['payment_processor_id'] = $submittedValues['payment_processor_id'] = $this->_paymentProcessor['id'];
+    $this->_params['payment_processor'] = $params['payment_processor_id']
+      $this->_params['payment_processor_id'] = $submittedValues['payment_processor_id'] = $this->_paymentProcessor['id'];
 
     $now = date('YmdHis');
     $fields = array();
index 66cf5f3cb7b113a1aa31731c345132bdf7c73be3..446e2ad7cb0bad65b90cfc158c0763ead7f8c41f 100644 (file)
@@ -664,7 +664,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     if ($this->_context == 'standalone') {
       $this->addEntityRef('contact_id', ts('Contact'), array(
           'create' => TRUE,
-          'api' => array('extra' => array('email'))
+          'api' => array('extra' => array('email')),
         ), TRUE);
     }
 
@@ -1550,8 +1550,8 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     );
 
     //get the payment processor id as per mode.
-    $this->_params['payment_processor'] = $params['payment_processor_id'] =
-      $this->_params['payment_processor_id'] = $submittedValues['payment_processor_id'] = $this->_paymentProcessor['id'];
+    $this->_params['payment_processor'] = $params['payment_processor_id']
+      $this->_params['payment_processor_id'] = $submittedValues['payment_processor_id'] = $this->_paymentProcessor['id'];
 
     $now = date('YmdHis');
     $fields = array();
@@ -1762,8 +1762,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       $this->_id,
       'Contribution'
     );
-
-
     if (empty($paymentParams['is_recur'])) {
       $contribution = CRM_Contribute_Form_Contribution_Confirm::processContribution($this,
         $this->_params,
@@ -1818,7 +1816,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
   /**
    * @param array $paymentParams
    *
-   * @return array
    */
   public function cleanupDBAfterPaymentFailure($paymentParams, $message) {
     //make sure to cleanup db for recurring case.
index 7a5ceec45dc24958cbf369670d7b694ce26bfb1b..be4ce875002aac317e102ba7255f8bd9be72c080 100644 (file)
@@ -152,7 +152,7 @@ SELECT id
     }
     $this->add('select', 'price_set_id', ts('Price Set'),
       array(
-        '' => ts('- none -')
+        '' => ts('- none -'),
       ) + $price,
       NULL, array('onchange' => "showHideAmountBlock( this.value, 'price_set_id' );")
     );
@@ -210,7 +210,7 @@ SELECT id
               'html_type',
               'name',
               'is_active',
-              'label'
+              'label',
             ));
           foreach ($priceFields as $priceField) {
             if ($priceField['id'] && $priceField['html_type'] == 'Radio' && $priceField['name'] == 'contribution_amount') {
@@ -466,7 +466,7 @@ SELECT id
 
       if (in_array($field, array(
         'min_amount',
-        'max_amount'
+        'max_amount',
       ))) {
         $val = CRM_Utils_Rule::cleanMoney($val);
       }
index d34a4ae25e3a270675f0bf9c2bf8a4a74b46fd82..9f50f5cccf32693d1fc59545532ac15f607d73d2 100644 (file)
@@ -75,7 +75,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
    *
    * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     $this->set('searchFormName', 'Search');
 
     /**
@@ -260,7 +260,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
 
     foreach (array(
                'contribution_amount_low',
-               'contribution_amount_high'
+               'contribution_amount_high',
              ) as $f) {
       if (isset($this->_formValues[$f])) {
         $this->_formValues[$f] = CRM_Utils_Rule::cleanMoney($this->_formValues[$f]);
@@ -274,7 +274,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
         'contribution_soft_credit_type_id',
         'contribution_status_id',
         'contribution_source',
-        'contribution_trxn_id'
+        'contribution_trxn_id',
       );
       foreach ($specialParams as $element) {
         $value = CRM_Utils_Array::value($element, $this->_formValues);
index 3ac33c18556f6771736abdfbc4162d9eb5913d7b..40ed6325ebc189ea814b2fa0efc2024e98785867 100644 (file)
@@ -140,7 +140,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa
    * @param array $values
    *   The array of values belonging to this line.
    *
-   * @return boolean
+   * @return bool
    */
   public function mapField(&$values) {
     return CRM_Import_Parser::VALID;
@@ -152,7 +152,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa
    * @param array $values
    *   The array of values belonging to this line.
    *
-   * @return boolean
+   * @return bool
    *   the result of this processing
    */
   public function preview(&$values) {
@@ -165,7 +165,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa
    * @param array $values
    *   The array of values belonging to this line.
    *
-   * @return boolean
+   * @return bool
    *   the result of this processing
    */
   public function summary(&$values) {
@@ -244,7 +244,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa
    * @param array $values
    *   The array of values belonging to this line.
    *
-   * @return boolean
+   * @return bool
    *   the result of this processing
    */
   public function import($onDuplicate, &$values) {
index 1d1ba4f993b25344f2542f59de13d3aadaf38585..12a8f68c06d6c65d6116c8a2734b15d996aa5ded 100644 (file)
@@ -104,7 +104,6 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
   /**
    * called when action is browse
    *
-   * @return null
    */
   public function browse() {
     // add annual contribution
@@ -252,7 +251,7 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
       if (empty($this->_contactId)) {
         $this->_contactId = civicrm_api3('contribution', 'getvalue', array(
             'id' => $this->_id,
-            'return' => 'contact_id'
+            'return' => 'contact_id',
           ));
       }
       $this->assign('contactId', $this->_contactId);
index 9e5b1788fbe4bc001d4a9c56dfa88f6ffedf83b1..2371436d10a0fa87100e19831406ef8d834327a2 100644 (file)
@@ -63,9 +63,9 @@ class CRM_Core_BAO_IM extends CRM_Core_DAO_IM {
    * Given the list of params in the params array, fetch the object
    * and store the values in the values array
    *
-   * @param array entityBlock input parameters to find object
+   * @param array $entityBlock input parameters to find object
    *
-   * @return boolean
+   * @return bool
    */
   public static function &getValues($entityBlock) {
     return CRM_Core_BAO_Block::getValues('im', $entityBlock);
@@ -137,12 +137,8 @@ ORDER BY
     if (empty($entityElements)) {
       return NULL;
     }
-
-
     $entityId = $entityElements['entity_id'];
     $entityTable = $entityElements['entity_table'];
-
-
     $sql = "SELECT cim.name as im, ltype.name as locationType, cim.is_primary as is_primary, cim.id as im_id, cim.location_type_id as locationTypeId
 FROM civicrm_loc_block loc, civicrm_im cim, civicrm_location_type ltype, {$entityTable} ev
 WHERE ev.id = %1
index aed679ab98c901320199ffcbc0c6ca61288af11d..33f234af3be4507bfd30fdc7c0da0d189325c573 100644 (file)
@@ -109,7 +109,7 @@ class CRM_Core_BAO_Location extends CRM_Core_DAO {
                'phone',
                'email',
                'im',
-               'address'
+               'address',
              ) as $loc) {
       $locBlock["{$loc}_id"] = !empty($location["$loc"][0]) ? $location["$loc"][0]->id : NULL;
       $locBlock["{$loc}_2_id"] = !empty($location["$loc"][1]) ? $location["$loc"][1]->id : NULL;
@@ -216,7 +216,7 @@ WHERE e.id = %1";
    * @param array $params
    *   (reference ) an assoc array of name/value pairs.
    *
-   * @return boolean
+   * @return bool
    */
   public static function dataExists(&$params) {
     // return if no data present
@@ -368,7 +368,7 @@ WHERE e.id = %1";
                'IM',
                'Phone',
                'Address',
-               'OpenID'
+               'OpenID',
              ) as $block) {
       $name = strtolower($block);
       if (array_key_exists($name, $primaryLocBlockIds) &&
index 28b1f5b4482b9fe09f8f0e997dcfe87005b06001..b12eb19051f9130c4483a92ff956af38db20ab42 100644 (file)
@@ -84,7 +84,7 @@ class CRM_Core_BAO_Navigation extends CRM_Core_DAO_Navigation {
   /**
    * Add/update navigation record
    *
-   * @param array associated array of submitted values
+   * @param $params associated array of submitted values
    *
    * @return object
    *   navigation object
@@ -312,7 +312,7 @@ ORDER BY parent_id, weight";
           'parentID' => $navigation->parent_id,
           'navID' => $navigation->id,
           'active' => $navigation->is_active,
-        )
+        ),
       );
       self::buildNavigationTree($navigationTree[$navigation->id]['child'], $navigation->id, $navigationMenu);
     }
@@ -493,7 +493,7 @@ ORDER BY parent_id, weight";
     //we need to check core view/edit or supported acls.
     if (in_array($menuName, array(
       'Search...',
-      'Contacts'
+      'Contacts',
     ))) {
       if (!CRM_Core_Permission::giveMeAllACLs()) {
         $skipMenuItems[] = $navID;
index 8a323498a6c5d35d6aea2bb13141fdab8937f883..2608314c1965e9053903fa8fe124ab7cba0e5f8b 100644 (file)
@@ -70,8 +70,6 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
   /**
    * Get Option Group ID for Paper Sizes
    *
-   * @param void
-   *
    * @return int
    *   Group ID (null if Group ID doesn't exist)
    */
@@ -92,8 +90,6 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
    * @param string $returnURL
    *   URL of page calling this function.
    *
-   * @return array
-   *   (reference)   List of Paper Sizes
    */
   public static function &addOrder(&$list, $returnURL) {
     $filter = "option_group_id = " . self::_getGid();
@@ -133,8 +129,6 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
   /**
    * Retrieve the default Paper Size values
    *
-   * @param NULL
-   *
    * @return array
    *   Name/value pairs containing the default Paper Size values.
    */
index 166bf8a4069eb63bf60a4a7e72dc8c4473bb1d2a..c13df3de6ec107400da6b5a2194486bf598c6c54 100644 (file)
@@ -97,8 +97,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Get page orientations recognized by the DOMPDF package used to create PDF letters.
    *
-   * @param void
-   *
    * @return array
    *   array of page orientations
    */
@@ -112,8 +110,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Get measurement units recognized by the DOMPDF package used to create PDF letters.
    *
-   * @param void
-   *
    * @return array
    *   array of measurement units
    */
@@ -129,8 +125,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Get Option Group ID for PDF Page Formats
    *
-   * @param void
-   *
    * @return int
    *   Group ID (null if Group ID doesn't exist)
    */
@@ -191,8 +185,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Get the default PDF Page Format values
    *
-   * @param NULL
-   *
    * @return array
    *   Name/value pairs containing the default PDF Page Format values.
    */
index 82527f3b7f12466bb71171ca4f4f95b31a050ab9..eee35c7b5d81a9969b5c19f0cd49a0804a184df3 100644 (file)
@@ -60,7 +60,6 @@ class CRM_Core_BAO_WordReplacement extends CRM_Core_DAO_WordReplacement {
    *
    * @return CRM_Core_DAO_WordRepalcement
    */
-
   public static function retrieve(&$params, &$defaults) {
     return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_WordRepalcement', $params, $defaults);
   }
index f6f09d398064c9ad2bf94f89e4c272bdf1e3bff9..c1b528cc780a0e9f9f4aec0ddd76e65479f34aea 100644 (file)
@@ -47,8 +47,8 @@ class CRM_Core_CodeGen_Specification {
           foreach ($table['foreignKey'] as $fkName => $fkValue) {
             if ($this->tables[$fkValue['table']]['archive'] == 'true') {
               $table['foreignKey'][$fkName]['table'] = 'archive_' . $table['foreignKey'][$fkName]['table'];
-              $table['foreignKey'][$fkName]['uniqName'] =
-                str_replace('FK_', 'FK_archive_', $table['foreignKey'][$fkName]['uniqName']);
+              $table['foreignKey'][$fkName]['uniqName']
+                str_replace('FK_', 'FK_archive_', $table['foreignKey'][$fkName]['uniqName']);
             }
           }
           $archiveTables[$name] = $table;
@@ -274,7 +274,6 @@ class CRM_Core_CodeGen_Specification {
     }
 
     $tables[$name] = &$table;
-    return;
   }
 
   /**
@@ -303,7 +302,7 @@ class CRM_Core_CodeGen_Specification {
         $field['cols'] = isset($fieldXML->html) ? $this->value('cols', $fieldXML->html) : NULL;
         break;
 
-        break;
+      break;
 
       case 'datetime':
         $field['sqlType'] = $field['phpType'] = $type;
index edf530427c1c67536f65821b35ee69ebafac6e93..6b7b5c4e3900eb04d297bb36ae634a422338f35b 100644 (file)
@@ -159,9 +159,9 @@ class CRM_Core_Payment_Form {
       'title' => ts('Country'),
       'cc_field' => TRUE,
       'attributes' => array(
-          '' => ts('- select -')
-        ) +
-        CRM_Core_PseudoConstant::country(),
+        '' => ts('- select -'),
+      ) +
+      CRM_Core_PseudoConstant::country(),
       'is_required' => TRUE,
     );
     //CRM-15509 working towards giving control over billing fields to payment processors. For now removing tpl hard-coding
@@ -265,7 +265,7 @@ class CRM_Core_Payment_Form {
     // which was previously available only in some form flows
     if (!empty($form->_paymentProcessor) && !empty($form->_paymentProcessor['object']) && $form->_paymentProcessor['object']->isSupported('buildForm')) {
       $form->_paymentProcessor['object']->buildForm($form);
-      return;
+      return NULL;
     }
 
     self::setPaymentFieldsByProcessor($form, $processor, empty($isBillingDataOptional));
index 9b4ca59a07081e71ddafadccb9ff1d6a40f60521..23969c6ca5a89e6e52240fd6d66c887557855a35 100644 (file)
@@ -114,7 +114,7 @@ class CRM_Core_Permission {
    *    array('access CiviEvent', 'access CiviContribute')
    *  ),
    *
-   * @return boolean
+   * @return bool
    *   true if yes, else false
    */
   public static function check($permissions) {
@@ -162,7 +162,7 @@ class CRM_Core_Permission {
    * @param array $array
    *   The group/role to check.
    *
-   * @return boolean
+   * @return bool
    *   true if yes, else false
    */
   public static function checkGroupRole($array) {
@@ -673,8 +673,8 @@ class CRM_Core_Permission {
    * Validate user permission across
    * edit or view or with supportable acls.
    *
-   * @return boolean
-   **/
+   * @return bool
+   */
   public static function giveMeAllACLs() {
     if (CRM_Core_Permission::check('view all contacts') ||
       CRM_Core_Permission::check('edit all contacts')
index 7f7749190b22d1f95ab178edd2a0681066a2168a..d7c40e1a6d566a0c6b0b917dd126e1b48b167496 100644 (file)
@@ -76,8 +76,8 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment
     $lineItemCount = CRM_Core_DAO::singleValueQuery("select count(*) FROM civicrm_line_item WHERE contribution_id = %1", array(
         1 => array(
           $participantPayment->contribution_id,
-          'Integer'
-        )
+          'Integer',
+        ),
       ));
     if ($lineItemCount == 1) {
       $sql = "UPDATE civicrm_line_item li
@@ -85,7 +85,7 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment
       WHERE contribution_id = %2 AND entity_table = 'civicrm_contribution'";
       CRM_Core_DAO::executeQuery($sql, array(
           1 => array($participantPayment->participant_id, 'Integer'),
-          2 => array($participantPayment->contribution_id, 'Integer')
+          2 => array($participantPayment->contribution_id, 'Integer'),
         ));
     }
 
@@ -99,7 +99,7 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment
    * @param array $params
    *   Associative array whose values match the record to be deleted.
    *
-   * @return boolean
+   * @return bool
    *   true if deleted false otherwise
    */
   public static function deleteParticipantPayment($params) {
index 59d1d18231c30a0d8968176921426934679d3aca..a8200887bf5cad111fbfaa9fea4a5668abe62877 100644 (file)
@@ -44,7 +44,7 @@ class CRM_Event_Badge_Logo5395 extends CRM_Event_Badge {
         'cap' => 'round',
         'join' => 'round',
         'dash' => '2,2',
-        'color' => array(0, 0, 200)
+        'color' => array(0, 0, 200),
       ));
 
     $this->pdf->SetFontSize(9);
index f6c45b5e4e02af5fd23f0e1790699fedc62f7754..53c2ad11bc5f09c04bd5219d027663a5581e5a29 100644 (file)
@@ -99,7 +99,7 @@ class CRM_Event_Form_Task_PickProfile extends CRM_Event_Form_Task {
 
     $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'),
       array(
-        '' => ts('- select profile -')
+        '' => ts('- select profile -'),
       ) + $profiles, TRUE
     );
     $this->addDefaultButtons(ts('Continue'));
index e4ac8a1f39ebf37be4fb88a02003b707b55bca27..192c5adafd8ac8fabdd98daa3f235a70586d4010 100644 (file)
@@ -87,7 +87,7 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField {
         'first_name',
         'last_name',
         'external_identifier',
-        'participant_status_id'
+        'participant_status_id',
       );
       foreach ($highlightedFieldsArray as $name) {
         $highlightedFields[] = $name;
@@ -158,8 +158,6 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField {
     $headerPatterns = $this->get('headerPatterns');
     $dataPatterns = $this->get('dataPatterns');
     $hasLocationTypes = $this->get('fieldTypes');
-
-
     /* Initialize all field usages to false */
 
     foreach ($mapperKeys as $key) {
@@ -343,7 +341,7 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField {
             }
             else {
               $errors['_qf_default'] .= ts('Missing required contact matching fields.') . " $fieldMessage " . ts('(Sum of all weights should be greater than or equal to threshold: %1).', array(
-                  1 => $threshold
+                  1 => $threshold,
                 )) . ' ' . ts('Or Provide Contact ID or External ID.') . '<br />';
             }
           }
index 0b03eaf08be375ac8df822f906ce628923a01726..e613cd4773bf43d11c68b819a791c4a5fc62b420 100644 (file)
@@ -104,8 +104,8 @@ class CRM_Financial_Page_BatchTransaction extends CRM_Core_Page_Basic {
     if (isset(self::$_entityID)) {
       $statusID = CRM_Core_DAO::getFieldValue('CRM_Batch_BAO_Batch', self::$_entityID, 'status_id');
     }
-    $breadCrumb =
-      array(
+    $breadCrumb
+      array(
         array(
           'title' => ts('Accounting Batches'),
           'url' => CRM_Utils_System::url('civicrm/financial/financialbatches',
index 2b39759e4722eb7049fd65d1468cc880bc1eeecf..71f8c27c0a0c23c4b0990dac4588f1893819d57f 100644 (file)
@@ -59,13 +59,13 @@ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {
           'CiviMail.ignored',
           date('Y'),
           date('m'),
-          date('d')
+          date('d'),
         )));
     $this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, array(
           'CiviMail.processed',
           date('Y'),
           date('m'),
-          date('d')
+          date('d'),
         )));
   }
 
@@ -98,7 +98,7 @@ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {
       print "copying message $nr to ignored folder\n";
     }
     $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_ignored);
-    $parser = new ezcMailParser;
+    $parser = new ezcMailParser();
     $parser->parseMail($set);
     $this->_leftToProcess--;
   }
@@ -116,7 +116,7 @@ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {
       print "copying message $nr to processed folder\n";
     }
     $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_processed);
-    $parser = new ezcMailParser;
+    $parser = new ezcMailParser();
     $parser->parseMail($set);
     $this->_leftToProcess--;
   }
index 49b2b22e353c1b195240ee4b0f4e6764c3391e39..060df557dd75df92cfba8552f779e723e4247db5 100644 (file)
@@ -68,13 +68,13 @@ class CRM_Mailing_MailStore_Pop3 extends CRM_Mailing_MailStore {
           'CiviMail.ignored',
           date('Y'),
           date('m'),
-          date('d')
+          date('d'),
         )));
     $this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, array(
           'CiviMail.processed',
           date('Y'),
           date('m'),
-          date('d')
+          date('d'),
         )));
   }
 
@@ -91,7 +91,7 @@ class CRM_Mailing_MailStore_Pop3 extends CRM_Mailing_MailStore {
       print "fetching message $nr and putting it in the ignored mailbox\n";
     }
     $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_ignored);
-    $parser = new ezcMailParser;
+    $parser = new ezcMailParser();
     $parser->parseMail($set);
     $this->_transport->delete($nr);
   }
@@ -109,7 +109,7 @@ class CRM_Mailing_MailStore_Pop3 extends CRM_Mailing_MailStore {
       print "fetching message $nr and putting it in the processed mailbox\n";
     }
     $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_processed);
-    $parser = new ezcMailParser;
+    $parser = new ezcMailParser();
     $parser->parseMail($set);
     $this->_transport->delete($nr);
   }
index 8d1521c7c50adb16ec288b7b62ed2e67c942994d..55d1f693fbf8a05bf656eda3839805966d0a17e7 100644 (file)
@@ -220,7 +220,7 @@ class CRM_Member_BAO_MembershipStatus extends CRM_Member_DAO_MembershipStatus {
    * @param string $joinDate
    *   Join date of the member whose membership status is to be calculated.
    * @param \date|string $statusDate status date of the member whose membership status is to be calculated.
-   * @param bool $excludeIsAdminExclude the statuses those having is_admin = 1.
+   * @param bool $excludeIsAdmin the statuses those having is_admin = 1.
    *   Exclude the statuses those having is_admin = 1.
    * @param int $membershipTypeID
    * @param array $membership
@@ -228,7 +228,7 @@ class CRM_Member_BAO_MembershipStatus extends CRM_Member_DAO_MembershipStatus {
    *
    * @return array
    */
-  static function getMembershipStatusByDate(
+  public static function getMembershipStatusByDate(
     $startDate, $endDate, $joinDate,
     $statusDate = 'today', $excludeIsAdmin = FALSE, $membershipTypeID, $membership = array()
   ) {
index 52c31332bd89ddc7c85dab7f1f9111ecf7b6012a..bd709c1e7425c8e135d49aed6d1c6257f1f3b140 100644 (file)
@@ -44,7 +44,7 @@ class CRM_Pledge_StateMachine_Search extends CRM_Core_StateMachine {
   /**
    * Class constructor
    */
-  function __construct($controller, $action = CRM_Core_Action::NONE) {
+  public function __construct($controller, $action = CRM_Core_Action::NONE) {
     parent::__construct($controller, $action);
 
     $this->_pages = array();
index 18b0c2918af48d4a39726be192070808a5cb9760..d03b8b2c7b5ad60dffb2d1afe149ab06a9d4fd32 100644 (file)
@@ -279,7 +279,7 @@ WHERE     ct.id = cp.financial_type_id AND
    * @param int $id
    *   Price Set id.
    *
-   * @return boolean
+   * @return bool
    *   false if fields exist for this set, true if the
    *   set could be deleted
    *
@@ -903,7 +903,7 @@ WHERE  id = %1";
     $className = CRM_Utils_System::getClassName($form);
     if (in_array($className, array(
       'CRM_Contribute_Form_Contribution',
-      'CRM_Member_Form_Membership'
+      'CRM_Member_Form_Membership',
     ))) {
       $validFieldsOnly = FALSE;
     }
@@ -1310,7 +1310,7 @@ GROUP BY     mt.member_of_contact_id";
    *
    * @param int $id
    *   Id of the database record.
-   * @param bool $isQuickConfigValue we want to set the is_quick_config field.
+   * @param bool $isQuickConfig we want to set the is_quick_config field.
    *   Value we want to set the is_quick_config field.
    *
    * @return Object
@@ -1326,9 +1326,8 @@ GROUP BY     mt.member_of_contact_id";
    *
    */
   public static function checkMembershipPriceSet($id) {
-    $query =
-      "
-SELECT      pfv.id, pfv.price_field_id, pfv.name, pfv.membership_type_id, pf.html_type, mt.auto_renew
+    $query
+      = "SELECT      pfv.id, pfv.price_field_id, pfv.name, pfv.membership_type_id, pf.html_type, mt.auto_renew
 FROM        civicrm_price_field_value pfv
 LEFT JOIN   civicrm_price_field pf ON pf.id = pfv.price_field_id
 LEFT JOIN   civicrm_price_set ps ON ps.id = pf.price_set_id
index 68d0f273fc9c53725f27a5880960777e63c89049..84d377d1e913466ca0542a3183a0c98f277d31c8 100644 (file)
@@ -53,12 +53,10 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
   /**
    * Get the action links for this page.
    *
-   * @param null
-   *
    * @return array
    *   array of action links that we need to display for the browse screen
    */
-  function &actionLinks() {
+  public function &actionLinks() {
     // check if variable _actionsLinks is populated
     if (!isset(self::$_actionLinks)) {
       // helper variable for nicer formatting
@@ -119,8 +117,6 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
    * type of action and executes that action.
    * Finally it calls the parent's run method.
    *
-   * @param null
-   *
    * @return void
    */
   public function run() {
index 6fe5be7336ffcfee3476ce79d8bb5f666ad3bca9..33b84a15d7208a3b7a1655568407a059df531867 100644 (file)
@@ -226,7 +226,7 @@ class CRM_Profile_Page_MultipleRecordFieldsListing extends CRM_Core_Page_Basic {
         'date_format',
         'time_format',
         'default_value',
-        'is_required'
+        'is_required',
       );
       foreach ($fieldIDs as $key => $fieldID) {
         $fieldIDs[$key] = !is_numeric($fieldID) ? CRM_Core_BAO_CustomField::getKeyID($fieldID) : $fieldID;
@@ -249,8 +249,8 @@ class CRM_Profile_Page_MultipleRecordFieldsListing extends CRM_Core_Page_Basic {
         $options[$fieldIDs[$key]]['attributes']['is_required'] = !empty($returnValues['is_required']);
         $options[$fieldIDs[$key]]['attributes']['default_value'] = CRM_Utils_Array::value('default_value', $returnValues);
 
-        $options[$fieldIDs[$key]]['attributes']['format'] =
-        $options[$fieldIDs[$key]]['attributes']['date_format'] = CRM_Utils_Array::value('date_format', $returnValues);
+        $options[$fieldIDs[$key]]['attributes']['format']
+          = $options[$fieldIDs[$key]]['attributes']['date_format'] = CRM_Utils_Array::value('date_format', $returnValues);
         $options[$fieldIDs[$key]]['attributes']['time_format'] = CRM_Utils_Array::value('time_format', $returnValues);
       }
 
@@ -352,7 +352,7 @@ class CRM_Profile_Page_MultipleRecordFieldsListing extends CRM_Core_Page_Basic {
                 $actionParams = array(
                   'recordId' => $recId,
                   'gid' => $this->_profileId,
-                  'id' => $this->_contactId
+                  'id' => $this->_contactId,
                 );
                 $op = 'profile.multiValue.row';
               }
index 36f1d9e093ddbe7d6231a8cec6c3b83993054ff4..cd989b5b8732b22762fac9337757873a355ebefd 100644 (file)
@@ -48,7 +48,7 @@ class CRM_Profile_Page_Router extends CRM_Core_Page {
    */
   public function run($args = NULL) {
     if ($args[1] !== 'profile') {
-      return;
+      return NULL;
     }
 
     $secondArg = CRM_Utils_Array::value(2, $args, '');
@@ -75,8 +75,7 @@ class CRM_Profile_Page_Router extends CRM_Core_Page {
 
       // make sure that this profile enables mapping
       // CRM-8609
-      $isMap =
-        CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $profileGID, 'is_map');
+      $isMap = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $profileGID, 'is_map');
       if (!$isMap) {
         CRM_Core_Error::statusBounce(ts('This profile does not have the map feature turned on.'));
       }
@@ -126,7 +125,6 @@ class CRM_Profile_Page_Router extends CRM_Core_Page {
     }
 
     CRM_Utils_System::permissionDenied();
-    return;
   }
 
 }
index 65784d7e4828224bc94a38485943437e2061d391..8c7ab85c5eb74b0af82ddf7b9b1d6232215b7f48 100644 (file)
@@ -362,7 +362,7 @@ WHERE  inst.report_id = %1";
    *
    * @param int $instanceId
    *
-   * @return boolean
+   * @return bool
    *   true if yes, else false
    */
   public static function isInstanceGroupRoleAllowed($instanceId) {
index b6db2df8019f8e5b0f9479be2066b4eac27aeb28..16f41ae96a326fd8b8d6bd72f2d3cf88e8fa2283 100644 (file)
@@ -178,7 +178,7 @@ class CRM_Utils_SQL_Select {
   /**
    * Given a string like "field_name = @value", replace "@value" with an escaped SQL string
    *
-   * @param string SQL expression
+   * @param $expr SQL expression
    * @param null|array $args a list of values to insert into the SQL expression; keys are prefix-coded:
    *   prefix '@' => escape SQL
    *   prefix '#' => literal number, skip escaping but do validation
index d486fa882b93dda18aedf3c6f1932e734b23fc7d..a9874d4dd05e0ba3cfc0415c80210f3479e847f1 100644 (file)
@@ -173,7 +173,7 @@ function _civicrm_api3_contribution_create_legacy_support_45(&$params) {
  * @param array $params
  *   (reference ) input parameters.
  *
- * @return boolean
+ * @return bool
  *   true if success, else false
  */
 function civicrm_api3_contribution_delete($params) {
@@ -341,13 +341,12 @@ function civicrm_api3_contribution_transact($params) {
  *   Input parameters.
  *
  * @throws Exception
- * @return array
- *   Api result array
+ *   Api result array.
  */
 function civicrm_api3_contribution_sendconfirmation($params) {
   $contribution = new CRM_Contribute_BAO_Contribution();
   $contribution->id = $params['id'];
-  if (! $contribution->find(TRUE)) {
+  if (!$contribution->find(TRUE)) {
     throw new Exception('Contribution does not exist');
   }
   $input = $ids = $cvalues = array('receipt_from_email' => $params['receipt_from_email']);
@@ -397,8 +396,7 @@ function _civicrm_api3_contribution_sendconfirmation_spec(&$params) {
  * {@getfields Contribution_completetransaction}
  *
  * @throws API_Exception
- * @return array
- *   Api result array
+ *   Api result array.
  */
 function civicrm_api3_contribution_completetransaction(&$params) {
 
index af878bdadf8cbe1efdd77f37892564f23e316251..bc2b5e6c416aa85fa4f0a3c59e858da0c987f1ef 100644 (file)
@@ -44,7 +44,7 @@
  *
  * @return array
  *   api result array
- * {@getfields contribution_page_create}
+ *   {@getfields contribution_page_create}
  */
 function civicrm_api3_contribution_page_create($params) {
   $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
@@ -74,7 +74,7 @@ function _civicrm_api3_contribution_page_create_spec(&$params) {
  *
  * @return array
  *   API Result array Array of matching contribution_pages
- * {@getfields contribution_page_get}
+ *   {@getfields contribution_page_get}
  */
 function civicrm_api3_contribution_page_get($params) {
   return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
@@ -92,7 +92,7 @@ function civicrm_api3_contribution_page_get($params) {
  *
  * @return array
  *   API result Array
- * {@getfields contribution_page_delete}
+ *   {@getfields contribution_page_delete}
  */
 function civicrm_api3_contribution_page_delete($params) {
   return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
@@ -110,7 +110,7 @@ function civicrm_api3_contribution_page_delete($params) {
  *
  * @return array
  *   API result array
- * {@getfields contribution_page_delete}
+ *   {@getfields contribution_page_delete}
  */
 function civicrm_api3_contribution_page_submit($params) {
   $result = CRM_Contribute_Form_Contribution_Confirm::submit($params);
index c5b0e357549321d9380b25fa52f3caaca479b25a..ed72e2eee94c9ca92f6cd3028dd54cc87f35e67b 100644 (file)
@@ -68,9 +68,9 @@ function civicrm_api3_pledge_create($params) {
  * @param array $params
  *   Array included 'pledge_id' of pledge to delete.
  *
- * @return boolean
+ * @return bool
  *   true if success, else false
- * {@getfields pledge_delete}
+ *   {@getfields pledge_delete}
  * @example PledgeDelete.php
  */
 function civicrm_api3_pledge_delete($params) {
@@ -132,7 +132,7 @@ function _civicrm_api3_pledge_create_spec(&$params) {
  *
  * @return array
  *   array of pledges, if error an array with an error id and error message
- * {@getfields pledge_get}
+ *   {@getfields pledge_get}
  * @example PledgeGet.php
  */
 function civicrm_api3_pledge_get($params) {
@@ -165,7 +165,6 @@ function _civicrm_api3_pledge_get_defaults() {
  * @param array $values
  *   The reformatted properties that we can use internally.
  *
- * @return array|CRM_Core_Error
  */
 function _civicrm_api3_pledge_format_params(&$values) {
 
index 37c2accb28428e4cbf747b11c21f4c37d692abb9..b25f63dd6fff499163baff82bd224de6da226757 100644 (file)
@@ -59,7 +59,7 @@ function civicrm_api3_word_replacement_get($params) {
  *
  * @return array
  *
- * {@getfields word_replacement_create}
+ *   {@getfields word_replacement_create}
  */
 function civicrm_api3_word_replacement_create($params) {
   return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
index 370c50dcbf027c17826ffb72ee4dd359d0e99646..dcb4378e1137a501c4b10d5a15b4c685b9d99ea1 100644 (file)
@@ -33,7 +33,7 @@
  * php bin/csv/export.php -e <entity> [ --field=value --field=value ] [ -s site.org ]
  * e.g.: php bin/csv/export.php -e Contact --email=jamie@progressivetech.org
  *
- **/
+ */
 require_once dirname(__DIR__) . '/cli.class.php';
 
 $entityExporter = new civicrm_cli_csv_exporter();
index 6a931ae8bb961ad847cdbfe3f2f27b3f04e15b3d..f0ecc8f956b7adb62b988382db373cffe67f8491 100644 (file)
@@ -410,7 +410,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
     //since we are loading activities from dataset, we know total number of activities
     // 8 schedule activities that should be shown on dashboard
     $count = 8;
-    $this->assertEquals($count, sizeof($activities), 'In line ' . __LINE__);
+    $this->assertEquals($count, count($activities), 'In line ' . __LINE__);
 
     foreach ($activities as $key => $value) {
       $this->assertEquals($value['subject'], "subject {$key}", 'Verify activity subject is correct.');
@@ -446,7 +446,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
     //since we are loading activities from dataset, we know total number of activities for this contact
     // 5 activities ( 2 scheduled, 3 Completed ), note that dashboard shows only scheduled activities
     $count = 2;
-    $this->assertEquals($count, sizeof($activities), 'In line ' . __LINE__);
+    $this->assertEquals($count, count($activities), 'In line ' . __LINE__);
 
     foreach ($activities as $key => $value) {
       $this->assertEquals($value['subject'], "subject {$key}", 'Verify activity subject is correct.');
@@ -489,7 +489,7 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
     //since we are loading activities from dataset, we know total number of activities for this contact
     // 5 activities, Contact Summary should show all activities
     $count = 5;
-    $this->assertEquals($count, sizeof($activities), 'In line ' . __LINE__);
+    $this->assertEquals($count, count($activities), 'In line ' . __LINE__);
 
     foreach ($activities as $key => $value) {
       $this->assertEquals($value['subject'], "subject {$key}", 'Verify activity subject is correct.');
@@ -542,6 +542,6 @@ class CRM_Activity_BAO_ActivityTest extends CiviUnitTestCase {
 
     //since we are loading activities from dataset, we know total number of activities for this contact
     // This contact does not have any activities
-    $this->assertEquals(0, sizeof($activities), 'In line ' . __LINE__);
+    $this->assertEquals(0, count($activities), 'In line ' . __LINE__);
   }
 }
index d96bc27c5a45958c3a9aad77c691088f3b437f54..d92a9a004fd848de39ef593b406286399d43159c 100644 (file)
@@ -11,7 +11,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase {
    * @return CRM_Contact_BAO_QueryTestDataProvider
    */
   public function dataProvider() {
-    return new CRM_Contact_BAO_QueryTestDataProvider;
+    return new CRM_Contact_BAO_QueryTestDataProvider();
   }
 
   public function setUp() {
@@ -75,7 +75,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase {
     $this->callAPISuccess('address', 'create', array(
         'contact_id' => $contactID,
         'city' => 'Cool City',
-        'location_type_id' => 1
+        'location_type_id' => 1,
       ));
     $params = array(
       0 => array(
@@ -117,7 +117,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase {
     $this->callAPISuccess('address', 'create', array(
         'contact_id' => $contactID,
         'city' => 'Cool City',
-        'location_type_id' => 1
+        'location_type_id' => 1,
       ));
     $params = array(
       0 => array(
@@ -160,7 +160,7 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase {
     $this->callAPISuccess('address', 'create', array(
         'contact_id' => $contactID,
         'city' => 'Cool City',
-        'location_type_id' => 1
+        'location_type_id' => 1,
       ));
     $params = array(
       0 => array(
index ea3675d9ecefc5e9a7b866751d20bffe7256a223..10b6f700730e3186d0711b44b79fbe9390f80c49 100644 (file)
@@ -47,7 +47,7 @@ class CRM_Queue_Queue_AllTests extends CiviTestSuite {
    */
   private static function getInstance() {
     if (is_null(self::$instance)) {
-      self::$instance = new self;
+      self::$instance = new self();
     }
     return self::$instance;
   }
index ade04f98965932eadded1b40a20122e2ebeaa520..0b2879123dfb85acf40e7cc21ef3bd65ef0c2ad1 100644 (file)
@@ -384,7 +384,7 @@ class WebTest_Contribute_OnBehalfOfOrganization extends CiviSeleniumTestCase {
     $this->openCiviPage('admin/uf/group/field/add', array(
         'action' => 'add',
         'reset' => 1,
-        'gid' => $gid
+        'gid' => $gid,
       ), 'field_name[0]');
     $this->select('field_name[0]', "value=Membership");
     $this->select('field_name[1]', "label={$checkboxFieldLabel} :: {$customGroupTitle}");
index 761763706a685c79be12a532441779fa2b4a76da..725ddc02277eb6a088d74ac7dd4221fdd511bdee 100755 (executable)
@@ -174,10 +174,10 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
 
     //Assertions
     $actualAmount = $this->_getPremiumActualCost($contId, $to, $from, $cost2, "'civicrm_contribution'");
-    $this->assertEquals($actualAmount,null,"Verify actual cost for changed premium");
+    $this->assertEquals($actualAmount, NULL, "Verify actual cost for changed premium");
 
     $deletedAmount = $this->_getPremiumActualCost($contId, $from, $to, $cost, "'civicrm_contribution'");
-    $this->assertEquals($deletedAmount, null, "Verify actual cost for deleted premium");
+    $this->assertEquals($deletedAmount, NULL, "Verify actual cost for deleted premium");
   }
 
   public function testDeletePremium() {
@@ -239,7 +239,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
 
     //Assertions
     $actualAmount = $this->_getPremiumActualCost($contId, $from, $to, NULL, "'civicrm_contribution'");
-    $this->assertEquals($actualAmount, null, "Verify actual cost for deleted premium");
+    $this->assertEquals($actualAmount, NULL, "Verify actual cost for deleted premium");
   }
 
   public function testChangePaymentInstrument() {
@@ -375,7 +375,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
    *
    * @return null|string
    */
-  function _getPremiumActualCost($entityId, $from = NULL, $to = NULL, $cost = NULL, $entityTable = NULL, $select = "ft.total_amount AS amount") {
+  public function _getPremiumActualCost($entityId, $from = NULL, $to = NULL, $cost = NULL, $entityTable = NULL, $select = "ft.total_amount AS amount") {
     $financialAccount = CRM_Contribute_PseudoConstant::financialAccount();
     $query = "SELECT
      {$select}
@@ -405,7 +405,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
    *
    * @return null|string
    */
-  function _getFinancialTrxnAmount($contId) {
+  public function _getFinancialTrxnAmount($contId) {
     $query = "SELECT
      SUM( ft.total_amount ) AS total
      FROM civicrm_financial_trxn AS ft
@@ -421,7 +421,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
    *
    * @return null|string
    */
-  function _getFinancialItemAmount($contId) {
+  public function _getFinancialItemAmount($contId) {
     $lineItem = key(CRM_Price_BAO_LineItem::getLineItems($contId, 'contribution'));
     $query = "SELECT
      SUM(amount)
@@ -437,7 +437,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
    *
    * @return null|string
    */
-  function _getTotalContributedAmount($contId) {
+  public function _getTotalContributedAmount($contId) {
     $query = "SELECT
      SUM(amount)
      FROM civicrm_entity_financial_trxn
index 6e284b1adf068bcf782acff49fc45c553b4fd491..423208911e4dce1970ed32ee61b423f518ef370d 100644 (file)
@@ -112,7 +112,7 @@ class api_v3_CustomValueContactTypeTest extends CiviUnitTestCase {
     $this->quickCleanup($tablesToTruncate, TRUE);
   }
 
-  /*
+  /**
    * Test that custom fields is returned for correct contact type only
    */
   public function testGetFields() {
@@ -120,12 +120,12 @@ class api_v3_CustomValueContactTypeTest extends CiviUnitTestCase {
     $this->assertArrayHasKey("custom_{$this->IndividualField['id']}", $result['values'], 'If This fails there is probably a caching issue - failure in line' . __LINE__ . print_r(array_keys($result['values']), TRUE));
     $result = $this->callAPISuccess('Contact', 'getfields', array(
         'action' => 'create',
-        'contact_type' => 'Individual'
+        'contact_type' => 'Individual',
       ), 'in line' . __LINE__);
     $this->assertArrayHasKey("custom_{$this->IndividualField['id']}", $result['values']);
     $result = $this->callAPISuccess('Contact', 'getfields', array(
         'action' => 'create',
-        'contact_type' => 'Organization'
+        'contact_type' => 'Organization',
       ));
     $this->assertArrayNotHasKey("custom_{$this->IndividualField['id']}", $result['values'], 'in line' . __LINE__ . print_r(array_keys($result['values']), TRUE));
     $result = $this->callAPISuccess('Relationship', 'getfields', array('action' => 'create'), 'in line' . __LINE__);
@@ -233,8 +233,6 @@ class api_v3_CustomValueContactTypeTest extends CiviUnitTestCase {
     $this->assertTrue(in_array("custom_{$this->IndiStudentField['id']}", $contact['undefined_fields']), __LINE__);
   }
 
-
-
   // Retrieve Methods
 
   /**
index bb97263ba4a6383d0d5a6d7d5355ada0e157a581..7a5dcbd7777ff796cb29a0cb795786b70e0d3e40 100644 (file)
@@ -57,7 +57,7 @@ class api_v3_SurveyTest extends CiviUnitTestCase {
   public function setUp() {
     $phoneBankActivityTypeID = $this->callAPISuccessGetValue('Option_value', array(
         'label' => 'PhoneBank',
-        'return' => 'value'
+        'return' => 'value',
       ), 'integer');
     $this->useTransaction();
     $this->enableCiviCampaign();