(NFC) Update CRM/Core CRM/Custom CRM/Dedupe to match the new coder style
authorSeamus Lee <seamuslee001@gmail.com>
Wed, 10 Apr 2019 21:36:06 +0000 (07:36 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 10 Apr 2019 21:36:06 +0000 (07:36 +1000)
145 files changed:
CRM/Core/Action.php
CRM/Core/BAO/Block.php
CRM/Core/BAO/Cache.php
CRM/Core/BAO/CustomGroup.php
CRM/Core/BAO/CustomOption.php
CRM/Core/BAO/CustomQuery.php
CRM/Core/BAO/CustomValue.php
CRM/Core/BAO/Dashboard.php
CRM/Core/BAO/Domain.php
CRM/Core/BAO/File.php
CRM/Core/BAO/FinancialTrxn.php
CRM/Core/BAO/Job.php
CRM/Core/BAO/LabelFormat.php
CRM/Core/BAO/Location.php
CRM/Core/BAO/LocationType.php
CRM/Core/BAO/Log.php
CRM/Core/BAO/Mapping.php
CRM/Core/BAO/MessageTemplate.php
CRM/Core/BAO/Navigation.php
CRM/Core/BAO/Note.php
CRM/Core/BAO/PaperSize.php
CRM/Core/BAO/PdfFormat.php
CRM/Core/BAO/PreferencesDate.php
CRM/Core/BAO/PrevNextCache.php
CRM/Core/BAO/RecurringEntity.php
CRM/Core/BAO/Tag.php
CRM/Core/BAO/UFField.php
CRM/Core/BAO/UFGroup.php
CRM/Core/BAO/UFMatch.php
CRM/Core/BAO/WordReplacement.php
CRM/Core/Block.php
CRM/Core/CodeGen/Config.php
CRM/Core/CodeGen/I18n.php
CRM/Core/CodeGen/Main.php
CRM/Core/CodeGen/Specification.php
CRM/Core/CodeGen/Test.php
CRM/Core/CodeGen/Util/File.php
CRM/Core/CodeGen/Util/Xml.php
CRM/Core/CommunityMessages.php
CRM/Core/Component.php
CRM/Core/Config.php
CRM/Core/Config/MagicMerge.php
CRM/Core/Config/Runtime.php
CRM/Core/Controller.php
CRM/Core/DAO.php
CRM/Core/Error.php
CRM/Core/Form.php
CRM/Core/Form/Date.php
CRM/Core/Form/EntityFormTrait.php
CRM/Core/Form/RecurringEntity.php
CRM/Core/Form/Renderer.php
CRM/Core/Form/Search.php
CRM/Core/Form/ShortCode.php
CRM/Core/Form/Task.php
CRM/Core/Form/Task/Batch.php
CRM/Core/Form/Task/PDFLetterCommon.php
CRM/Core/Form/Task/PickProfile.php
CRM/Core/I18n.php
CRM/Core/I18n/Form.php
CRM/Core/I18n/NativeGettext.php
CRM/Core/I18n/SchemaStructure.php
CRM/Core/I18n/SchemaStructure_4_2_alpha1.php
CRM/Core/I18n/SchemaStructure_4_3_1.php
CRM/Core/I18n/SchemaStructure_4_5_alpha1.php
CRM/Core/IDS.php
CRM/Core/InnoDBIndexer.php
CRM/Core/Invoke.php
CRM/Core/JobManager.php
CRM/Core/Key.php
CRM/Core/LegacyErrorHandler.php
CRM/Core/Lock.php
CRM/Core/ManagedEntities.php
CRM/Core/Menu.php
CRM/Core/Module.php
CRM/Core/OptionGroup.php
CRM/Core/OptionValue.php
CRM/Core/Page/AJAX/Attachment.php
CRM/Core/Page/AJAX/Location.php
CRM/Core/Page/File.php
CRM/Core/Page/Inline/Help.php
CRM/Core/Payment.php
CRM/Core/Payment/AuthorizeNet.php
CRM/Core/Payment/AuthorizeNetIPN.php
CRM/Core/Payment/BaseIPN.php
CRM/Core/Payment/FirstData.php
CRM/Core/Payment/Form.php
CRM/Core/Payment/PayJunction.php
CRM/Core/Payment/PayPalIPN.php
CRM/Core/Payment/PayPalImpl.php
CRM/Core/Payment/PayPalProIPN.php
CRM/Core/Payment/PayflowPro.php
CRM/Core/Payment/PaymentExpressIPN.php
CRM/Core/Payment/ProcessorForm.php
CRM/Core/Payment/eWAY.php
CRM/Core/Permission.php
CRM/Core/Permission/Backdrop.php
CRM/Core/Permission/Base.php
CRM/Core/Permission/Drupal.php
CRM/Core/Permission/Drupal8.php
CRM/Core/Permission/Joomla.php
CRM/Core/Permission/Temp.php
CRM/Core/Permission/UnitTests.php
CRM/Core/Permission/WordPress.php
CRM/Core/PrevNextCache/Sql.php
CRM/Core/PseudoConstant.php
CRM/Core/QuickForm/Action/Display.php
CRM/Core/QuickForm/Action/Upload.php
CRM/Core/QuickForm/GroupMultiSelect.php
CRM/Core/QuickForm/NestedAdvMultiSelect.php
CRM/Core/Reference/Interface.php
CRM/Core/Region.php
CRM/Core/Resources.php
CRM/Core/Resources/Strings.php
CRM/Core/ScheduledJob.php
CRM/Core/SelectValues.php
CRM/Core/Selector/Controller.php
CRM/Core/Session.php
CRM/Core/ShowHideBlocks.php
CRM/Core/Smarty/Permissions.php
CRM/Core/Smarty/plugins/function.crmAPI.php
CRM/Core/Smarty/plugins/function.crmKey.php
CRM/Core/Smarty/plugins/function.simpleActivityContacts.php
CRM/Core/Smarty/plugins/prefilter.resetExtScope.php
CRM/Core/Smarty/resources/String.php
CRM/Core/TableHierarchy.php
CRM/Core/Task.php
CRM/Core/TemporaryErrorScope.php
CRM/Core/Transaction.php
CRM/Custom/Form/ChangeFieldType.php
CRM/Custom/Form/DeleteField.php
CRM/Custom/Form/DeleteGroup.php
CRM/Custom/Form/Field.php
CRM/Custom/Form/MoveField.php
CRM/Custom/Form/Option.php
CRM/Custom/Form/Preview.php
CRM/Custom/Import/Controller.php
CRM/Custom/Import/Form/Summary.php
CRM/Custom/Import/Parser.php
CRM/Custom/Import/Parser/Api.php
CRM/Dedupe/BAO/QueryBuilder.php
CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php
CRM/Dedupe/BAO/Rule.php
CRM/Dedupe/BAO/RuleGroup.php
CRM/Dedupe/Finder.php
CRM/Dedupe/Merger.php

index 4e5e811ea52b366290d146d41b4469c4426845e7..638976ea32831afba220f0b4e638c8bead94f141 100644 (file)
@@ -74,10 +74,10 @@ class CRM_Core_Action {
    * bit manipulation operations so we can perform multiple
    * actions on the same object if needed
    *
-   * @var array $_names type of variable name to action constant
+   * @var array
    *
    */
-  static $_names = [
+  public static $_names = [
     'add' => self::ADD,
     'update' => self::UPDATE,
     'view' => self::VIEW,
@@ -102,7 +102,7 @@ class CRM_Core_Action {
    *
    * @var array
    */
-  static $_description;
+  public static $_description;
 
   /**
    * Called by the request object to translate a string into a mask.
index 780d00acdade23e0710a08796498ebecbe696440..a9ffa34e2f4461182c95675d6de1e5b2f9f67675 100644 (file)
@@ -36,8 +36,9 @@ class CRM_Core_BAO_Block {
 
   /**
    * Fields that are required for a valid block.
+   * @var array
    */
-  static $requiredBlockFields = [
+  public static $requiredBlockFields = [
     'email' => ['email'],
     'phone' => ['phone'],
     'im' => ['name'],
index 3347f978d86e5f37d7630227a720674d04c19006..13d59a848bdb62cbd0b5b6939a6bb3b504550b8e 100644 (file)
@@ -51,7 +51,7 @@ class CRM_Core_BAO_Cache extends CRM_Core_DAO_Cache {
   /**
    * @var array ($cacheKey => $cacheValue)
    */
-  static $_cache = NULL;
+  public static $_cache = NULL;
 
   /**
    * Retrieve an item from the DB cache.
@@ -359,6 +359,7 @@ class CRM_Core_BAO_Cache extends CRM_Core_DAO_Cache {
    * @param bool $session
    * @param bool $table
    * @param bool $prevNext
+   * @param bool $expired
    */
   public static function cleanup($session = FALSE, $table = FALSE, $prevNext = FALSE, $expired = FALSE) {
     // clean up the session cache every $cacheCleanUpNumber probabilistically
index 01e65fc4cefd12d895d0e7b7e090ea69205abf29..d20a3188d9165365014014b464fcd461a2777752 100644 (file)
@@ -716,7 +716,7 @@ ORDER BY civicrm_custom_group.weight,
    * @return string
    *   SQL condition.
    */
-  static private function whereListHas($column, $value, $delimiter = CRM_Core_DAO::VALUE_SEPARATOR) {
+  private static function whereListHas($column, $value, $delimiter = CRM_Core_DAO::VALUE_SEPARATOR) {
     // ?
     $bareValue = trim($value, $delimiter);
     $escapedValue = CRM_Utils_Type::escape("%{$delimiter}{$bareValue}{$delimiter}%", 'String', FALSE);
@@ -736,7 +736,7 @@ ORDER BY civicrm_custom_group.weight,
    * @return bool
    *   does this entity have data in this custom table
    */
-  static public function customGroupDataExistsForEntity($entityID, $table, $getCount = FALSE) {
+  public static function customGroupDataExistsForEntity($entityID, $table, $getCount = FALSE) {
     $query = "
       SELECT count(id)
       FROM   $table
@@ -765,7 +765,7 @@ ORDER BY civicrm_custom_group.weight,
    * @param array $singleFieldTablesWithEntityData
    *   Array of tables in which this entity has data.
    */
-  static public function buildEntityTreeSingleFields(&$groupTree, $entityID, $entitySingleSelectClauses, $singleFieldTablesWithEntityData) {
+  public static function buildEntityTreeSingleFields(&$groupTree, $entityID, $entitySingleSelectClauses, $singleFieldTablesWithEntityData) {
     $select = implode(', ', $entitySingleSelectClauses);
     $fromSQL = " (SELECT $entityID as entity_id ) as first ";
     foreach ($singleFieldTablesWithEntityData as $table) {
@@ -796,7 +796,7 @@ ORDER BY civicrm_custom_group.weight,
    * @param string|int $singleRecord
    *   holds 'new' or id if view/edit/copy form for a single record is being loaded.
    */
-  static public function buildEntityTreeMultipleFields(&$groupTree, $entityID, $entityMultipleSelectClauses, $multipleFieldTablesWithEntityData, $singleRecord = NULL) {
+  public static function buildEntityTreeMultipleFields(&$groupTree, $entityID, $entityMultipleSelectClauses, $multipleFieldTablesWithEntityData, $singleRecord = NULL) {
     foreach ($entityMultipleSelectClauses as $table => $selectClauses) {
       $select = implode(',', $selectClauses);
       $query = "
@@ -827,7 +827,7 @@ ORDER BY civicrm_custom_group.weight,
    * @param string|int $singleRecord
    *   holds 'new' OR id if view/edit/copy form for a single record is being loaded.
    */
-  static public function buildTreeEntityDataFromQuery(&$groupTree, $query, $includedTables, $singleRecord = NULL) {
+  public static function buildTreeEntityDataFromQuery(&$groupTree, $query, $includedTables, $singleRecord = NULL) {
     $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       foreach ($groupTree as $groupID => $group) {
@@ -864,7 +864,7 @@ ORDER BY civicrm_custom_group.weight,
    * @param string|int $singleRecord
    *   holds 'new' or id if loading view/edit/copy for a single record.
    */
-  static public function buildCustomFieldData($dao, &$groupTree, $table, $groupID, $fieldID, $singleRecord = NULL) {
+  public static function buildCustomFieldData($dao, &$groupTree, $table, $groupID, $fieldID, $singleRecord = NULL) {
     $column = $groupTree[$groupID]['fields'][$fieldID]['column_name'];
     $idName = "{$table}_id";
     $fieldName = "{$table}_{$column}";
index f667ba4d1f305e5f8b78a63430012efa9e8388c8..9fa273922bbb6d0e3027af413435b48c1c7bacfd 100644 (file)
@@ -102,7 +102,7 @@ class CRM_Core_BAO_CustomOption {
    *   -rp = rowcount
    *   -page= offset
    */
-  static public function getOptionListSelector(&$params) {
+  public static function getOptionListSelector(&$params) {
     $options = [];
 
     $field = CRM_Core_BAO_CustomField::getFieldObject($params['fid']);
index f3efb735d350d3fd80ee273d566a541aed1a7959..790487e43891b62c2bad6ab03afddb2d63310603 100644 (file)
@@ -79,10 +79,10 @@ class CRM_Core_BAO_CustomQuery {
   public $_qill;
 
   /**
-   * @deprecated
    * No longer needed due to CRM-17646 refactoring, but still used in some places
    *
    * @var array
+   * @deprecated
    */
   public $_options;
 
@@ -107,7 +107,7 @@ class CRM_Core_BAO_CustomQuery {
    *
    * @var array
    */
-  static $extendsMap = [
+  public static $extendsMap = [
     'Contact' => 'civicrm_contact',
     'Individual' => 'civicrm_contact',
     'Household' => 'civicrm_contact',
index 305567fcbe0ed146cdc7874a1fcf0bc4d80e1cf7..7df55cc393e1d79bc43732238b209023a06a502c 100644 (file)
@@ -157,7 +157,6 @@ class CRM_Core_BAO_CustomValue extends CRM_Core_DAO {
     }
   }
 
-
   /**
    * @param array $formValues
    * @return null
index 091348624bb4ac09911323501b332c6e61e84ea5..8b61cf0c0d6605828586d26ce3dd2e54ea249c3d 100644 (file)
@@ -35,6 +35,7 @@
  * Class contains Contact dashboard related functions.
  */
 class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
+
   /**
    * Add Dashboard.
    *
@@ -175,7 +176,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
    * the default dashlets.
    *
    * @return array
-   *    Array of dashboard_id's
+   *   Array of dashboard_id's
    * @throws \CiviCRM_API3_Exception
    */
   public static function initializeDashlets() {
index bfbb06fc64ec369d4ee47314754dd3af4ec49c02..d4ccd6c9d1d021bdc0322668a0dc36121554e067 100644 (file)
@@ -38,11 +38,13 @@ class CRM_Core_BAO_Domain extends CRM_Core_DAO_Domain {
 
   /**
    * Cache for the current domain object.
+   * @var object
    */
-  static $_domain = NULL;
+  public static $_domain = NULL;
 
   /**
    * Cache for a domain's location array
+   * @var array
    */
   private $_location = NULL;
 
@@ -164,7 +166,7 @@ class CRM_Core_BAO_Domain extends CRM_Core_DAO_Domain {
 
   /**
    * @param bool $skipFatal
-   *
+   * @param bool $returnString
    * @return array
    *   name & email for domain
    * @throws Exception
index 8845687292fbf8bed66c72edd028a0c2b738c570..c9a1265d671ed7dec42d0752e4e6e171cd2a8549 100644 (file)
@@ -38,7 +38,7 @@
  */
 class CRM_Core_BAO_File extends CRM_Core_DAO_File {
 
-  static $_signableFields = ['entityTable', 'entityID', 'fileID'];
+  public static $_signableFields = ['entityTable', 'entityID', 'fileID'];
 
   /**
    * Takes an associative array and creates a File object.
@@ -95,7 +95,6 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File {
     return [NULL, NULL];
   }
 
-
   /**
    * @param $data
    * @param int $fileTypeID
@@ -695,7 +694,6 @@ AND       CEF.entity_id    = %2";
     self::deleteEntityFile($params['entityTable'], $params['entityID'], NULL, $params['fileID']);
   }
 
-
   /**
    * Display paper icon for a file attachment -- CRM-13624
    *
@@ -772,6 +770,8 @@ AND       CEF.entity_id    = %2";
    *
    * @param int $entityId entity id the file is attached to
    * @param int $fileId file ID
+   * @param int $genTs
+   * @param int $life
    * @return string
    */
   public static function generateFileHash($entityId = NULL, $fileId = NULL, $genTs = NULL, $life = NULL) {
index ee5c3267c7d4274fbed2746dc542208df03962ec..6b3d4533699282c6d077934652dc70491997ed5a 100644 (file)
@@ -36,6 +36,7 @@ class CRM_Core_BAO_FinancialTrxn extends CRM_Financial_DAO_FinancialTrxn {
    *
    * @return \CRM_Financial_DAO_FinancialTrxn
    */
+
   /**
    */
   public function __construct() {
@@ -139,6 +140,7 @@ class CRM_Core_BAO_FinancialTrxn extends CRM_Financial_DAO_FinancialTrxn {
    * @param bool $newTrxn
    * @param string $whereClause
    *   Additional where parameters
+   * @param int $fromAccountID
    *
    * @return array
    *   array of category id's the contact belongs to.
index 0b9a32272c7be05c89f037d92d5bf026ef322322..0509a0af47b60aaeb5182445c65831af7c3b3850 100644 (file)
@@ -149,7 +149,7 @@ class CRM_Core_BAO_Job extends CRM_Core_DAO_Job {
    * Make a copy of a Job.
    *
    * @param int $id The job id to copy.
-   *
+   * @param array $params
    * @return CRM_Core_DAO
    */
   public static function copy($id, $params = []) {
index 96c4ffbf62028234067a145e02a3f3a0bf4260e0..3ff7966611b09353098ef9dbc8930dbc8434e0a6 100644 (file)
@@ -39,11 +39,13 @@ class CRM_Core_BAO_LabelFormat extends CRM_Core_DAO_OptionValue {
 
   /**
    * Static holder for the Label Formats Option Group ID.
+   * @var int
    */
   private static $_gid = NULL;
 
   /**
    * Label Format fields stored in the 'value' field of the Option Value table.
+   * @var array
    */
   private static $optionValueFields = [
     'paper-size' => [
@@ -258,7 +260,7 @@ class CRM_Core_BAO_LabelFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Add ordering fields to Label Format list.
    *
-   * @param array (reference) $list List of Label Formats
+   * @param array $list List of Label Formats
    * @param string $returnURL
    *   URL of page calling this function.
    *
@@ -382,7 +384,7 @@ class CRM_Core_BAO_LabelFormat extends CRM_Core_DAO_OptionValue {
    *
    * @param string $field
    *   Name of a label format field.
-   * @param array (reference) $values associative array of name/value pairs containing
+   * @param array $values associative array of name/value pairs containing
    *                                           label format field selections
    *
    * @param null $default
@@ -458,7 +460,7 @@ class CRM_Core_BAO_LabelFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Save the Label Format in the DB.
    *
-   * @param array (reference) $values associative array of name/value pairs
+   * @param array $values associative array of name/value pairs
    * @param int $id
    *   Id of the database record (null = new record).
    * @param string $groupName
index 0cd00b5763c5e345619ea58e53a93f8288789596..72899e00757a09d6550c721cd61084d85859aaaf 100644 (file)
@@ -38,8 +38,9 @@ class CRM_Core_BAO_Location extends CRM_Core_DAO {
 
   /**
    * Location block element array.
+   * @var array
    */
-  static $blocks = ['phone', 'email', 'im', 'openid', 'address'];
+  public static $blocks = ['phone', 'email', 'im', 'openid', 'address'];
 
   /**
    * Create various elements of location block.
@@ -109,11 +110,11 @@ class CRM_Core_BAO_Location extends CRM_Core_DAO {
     }
 
     foreach ([
-               'phone',
-               'email',
-               'im',
-               'address',
-             ] as $loc) {
+      'phone',
+      'email',
+      'im',
+      '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;
     }
@@ -367,12 +368,12 @@ WHERE e.id = %1";
     $nonPrimaryBlockIds = CRM_Contact_BAO_Contact::getLocBlockIds($contactId, ['is_primary' => 0]);
 
     foreach ([
-               'Email',
-               'IM',
-               'Phone',
-               'Address',
-               'OpenID',
-             ] as $block) {
+      'Email',
+      'IM',
+      'Phone',
+      'Address',
+      'OpenID',
+    ] as $block) {
       $name = strtolower($block);
       if (array_key_exists($name, $primaryLocBlockIds) &&
         !CRM_Utils_System::isNull($primaryLocBlockIds[$name])
index 269284ccca6e2148ffc8fbefe2d807e64ff41d07..7f4cdab2df50b73b71e30e8a570890d3e33f5224 100644 (file)
@@ -36,9 +36,10 @@ class CRM_Core_BAO_LocationType extends CRM_Core_DAO_LocationType {
 
   /**
    * Static holder for the default LT.
+   * @var int
    */
-  static $_defaultLocationType = NULL;
-  static $_billingLocationType = NULL;
+  public static $_defaultLocationType = NULL;
+  public static $_billingLocationType = NULL;
 
   /**
    * Class constructor.
index a22a4c1eef87490b3df63291bb0a7fdeaf58a5b5..eb75c83708355887ecec99bde84992748beb76f7 100644 (file)
@@ -35,7 +35,7 @@
  * BAO object for crm_log table
  */
 class CRM_Core_BAO_Log extends CRM_Core_DAO_Log {
-  static $_processed = NULL;
+  public static $_processed = NULL;
 
   /**
    * @param int $id
index ccf17e6b7904b72f93c4b45bb21a28434ad98f20..3a9e29f5e73996fa8d1d2e80c471bdcea6ea7b39 100644 (file)
@@ -396,10 +396,10 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
     //we need to unset groups, tags, notes for component export
     if ($exportMode != CRM_Export_Form_Select::CONTACT_EXPORT) {
       foreach ([
-                 'groups',
-                 'tags',
-                 'notes',
-               ] as $value) {
+        'groups',
+        'tags',
+        'notes',
+      ] as $value) {
         unset($fields['Individual'][$value]);
         unset($fields['Household'][$value]);
         unset($fields['Organization'][$value]);
@@ -983,7 +983,6 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
     return $groupTitle;
   }
 
-
   /**
    * Function returns all  Custom group Names.
    *
index 31a6f7369fd195d1a2c252b79879b8e6be916cc2..6687dd0ee4c16da9be2278b3a3549b9bb1d78282 100644 (file)
@@ -272,9 +272,9 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate {
 
       $smarty = CRM_Core_Smarty::singleton();
       foreach ([
-                 'text',
-                 'html',
-               ] as $elem) {
+        'text',
+        'html',
+      ] as $elem) {
         $$elem = $smarty->fetch("string:{$$elem}");
       }
 
@@ -427,9 +427,9 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate {
       }
       else {
         CRM_Core_Error::fatal(ts('No such message template: option group %1, option value %2.', [
-              1 => $params['groupName'],
-              2 => $params['valueName'],
-            ]));
+          1 => $params['groupName'],
+          2 => $params['valueName'],
+        ]));
       }
     }
 
index 56bd323332f07239cc460072ac355e8df3197955..90cc56fb1cf30484917fbb2823b932ad61a419ec 100644 (file)
@@ -792,7 +792,7 @@ FROM civicrm_navigation WHERE domain_id = $domainID";
    *
    * @return bool|\CRM_Core_DAO
    */
-  static public function createOrUpdateTopLevelReportsNavItem($domain_id) {
+  public static function createOrUpdateTopLevelReportsNavItem($domain_id) {
     $id = NULL;
 
     $dao = new CRM_Core_BAO_Navigation();
@@ -892,7 +892,7 @@ FROM civicrm_navigation WHERE domain_id = $domainID";
    *   If True then do not match with a url that has a different parent
    *   (This is because for top level items there is a risk of 'stealing' rows that normally
    *   live under 'Contact' and intentionally duplicate the report examples.)
-   *
+   * @param bool $useWildcard
    * @return \CRM_Core_DAO_Navigation
    */
   protected static function createOrUpdateReportNavItem($name, $url, $url_params, $parent_id, $permission,
@@ -996,7 +996,7 @@ FROM civicrm_navigation WHERE domain_id = $domainID";
               'name' => 'CiviCRM Home',
               'url' => 'civicrm/dashboard?reset=1',
               'weight' => 1,
-            ]
+            ],
           ],
           [
             'attributes' => [
@@ -1004,7 +1004,7 @@ FROM civicrm_navigation WHERE domain_id = $domainID";
               'name' => 'Hide Menu',
               'url' => '#hidemenu',
               'weight' => 2,
-            ]
+            ],
           ],
           [
             'attributes' => [
@@ -1012,7 +1012,7 @@ FROM civicrm_navigation WHERE domain_id = $domainID";
               'name' => 'Log out',
               'url' => 'civicrm/logout?reset=1',
               'weight' => 3,
-            ]
+            ],
           ],
         ];
         return;
index 1193b72d765ccf73a902b3e362e2c047566440ae..d30ae5bfaad89cf8e3fe74518f07b21b2289249c 100644 (file)
@@ -133,7 +133,7 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note {
    *   (reference) an assoc array of name/value pairs.
    * @param array $ids
    *   (deprecated) associated array with note id - preferably set $params['id'].
-   * @return null|object $note
+   * @return null|object
    *   $note CRM_Core_BAO_Note object
    * @throws \CRM_Exception
    */
index 59664fff03ecdc83c27c9067910ec03d33fff655..500dfcb98d26cc8deb6bacde0aa3f482d90b248d 100644 (file)
@@ -39,11 +39,13 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
 
   /**
    * Static holder for the Paper Size Option Group ID.
+   * @var int
    */
   private static $_gid = NULL;
 
   /**
    * Paper Size fields stored in the 'value' field of the Option Value table.
+   * @var array
    */
   private static $optionValueFields = [
     'metric' => [
@@ -84,7 +86,7 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
   /**
    * Add ordering fields to Paper Size list.
    *
-   * @param array (reference) $list List of Paper Sizes
+   * @param array $list List of Paper Sizes
    * @param string $returnURL
    *   URL of page calling this function.
    *
@@ -196,7 +198,7 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
    *
    * @param string $field
    *   Name of a Paper Size field.
-   * @param array (reference) $values associative array of name/value pairs containing
+   * @param array $values associative array of name/value pairs containing
    *                                           Paper Size field selections
    *
    * @param null $default
@@ -263,7 +265,7 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
   /**
    * Save the Paper Size in the DB.
    *
-   * @param array (reference) $values associative array of name/value pairs
+   * @param array $values associative array of name/value pairs
    * @param int $id
    *   Id of the database record (null = new record).
    */
index 21bd66deeef19871e2ecc7e9f8939ad3d6cb7e1b..3a964f8cb929f7c6e5ae306bcad4eefb5626a6fc 100644 (file)
@@ -39,11 +39,13 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
 
   /**
    * Static holder for the PDF Page Formats Option Group ID.
+   * @var int
    */
   private static $_gid = NULL;
 
   /**
    * PDF Page Format fields stored in the 'value' field of the Option Value table.
+   * @var array
    */
   private static $optionValueFields = [
     'paper_size' => [
@@ -139,7 +141,7 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
   /**
    * Add ordering fields to Page Format list.
    *
-   * @param array (reference) $list List of PDF Page Formats
+   * @param array $list List of PDF Page Formats
    * @param string $returnURL
    *   URL of page calling this function.
    */
@@ -253,7 +255,7 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
    *
    * @param string $field
    *   Name of a PDF Page Format field.
-   * @param array (reference) $values associative array of name/value pairs containing
+   * @param array $values associative array of name/value pairs containing
    *                                           PDF Page Format field selections
    *
    * @param null $default
index fdf0fc467ac5f77b69aa07d59513946ef6a6a525..80f963badb399a7ea350dea7b54b24200da6bb99 100644 (file)
@@ -34,8 +34,9 @@ class CRM_Core_BAO_PreferencesDate extends CRM_Core_DAO_PreferencesDate {
 
   /**
    * Static holder for the default LT.
+   * @var string
    */
-  static $_defaultPreferencesDate = NULL;
+  public static $_defaultPreferencesDate = NULL;
 
   /**
    * Class constructor.
index 8d5fd872f7bad6fef32955cb4c3941f57ebe8ec7..bca6a1824bb2d9c9a21ca48d266446fc9113578d 100644 (file)
@@ -157,7 +157,8 @@ WHERE  cacheKey     = %3 AND
 
     if (isset($cacheKey)) {
       $sql .= " AND cacheKey LIKE %4";
-      $params[4] = ["{$cacheKey}%", 'String']; // used % to address any row with conflict-cacheKey e.g "merge Individual_8_0_conflicts"
+      // used % to address any row with conflict-cacheKey e.g "merge Individual_8_0_conflicts"
+      $params[4] = ["{$cacheKey}%", 'String'];
     }
 
     CRM_Core_DAO::executeQuery($sql, $params);
@@ -288,7 +289,7 @@ FROM   civicrm_prevnext_cache pn
       if (!empty($select)) {
         $extraData = [];
         foreach ($select as $sfield) {
-          $extraData[$sfield]  = $dao->$sfield;
+          $extraData[$sfield] = $dao->$sfield;
         }
         $main[$count] = [
           'prevnext_id' => $dao->id,
@@ -438,7 +439,6 @@ AND        c.created_date < date_sub( NOW( ), INTERVAL %2 day )
     CRM_Core_DAO::executeQuery($sql, $params);
   }
 
-
   /**
    * Get the selections.
    *
index fcc5b4a5e8a57ebac5e1aa44ab4a61248dd1b302..95ef8907ecb0b8f44ba23bbd6ee5c6fa86d7bd88 100644 (file)
@@ -59,7 +59,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
 
   public static $status = NULL;
 
-  static $_recurringEntityHelper
+  public static $_recurringEntityHelper
     = [
       'civicrm_event' => [
         'helper_class' => 'CRM_Event_DAO_Event',
@@ -73,7 +73,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
       ],
     ];
 
-  static $_dateColumns
+  public static $_dateColumns
     = [
       'civicrm_event' => [
         'dateColumns' => ['start_date'],
@@ -85,7 +85,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
       ],
     ];
 
-  static $_tableDAOMapper
+  public static $_tableDAOMapper
     = [
       'civicrm_event' => 'CRM_Event_DAO_Event',
       'civicrm_price_set_entity' => 'CRM_Price_DAO_PriceSetEntity',
@@ -96,7 +96,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
       'civicrm_activity_contact' => 'CRM_Activity_DAO_ActivityContact',
     ];
 
-  static $_updateSkipFields
+  public static $_updateSkipFields
     = [
       'civicrm_event' => ['start_date', 'end_date'],
       'civicrm_tell_friend' => ['entity_id'],
@@ -104,7 +104,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
       'civicrm_activity' => ['activity_date_time'],
     ];
 
-  static $_linkedEntitiesInfo
+  public static $_linkedEntitiesInfo
     = [
       'civicrm_tell_friend' => [
         'entity_id_col' => 'entity_id',
@@ -418,7 +418,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @return array
    *   an array of child ids
    */
-  static public function getEntitiesForParent($parentId, $entityTable, $includeParent = TRUE, $mode = 3, $initiatorId = NULL) {
+  public static function getEntitiesForParent($parentId, $entityTable, $includeParent = TRUE, $mode = 3, $initiatorId = NULL) {
     $entities = [];
     if (empty($parentId) || empty($entityTable)) {
       return $entities;
@@ -454,7 +454,8 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
       $recurringEntityID = CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_recurring_entity WHERE entity_id = %3 AND entity_table = %2", $queryParams);
       if ($recurringEntityID) {
         $query .= $includeParent ? " AND id >= %4" : " AND id > %4";
-        $query .= " ORDER BY id ASC"; // FIXME: change to order by dates
+        // FIXME: change to order by dates
+        $query .= " ORDER BY id ASC";
         $queryParams[4] = [$recurringEntityID, 'Integer'];
       }
       else {
@@ -488,7 +489,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @return array
    *   array of connected ids
    */
-  static public function getEntitiesFor($entityId, $entityTable, $includeParent = TRUE, $mode = 3) {
+  public static function getEntitiesFor($entityId, $entityTable, $includeParent = TRUE, $mode = 3) {
     $parentId = self::getParentFor($entityId, $entityTable);
     if ($parentId) {
       return self::getEntitiesForParent($parentId, $entityTable, $includeParent, $mode, $entityId);
@@ -510,7 +511,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @return int
    *   unsigned $parentId Parent ID
    */
-  static public function getParentFor($entityId, $entityTable, $includeParent = TRUE) {
+  public static function getParentFor($entityId, $entityTable, $includeParent = TRUE) {
     if (empty($entityId) || empty($entityTable)) {
       return NULL;
     }
@@ -539,7 +540,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @param $entityTable
    * @return array|null
    */
-  static public function getPositionAndCount($entityId, $entityTable) {
+  public static function getPositionAndCount($entityId, $entityTable) {
     $position = $count = 0;
 
     $query = "
@@ -581,7 +582,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    *
    * @return object
    */
-  static public function copyCreateEntity($entityTable, $fromCriteria, $newParams, $createRecurringEntity = TRUE) {
+  public static function copyCreateEntity($entityTable, $fromCriteria, $newParams, $createRecurringEntity = TRUE) {
     $daoName = self::$_tableDAOMapper[$entityTable];
     if (!$daoName) {
       CRM_Core_Error::fatal("DAO Mapper missing for $entityTable.");
@@ -608,7 +609,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @param object $event
    *   An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just updated.
    */
-  static public function triggerUpdate($event) {
+  public static function triggerUpdate($event) {
     // if DB version is earlier than 4.6 skip any processing
     static $currentVer = NULL;
     if (!$currentVer) {
@@ -676,7 +677,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @param object $event
    *   An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just inserted.
    */
-  static public function triggerInsert($event) {
+  public static function triggerInsert($event) {
     $obj =& $event->object;
     if (!array_key_exists($obj->__table, self::$_linkedEntitiesInfo)) {
       return;
@@ -783,7 +784,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @param object $event
    *   An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just deleted.
    */
-  static public function triggerDelete($event) {
+  public static function triggerDelete($event) {
     $obj =& $event->object;
 
     // if DB version is earlier than 4.6 skip any processing
@@ -828,7 +829,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @return bool|\CRM_Core_DAO_RecurringEntity
    * @throws \Exception
    */
-  static public function delEntity($entityId, $entityTable, $isDelLinkedEntities = FALSE) {
+  public static function delEntity($entityId, $entityTable, $isDelLinkedEntities = FALSE) {
     if (empty($entityId) || empty($entityTable)) {
       return FALSE;
     }
@@ -947,7 +948,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    *
    * @return object
    */
-  static public function getScheduleReminderDetailsById($scheduleReminderId) {
+  public static function getScheduleReminderDetailsById($scheduleReminderId) {
     $query = "SELECT *
       FROM civicrm_action_schedule WHERE 1";
     if ($scheduleReminderId) {
@@ -1091,7 +1092,6 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
     return $r;
   }
 
-
   /**
    * This function gets time difference between the two datetime object.
    *
@@ -1104,7 +1104,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
    * @return object
    *   DateTime object which contain time difference
    */
-  static public function getInterval($startDate, $endDate) {
+  public static function getInterval($startDate, $endDate) {
     if ($startDate && $endDate) {
       $startDate = new DateTime($startDate);
       $endDate = new DateTime($endDate);
@@ -1222,10 +1222,12 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
           $seriesEventRecords = CRM_Core_BAO_RecurringEntity::getEntitiesFor($entityId, $entityTable);
           foreach ($seriesEventRecords as $event) {
             //Step-2: Save price set in other series events
-            if (CRM_Price_BAO_PriceSet::removeFrom($event['table'], $event['id'])) {//Remove existing priceset
+            //Remove existing priceset
+            if (CRM_Price_BAO_PriceSet::removeFrom($event['table'], $event['id'])) {
               CRM_Core_BAO_Discount::del($event['id'], $event['table']);
             }
-            CRM_Price_BAO_PriceSet::addTo($event['table'], $event['id'], $priceSet); //Add new price set
+            //Add new price set
+            CRM_Price_BAO_PriceSet::addTo($event['table'], $event['id'], $priceSet);
           }
         }
 
@@ -1235,10 +1237,12 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
           foreach ($seriesEventRecords as $event) {
             //Step-2: Save price set in other series events
             if ($entityId < $event["id"]) {
-              if (CRM_Price_BAO_PriceSet::removeFrom($event['table'], $event['id'])) {//Remove existing priceset
+              //Remove existing priceset
+              if (CRM_Price_BAO_PriceSet::removeFrom($event['table'], $event['id'])) {
                 CRM_Core_BAO_Discount::del($event['id'], $event['table']);
               }
-              CRM_Price_BAO_PriceSet::addTo($event['table'], $event['id'], $priceSet); //Add new price set
+              //Add new price set
+              CRM_Price_BAO_PriceSet::addTo($event['table'], $event['id'], $priceSet);
             }
           }
         }
index b54aec9df1b3a071d94ace25f2963cc6adc5b1ad..ef8336593152ea2e98e766f5baae152bc981725f 100644 (file)
@@ -506,11 +506,11 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
     $query = "SELECT name, id FROM civicrm_tag
               WHERE is_tagset=1 AND parent_id IS NULL and used_for LIKE %1";
     $dao = CRM_Core_DAO::executeQuery($query, [
-        1 => [
-          '%' . $entityTable . '%',
-          'String',
-        ],
-      ], TRUE, NULL, FALSE, FALSE);
+      1 => [
+        '%' . $entityTable . '%',
+        'String',
+      ],
+    ], TRUE, NULL, FALSE, FALSE);
     while ($dao->fetch()) {
       $tagSets[$dao->id] = $dao->name;
     }
@@ -553,7 +553,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
    *
    * @param string $searchString
    *
-   * @return array $childTagIDs
+   * @return array
    *   associated array of child tags in Array('Parent Tag ID' => Array('Child Tag 1', ...)) format
    */
   public static function getChildTags($searchString = NULL) {
@@ -566,11 +566,11 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
 
     // only fetch those tags which has child tags
     $dao = CRM_Utils_SQL_Select::from('civicrm_tag parent')
-              ->join('child', 'INNER JOIN civicrm_tag child ON child.parent_id = parent.id ')
-              ->select('parent.id as parent_id, GROUP_CONCAT(child.id) as child_id')
-              ->where($whereClauses)
-              ->groupBy('parent.id')
-              ->execute();
+      ->join('child', 'INNER JOIN civicrm_tag child ON child.parent_id = parent.id ')
+      ->select('parent.id as parent_id, GROUP_CONCAT(child.id) as child_id')
+      ->where($whereClauses)
+      ->groupBy('parent.id')
+      ->execute();
     while ($dao->fetch()) {
       $childTagIDs[$dao->parent_id] = (array) explode(',', $dao->child_id);
       $parentID = $dao->parent_id;
index 37ee29e17aeceeef784817e13befe0a834545281..dba79c97c89a5dbcf0bed31964c3115ff12ee481 100644 (file)
@@ -38,6 +38,7 @@ class CRM_Core_BAO_UFField extends CRM_Core_DAO_UFField {
 
   /**
    * Batch entry fields.
+   * @var array
    */
   private static $_contriBatchEntryFields = NULL;
   private static $_memberBatchEntryFields = NULL;
@@ -135,7 +136,6 @@ class CRM_Core_BAO_UFField extends CRM_Core_DAO_UFField {
     return $ufField;
   }
 
-
   /**
    * Fetch object based on array of properties.
    *
index ed8f31cec9fa3346b514816bf23781530a5d87f0..5d7f256eb0a4788713c6f61bdeb30a8579d81485 100644 (file)
@@ -44,7 +44,7 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
    *
    * @var string
    */
-  static $_matchFields = NULL;
+  public static $_matchFields = NULL;
 
   /**
    * Fetch object based on array of properties.
@@ -336,7 +336,7 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
       $query .= " AND $permissionClause ";
     }
 
-    if ($orderProfiles AND count($profileIds) > 1) {
+    if ($orderProfiles and count($profileIds) > 1) {
       $query .= " ORDER BY FIELD(  g.id, {$gids} )";
     }
     $group = CRM_Core_DAO::executeQuery($query, $params);
@@ -452,9 +452,9 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
 
     $addressCustom = FALSE;
     if (in_array($permissionType, array(
-        CRM_Core_Permission::CREATE,
-        CRM_Core_Permission::EDIT,
-      )) &&
+      CRM_Core_Permission::CREATE,
+      CRM_Core_Permission::EDIT,
+    )) &&
       in_array($field->field_name, array_keys($addressCustomFields))
     ) {
       $addressCustom = TRUE;
@@ -1877,9 +1877,9 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
       $form->addChainSelect($name, array('label' => $title, 'required' => $required));
       $config = CRM_Core_Config::singleton();
       if (!in_array($mode, array(
-          CRM_Profile_Form::MODE_EDIT,
-          CRM_Profile_Form::MODE_SEARCH,
-        )) &&
+        CRM_Profile_Form::MODE_EDIT,
+        CRM_Profile_Form::MODE_SEARCH,
+      )) &&
         $config->defaultContactStateProvince
       ) {
         $defaultValues[$name] = $config->defaultContactStateProvince;
@@ -1890,9 +1890,9 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
       $form->add('select', $name, $title, array('' => ts('- select -')) + CRM_Core_PseudoConstant::country(), $required, $selectAttributes);
       $config = CRM_Core_Config::singleton();
       if (!in_array($mode, array(
-          CRM_Profile_Form::MODE_EDIT,
-          CRM_Profile_Form::MODE_SEARCH,
-        )) &&
+        CRM_Profile_Form::MODE_EDIT,
+        CRM_Profile_Form::MODE_SEARCH,
+      )) &&
         $config->defaultContactCountry
       ) {
         $defaultValues[$name] = $config->defaultContactCountry;
@@ -2020,11 +2020,11 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
       $profileType = CRM_Core_BAO_UFField::getProfileType($gId, TRUE, FALSE, TRUE);
 
       if (empty($profileType) || in_array($profileType, array(
-          'Contact',
-          'Contribution',
-          'Participant',
-          'Membership',
-        ))
+        'Contact',
+        'Contribution',
+        'Participant',
+        'Membership',
+      ))
       ) {
         $profileType = 'Individual';
       }
@@ -2138,10 +2138,10 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
       $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus();
       $statusName = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
       foreach (array(
-                 'In Progress',
-                 'Overdue',
-                 'Refunded',
-               ) as $suppress) {
+        'In Progress',
+        'Overdue',
+        'Refunded',
+      ) as $suppress) {
         unset($contributionStatuses[CRM_Utils_Array::key($suppress, $statusName)]);
       }
 
@@ -2841,7 +2841,7 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
    * @param array $values
    * @param CRM_Core_Smarty $template
    */
-  static public function profileDisplay($gid, $values, $template) {
+  public static function profileDisplay($gid, $values, $template) {
     $groupTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $gid, 'title');
     $template->assign('grouptitle', $groupTitle);
     if (count($values)) {
index dab5fa387930e2ac7850ae58e99d16445010927b..39731cfa922778ff4d1e3f62a4dd24ca2fe968fd 100644 (file)
@@ -60,7 +60,6 @@ class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch {
     return $dao;
   }
 
-
   /**
    * Given a UF user object, make sure there is a contact
    * object for this user. If the user has new values, we need
index c234f68ccdd4017ce77cf8e81d38f78531c4ce63..f77891ab2564e59026b9480e0633ab39a86a7747 100644 (file)
@@ -80,7 +80,6 @@ class CRM_Core_BAO_WordReplacement extends CRM_Core_DAO_WordReplacement {
     return $wordReplacement;
   }
 
-
   /**
    * Save the values of a WordReplacement.
    *
index 252aa96319a05b1c568a00ac53ea6061d3e20909..a34bf4da646ebdfe9d7a271919b5207d5a219356 100644 (file)
@@ -54,8 +54,9 @@ class CRM_Core_Block {
 
   /**
    * Template file names for the above blocks.
+   * @var array
    */
-  static $_properties = NULL;
+  public static $_properties = NULL;
 
   /**
    * Class constructor.
index 9adc75a4434dc51f525e61a0f0fa034cce3a436c..8853913d98a40c8409a503663b6a1caa976cf015 100644 (file)
@@ -4,6 +4,7 @@
  * Generate configuration files
  */
 class CRM_Core_CodeGen_Config extends CRM_Core_CodeGen_BaseTask {
+
   public function run() {
     $this->setupCms();
   }
index d34f30a5d26009dfe5c42f1fccc94292e0c7ed2e..9cab2ce446b09e81be078424dec9c1969a4453ba 100644 (file)
@@ -4,6 +4,7 @@
  * Generate language files and classes
  */
 class CRM_Core_CodeGen_I18n extends CRM_Core_CodeGen_BaseTask {
+
   public function run() {
     $this->generateInstallLangs();
     $this->generateSchemaStructure();
index 978f3e9cae2732018a1004de77ae4a7737e3d5db..7729ea81e8e4f51bbbb138d3c6fa5772103e5875 100644 (file)
@@ -4,15 +4,23 @@
  * Class CRM_Core_CodeGen_Main
  */
 class CRM_Core_CodeGen_Main {
-  var $buildVersion;
-  var $db_version;
-  var $cms; // drupal, joomla, wordpress
+  public $buildVersion;
+  public $db_version;
+  /**
+   * drupal, joomla, wordpress
+   * @var string
+   */
+  public $cms;
 
-  var $CoreDAOCodePath;
-  var $sqlCodePath;
-  var $phpCodePath;
-  var $tplCodePath;
-  var $schemaPath; // ex: schema/Schema.xml
+  public $CoreDAOCodePath;
+  public $sqlCodePath;
+  public $phpCodePath;
+  public $tplCodePath;
+  /**
+   * ex: schema/Schema.xml
+   * @var string
+   */
+  public $schemaPath;
 
   /**
    * Definitions of all tables.
@@ -20,24 +28,24 @@ class CRM_Core_CodeGen_Main {
    * @var array
    *   Ex: $tables['civicrm_address_format']['className'] = 'CRM_Core_DAO_AddressFormat';
    */
-  var $tables;
+  public $tables;
 
   /**
    * @var array
    *   Ex: $database['tableAttributes_modern'] = "ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci";
    */
-  var $database;
+  public $database;
 
   /**
    * @var string|NULL path in which to store a marker that indicates the last execution of
    * GenCode. If a matching marker already exists, GenCode doesn't run.
    */
-  var $digestPath;
+  public $digestPath;
 
   /**
    * @var string|NULL a digest of the inputs to the code-generator (eg the properties and source files)
    */
-  var $sourceDigest;
+  public $sourceDigest;
 
   /**
    * @param $CoreDAOCodePath
index 660d8d619220ac690856e2e050e38c81f251ac23..e5da1c609aa271c639cc699eba3008a429f21d43 100644 (file)
@@ -15,6 +15,7 @@ class CRM_Core_CodeGen_Specification {
    * @param $schemaPath
    * @param string $buildVersion
    *   Which version of the schema to build.
+   * @param bool $verbose
    */
   public function parse($schemaPath, $buildVersion, $verbose = TRUE) {
     $this->buildVersion = $buildVersion;
index e87e6539a797ca6343de2b6ac52f52179ddf4109..26f70304543224b70a00a5b7651beaa27802ee5f 100644 (file)
@@ -4,6 +4,7 @@
  * Generate files used during testing.
  */
 class CRM_Core_CodeGen_Test extends CRM_Core_CodeGen_BaseTask {
+
   public function run() {
     $this->generateCiviTestTruncate();
   }
index c2cedac40c5429d0f056464b1e3491cff90d5ef7..1e77801a7004836cae28e15add4e27f24d2730d8 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Core_CodeGen_Util_File
  */
 class CRM_Core_CodeGen_Util_File {
+
   /**
    * @param $dir
    * @param int $perm
index 96f94477e9a6acba81037d2fd3bc19381449861d..8d64be7006c3a61259f4fb0e03459f0978a83b00 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Core_CodeGen_Util_Xml
  */
 class CRM_Core_CodeGen_Util_Xml {
+
   /**
    * @param string $file
    *   Path to input.
index 9e7ad56aa35859cfe46f2f1d8b9fbba9b358d09b..6d660dc4950fd6042f6c86c308507ab5ad0d4e1c 100644 (file)
@@ -36,7 +36,8 @@ class CRM_Core_CommunityMessages {
   /**
    * Default time to wait before retrying.
    */
-  const DEFAULT_RETRY = 7200; // 2 hours
+  // 2 hours
+  const DEFAULT_RETRY = 7200;
 
   /**
    * @var CRM_Utils_HttpClient
@@ -96,7 +97,8 @@ class CRM_Core_CommunityMessages {
     if (empty($document) || !is_array($document)) {
       $document = [
         'messages' => [],
-        'expires' => 0, // ASAP
+        // ASAP
+        'expires' => 0,
         'ttl' => self::DEFAULT_RETRY,
         'retry' => self::DEFAULT_RETRY,
       ];
index f7161bc5006e8e290a86df399f7733412bba4621..9f3dfdac435e3c62ff374932dd8eaa3adf912116 100644 (file)
@@ -42,7 +42,10 @@ class CRM_Core_Component {
    */
   const COMPONENT_INFO_CLASS = 'Info';
 
-  static $_contactSubTypes = NULL;
+  /**
+   * @var array
+   */
+  public static $_contactSubTypes = NULL;
 
   /**
    * @param bool $force
@@ -128,17 +131,16 @@ class CRM_Core_Component {
     return $componentIDs;
   }
 
-
   /**
    * @param bool $force
    *
    * @return CRM_Core_Component_Info[]
    */
-  static public function &getEnabledComponents($force = FALSE) {
+  public static function &getEnabledComponents($force = FALSE) {
     return self::_info($force);
   }
 
-  static public function flushEnabledComponents() {
+  public static function flushEnabledComponents() {
     unset(Civi::$statics[__CLASS__]);
   }
 
@@ -388,7 +390,6 @@ class CRM_Core_Component {
     return self::$_contactSubTypes;
   }
 
-
   /**
    * @param $subType
    * @param $op
index cd382e17d6f5dc7cb0822774e69080ad454a678e..b9c632feb6d213eebb5052e0675c609507d4d42c 100644 (file)
@@ -138,7 +138,7 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge {
    * @return object
    * @see Civi::log()
    */
-  static public function &getLog() {
+  public static function &getLog() {
     if (!isset(self::$_log)) {
       self::$_log = Log::singleton('display');
     }
@@ -181,11 +181,11 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge {
     // Whether we delete/create or simply preserve directories, we should
     // certainly make sure the restrictions are enforced.
     foreach ([
-               $this->templateCompileDir,
-               $this->uploadDir,
-               $this->configAndLogDir,
-               $this->customFileUploadDir,
-             ] as $dir) {
+      $this->templateCompileDir,
+      $this->uploadDir,
+      $this->configAndLogDir,
+      $this->customFileUploadDir,
+    ] as $dir) {
       if ($dir && is_dir($dir)) {
         CRM_Utils_File::restrictAccess($dir);
       }
@@ -576,7 +576,7 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge {
   /**
    * Is the system permitted to flush caches at the moment.
    */
-  static public function isPermitCacheFlushMode() {
+  public static function isPermitCacheFlushMode() {
     return !CRM_Core_Config::singleton()->doNotResetCache;
   }
 
@@ -589,7 +589,7 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge {
    * @param bool $enabled
    *   If true then caches can be cleared at this time.
    */
-  static public function setPermitCacheFlushMode($enabled) {
+  public static function setPermitCacheFlushMode($enabled) {
     CRM_Core_Config::singleton()->doNotResetCache = $enabled ? 0 : 1;
   }
 
index 90aa741bf8b479d2129f817d776f3b64e3565b4a..ffb7e64347085c6d2cfaeb024fbe1a448aa1ccb0 100644 (file)
@@ -54,7 +54,8 @@ class CRM_Core_Config_MagicMerge {
    */
   private $map;
 
-  private $locals, $settings;
+  private $locals;
+  private $settings;
 
   private $cache = [];
 
@@ -116,7 +117,8 @@ class CRM_Core_Config_MagicMerge {
 
       'userFrameworkBaseURL' => ['user-system', 'getAbsoluteBaseURL'],
       'userFrameworkVersion' => ['user-system', 'getVersion'],
-      'useFrameworkRelativeBase' => ['user-system', 'getRelativeBaseURL'], // ugh typo.
+    // ugh typo.
+      'useFrameworkRelativeBase' => ['user-system', 'getRelativeBaseURL'],
 
       // "setting" properties are loaded through the setting layer, esp
       // table "civicrm_setting" and global $civicrm_setting.
@@ -133,14 +135,16 @@ class CRM_Core_Config_MagicMerge {
       'dateformatYear' => ['setting'],
       'dateformatFinancialBatch' => ['setting'],
       'dateformatshortdate' => ['setting'],
-      'debug' => ['setting', 'debug_enabled'], // renamed.
+      // renamed.
+      'debug' => ['setting', 'debug_enabled'],
       'defaultContactCountry' => ['setting'],
       'defaultContactStateProvince' => ['setting'],
       'defaultCurrency' => ['setting'],
       'defaultSearchProfileID' => ['setting'],
       'doNotAttachPDFReceipt' => ['setting'],
       'empoweredBy' => ['setting'],
-      'enableComponents' => ['setting', 'enable_components'], // renamed.
+      // renamed.
+      'enableComponents' => ['setting', 'enable_components'],
       'enableSSL' => ['setting'],
       'fatalErrorHandler' => ['setting'],
       'fieldSeparator' => ['setting'],
@@ -164,7 +168,8 @@ class CRM_Core_Config_MagicMerge {
       'mapAPIKey' => ['setting'],
       'mapProvider' => ['setting'],
       'maxFileSize' => ['setting'],
-      'maxAttachments' => ['setting', 'max_attachments'], // renamed.
+      // renamed.
+      'maxAttachments' => ['setting', 'max_attachments'],
       'monetaryDecimalPoint' => ['setting'],
       'monetaryThousandSeparator' => ['setting'],
       'moneyformat' => ['setting'],
index 51a4cc3d340ea1c49afe78aaad49fa3bd5c588ee..d1aef183d9b706cb897dd80aaf68a4d3945d085a 100644 (file)
@@ -174,11 +174,16 @@ class CRM_Core_Config_Runtime extends CRM_Core_Config_MagicMerge {
   public static function getId() {
     if (!isset(Civi::$statics[__CLASS__]['id'])) {
       Civi::$statics[__CLASS__]['id'] = md5(implode(\CRM_Core_DAO::VALUE_SEPARATOR, [
-        defined('CIVICRM_DOMAIN_ID') ? CIVICRM_DOMAIN_ID : 1, // e.g. one database, multi URL
-        parse_url(CIVICRM_DSN, PHP_URL_PATH), // e.g. one codebase, multi database
-        \CRM_Utils_Array::value('SCRIPT_FILENAME', $_SERVER, ''), // e.g. CMS vs extern vs installer
-        \CRM_Utils_Array::value('HTTP_HOST', $_SERVER, ''), // e.g. name-based vhosts
-        \CRM_Utils_Array::value('SERVER_PORT', $_SERVER, ''), // e.g. port-based vhosts
+        // e.g. one database, multi URL
+        defined('CIVICRM_DOMAIN_ID') ? CIVICRM_DOMAIN_ID : 1,
+        // e.g. one codebase, multi database
+        parse_url(CIVICRM_DSN, PHP_URL_PATH),
+        // e.g. CMS vs extern vs installer
+        \CRM_Utils_Array::value('SCRIPT_FILENAME', $_SERVER, ''),
+        // e.g. name-based vhosts
+        \CRM_Utils_Array::value('HTTP_HOST', $_SERVER, ''),
+        // e.g. port-based vhosts
+        \CRM_Utils_Array::value('SERVER_PORT', $_SERVER, ''),
         // Depending on deployment arch, these signals *could* be redundant, but who cares?
       ]));
     }
index 1bd454992d7c256dfefdad1bd6fd9b91c2333863..a5141627c7d3cd03a81ede4e3d6a1cb18c8ddb66 100644 (file)
@@ -276,11 +276,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
 
   public function fini() {
     CRM_Core_BAO_Cache::storeSessionToCache([
-        "_{$this->_name}_container",
-        ['CiviCRM', $this->_scope],
-      ],
-      TRUE
-    );
+      "_{$this->_name}_container",
+      ['CiviCRM', $this->_scope],
+    ], TRUE);
   }
 
   /**
index ea7abcc085730fe625e464ad115c5d2eb19e470a..027dba4a89fd3b0b262541ac9b4ca2980ddc6f5b 100644 (file)
@@ -59,14 +59,14 @@ class CRM_Core_DAO extends DB_DataObject {
    * @var null
    * @deprecated
    */
-  static $_nullObject = NULL;
+  public static $_nullObject = NULL;
   /**
    * @var array
    * @deprecated
    */
-  static $_nullArray = [];
+  public static $_nullArray = [];
 
-  static $_dbColumnValueCache = NULL;
+  public static $_dbColumnValueCache = NULL;
   const NOT_NULL = 1, IS_NULL = 2,
     DB_DAO_NOTNULL = 128,
     VALUE_SEPARATOR = "\ 1",
@@ -101,18 +101,19 @@ class CRM_Core_DAO extends DB_DataObject {
    * test objects - this prevents world regions, countries etc from being added / deleted
    * @var array
    */
-  static $_testEntitiesToSkip = [];
+  public static $_testEntitiesToSkip = [];
   /**
    * The factory class for this application.
    * @var object
    */
-  static $_factory = NULL;
+  public static $_factory = NULL;
 
-  static $_checkedSqlFunctionsExist = FALSE;
+  public static $_checkedSqlFunctionsExist = FALSE;
 
   /**
    * https://issues.civicrm.org/jira/browse/CRM-17748
    * internal variable for DAO to hold per-query settings
+   * @var array
    */
   protected $_options = [];
 
@@ -1342,7 +1343,7 @@ FROM   civicrm_domain
    * @return CRM_Core_DAO
    *   Object that points to an unbuffered result set
    */
-  static public function executeUnbufferedQuery(
+  public static function executeUnbufferedQuery(
     $query,
     $params = [],
     $abort = TRUE,
@@ -1985,7 +1986,8 @@ SELECT contact_id
     $object = new $daoName();
     $object->id = CRM_Utils_Array::value('id', $params);
 
-    $deletions = []; // array(array(0 => $daoName, 1 => $daoParams))
+    // array(array(0 => $daoName, 1 => $daoParams))
+    $deletions = [];
     if ($object->find(TRUE)) {
 
       $fields = $object->fields();
@@ -2003,7 +2005,8 @@ SELECT contact_id
           // to make this test process pass - line below makes pass for now
           && $dbName != 'member_of_contact_id'
         ) {
-          $deletions[] = [$FKClassName, ['id' => $object->$dbName]]; // x
+          // x
+          $deletions[] = [$FKClassName, ['id' => $object->$dbName]];
         }
       }
     }
@@ -2358,7 +2361,6 @@ SELECT contact_id
     }
   }
 
-
   /**
    * Update the fields array to also hold keys for pseudoconstant fields that relate to contained fields.
    *
@@ -2549,7 +2551,8 @@ SELECT contact_id
               return (sprintf('%s ' . $operator . ' "%s" AND "%s"', $fieldName, CRM_Core_DAO::escapeString($criteria[0]), CRM_Core_DAO::escapeString($criteria[1])));
             }
             else {
-              return NULL;  // not yet implemented (tests required to implement)
+              // not yet implemented (tests required to implement)
+              return NULL;
             }
             break;
 
@@ -2575,7 +2578,8 @@ SELECT contact_id
               return (sprintf('%s %s "%s"', $fieldName, $operator, CRM_Core_DAO::escapeString($criteria)));
             }
             else {
-              return NULL; // not yet implemented (tests required to implement)
+              // not yet implemented (tests required to implement)
+              return NULL;
             }
         }
       }
index 41895ed7c45bc00b338845186a3df72fea3349e5..52ee98d4dc47be9393627998cf81b595b6d5acf7 100644 (file)
@@ -43,6 +43,7 @@ require_once 'Log.php';
  * Class CRM_Exception
  */
 class CRM_Exception extends PEAR_Exception {
+
   /**
    * Redefine the exception so message isn't optional.
    *
@@ -94,6 +95,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
 
   /**
    * If modeException == true, errors are raised as exception instead of returning civicrm_errors
+   * @var bool
    */
   public static $modeException = NULL;
 
@@ -139,7 +141,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
    *
    * @return array|null|string
    */
-  static public function getMessages(&$error, $separator = '<br />') {
+  public static function getMessages(&$error, $separator = '<br />') {
     if (is_a($error, 'CRM_Core_Error')) {
       $errors = $error->getErrors();
       $message = [];
@@ -208,13 +210,15 @@ class CRM_Core_Error extends PEAR_ErrorStack {
           $link = $conn->connection;
           if (mysqli_error($link)) {
             $mysql_error = mysqli_error($link) . ', ' . mysqli_errno($link);
-            mysqli_query($link, 'select 1'); // execute a dummy query to clear error stack
+            // execute a dummy query to clear error stack
+            mysqli_query($link, 'select 1');
           }
         }
         elseif ($conn instanceof DB_mysql) {
           if (mysql_error()) {
             $mysql_error = mysql_error() . ', ' . mysql_errno();
-            mysql_query('select 1'); // execute a dummy query to clear error stack
+            // execute a dummy query to clear error stack
+            mysql_query('select 1');
           }
         }
         else {
index df614d75e9784659dee997ae72a84033aa1b5345..b396667fe7f4306d153fa680da40dc5e47eacf8c 100644 (file)
@@ -162,6 +162,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
 
   /**
    *  Indicate if this form should warn users of unsaved changes
+   * @var bool
    */
   protected $unsavedChangesWarn;
 
@@ -227,8 +228,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   const CB_PREFIX = 'mark_x_', CB_PREFIY = 'mark_y_', CB_PREFIZ = 'mark_z_', CB_PREFIX_LEN = 7;
 
   /**
-   * @internal to keep track of chain-select fields
    * @var array
+   * @internal to keep track of chain-select fields
    */
   private $_chainSelectFields = [];
 
@@ -491,10 +492,9 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
 
     // Respond with JSON if in AJAX context (also support legacy value '6')
     if ($allowAjax && !empty($_REQUEST['snippet']) && in_array($_REQUEST['snippet'], [
-          CRM_Core_Smarty::PRINT_JSON,
-          6,
-        ])
-    ) {
+      CRM_Core_Smarty::PRINT_JSON,
+      6,
+    ])) {
       $this->ajaxResponse['buttonName'] = str_replace('_qf_' . $this->getAttribute('id') . '_', '', $this->controller->getButtonName());
       $this->ajaxResponse['action'] = $this->_action;
       if (isset($this->_id) || isset($this->id)) {
@@ -1391,7 +1391,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
         $props['context'] = $this->getDefaultContext();
       }
       // This is not a required param, so we'll ignore if this doesn't exist.
-      catch (Exception $e) {}
+      catch (Exception $e) {
+      }
     }
     // Fetch options from the api unless passed explicitly
     if (isset($props['options'])) {
@@ -1458,7 +1459,9 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
    *
    * @throws \CiviCRM_API3_Exception
    * @throws \Exception
-   * @return HTML_QuickForm_Element
+   * @return mixed
+   *   HTML_QuickForm_Element
+   *   void
    */
   public function addField($name, $props = [], $required = FALSE, $legacyDate = TRUE) {
     // Resolve context.
@@ -1497,10 +1500,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
     }
 
     $isSelect = (in_array($widget, [
-          'Select',
-          'CheckBoxGroup',
-          'RadioGroup',
-          'Radio',
+      'Select',
+      'CheckBoxGroup',
+      'RadioGroup',
+      'Radio',
     ]));
 
     if ($isSelect) {
@@ -2173,9 +2176,9 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
     if ($this->canUseAjaxContactLookups()) {
       $this->assign('selectable', $autoCompleteField['id_field']);
       $this->addEntityRef($autoCompleteField['id_field'], NULL, [
-          'placeholder' => $autoCompleteField['placeholder'],
-          'api' => $autoCompleteField['api'],
-        ]);
+        'placeholder' => $autoCompleteField['placeholder'],
+        'api' => $autoCompleteField['api'],
+      ]);
 
       CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/AlternateContactSelector.js', 1, 'html-header')
         ->addSetting([
@@ -2298,11 +2301,11 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
   public function addChainSelect($elementName, $settings = []) {
     $props = $settings += [
       'control_field' => str_replace(['state_province', 'StateProvince', 'county', 'County'], [
-          'country',
-          'Country',
-          'state_province',
-          'StateProvince',
-        ], $elementName),
+        'country',
+        'Country',
+        'state_province',
+        'StateProvince',
+      ], $elementName),
       'data-callback' => strpos($elementName, 'rovince') ? 'civicrm/ajax/jqState' : 'civicrm/ajax/jqCounty',
       'label' => strpos($elementName, 'rovince') ? ts('State/Province') : ts('County'),
       'data-empty-prompt' => strpos($elementName, 'rovince') ? ts('Choose country first') : ts('Choose state first'),
@@ -2337,7 +2340,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
       $this->setConstants(['task' => '']);
       $this->assign('taskMetaData', $tasks);
       $select = $this->add('select', 'task', NULL, ['' => ts('Actions')], FALSE, [
-        'class' => 'crm-select2 crm-action-menu fa-check-circle-o huge crm-search-result-actions']
+        'class' => 'crm-select2 crm-action-menu fa-check-circle-o huge crm-search-result-actions',
+      ]
       );
       foreach ($tasks as $key => $task) {
         $attributes = [];
@@ -2428,7 +2432,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
             if (!array_intersect($targetValue, array_keys($options))) {
               $this->setElementError($target, $controlType == 'country' ? ts('State/Province does not match the selected Country') : ts('County does not match the selected State/Province'));
             }
-          } // Suppress "required" error for field if it has no options
+          }
+          // Suppress "required" error for field if it has no options
           elseif (!$options) {
             $this->setElementError($target, NULL);
           }
index 354762f65bb6a54a9a1a9253929f3a932608dcc9..046f0f880322bee9ba34b1ad445e16b874f1fb8e 100644 (file)
@@ -65,7 +65,6 @@ class CRM_Core_Form_Date {
     $form->setDefaults(['dateFormats' => self::DATE_yyyy_mm_dd]);
   }
 
-
   /**
    * Retrieve the date range - relative or absolute and assign it to the form.
    *
index 96a15fdcd8c99bf965b72cb1957e750815506cf9..38f2548208f0268ee380624dd24b9e13b9f3d5c1 100644 (file)
@@ -30,7 +30,6 @@
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2019
  */
-
 trait CRM_Core_Form_EntityFormTrait {
 
   /**
@@ -134,27 +133,25 @@ trait CRM_Core_Form_EntityFormTrait {
   protected function addFormButtons() {
     if ($this->isViewContext() || $this->_action & CRM_Core_Action::PREVIEW) {
       $this->addButtons([
-          [
-            'type' => 'cancel',
-            'name' => ts('Done'),
-            'isDefault' => TRUE,
-          ],
-        ]
-      );
+        [
+          'type' => 'cancel',
+          'name' => ts('Done'),
+          'isDefault' => TRUE,
+        ],
+      ]);
     }
     else {
       $this->addButtons([
-          [
-            'type' => 'next',
-            'name' => $this->isDeleteContext() ? ts('Delete') : ts('Save'),
-            'isDefault' => TRUE,
-          ],
-          [
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ],
-        ]
-      );
+        [
+          'type' => 'next',
+          'name' => $this->isDeleteContext() ? ts('Delete') : ts('Save'),
+          'isDefault' => TRUE,
+        ],
+        [
+          'type' => 'cancel',
+          'name' => ts('Cancel'),
+        ],
+      ]);
     }
   }
 
@@ -165,8 +162,7 @@ trait CRM_Core_Form_EntityFormTrait {
     $defaults = $moneyFields = [];
 
     if (!$this->isDeleteContext() &&
-      $this->getEntityId()
-    ) {
+      $this->getEntityId()) {
       $params = ['id' => $this->getEntityId()];
       $baoName = $this->_BAOName;
       $baoName::retrieve($params, $defaults);
index 97f7bfaf136373064657c7dd6f74f7bccf4acf4a..85f53b22e23dbac4220d64f6d26aa34db286bf47 100644 (file)
 class CRM_Core_Form_RecurringEntity {
   /**
    *  Current entity id
+   * @var int
    */
   protected static $_entityId = NULL;
 
   /**
    * Schedule Reminder ID
+   * @var int
    */
   protected static $_scheduleReminderID = NULL;
 
   /**
    * Schedule Reminder data
+   * @var array
    */
   protected static $_scheduleReminderDetails = [];
 
   /**
    *  Parent Entity ID
+   * @var int
    */
   protected static $_parentEntityId = NULL;
 
   /**
    * Exclude date information
+   * @var array
    */
   public static $_excludeDateInfo = [];
 
   /**
    * Entity Table
+   * @var string
    */
   public static $_entityTable;
 
   /**
    * Checks current entityID has parent
+   * @var string
    */
   public static $_hasParent = FALSE;
 
@@ -219,17 +226,16 @@ class CRM_Core_Form_RecurringEntity {
     $form->add('text', 'exclude_date_list', ts('Exclude Dates'), ['class' => 'twenty']);
     $form->addElement('hidden', 'allowRepeatConfigToSubmit', '', ['id' => 'allowRepeatConfigToSubmit']);
     $form->addButtons([
-        [
-          'type' => 'submit',
-          'name' => ts('Save'),
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => 'submit',
+        'name' => ts('Save'),
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
     // For client-side pluralization
     $form->assign('recurringFrequencyOptions', [
       'single' => CRM_Utils_Array::makeNonAssociative(CRM_Core_SelectValues::getRecurringFrequencyUnits()),
index 201c266f0753c046fb93887c0fc3b829ac9e76e8..0809b46099395cf0381f0e02bdfe51d15ebbb0da 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty {
    *
    * @var array
    */
-  static $_sizeMapper = [
+  public static $_sizeMapper = [
     2 => 'two',
     4 => 'four',
     6 => 'six',
@@ -370,9 +370,9 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty {
           }
         }
         $field->setAttribute('data-entity-value', json_encode([
-              'id' => $contact['id'],
-              'text' => implode(' :: ', $view),
-            ]));
+          'id' => $contact['id'],
+          'text' => implode(' :: ', $view),
+        ]));
       }
     }
   }
index 836ed37eecb32cf162a9bc5abd4e5ce62d4819ba..cb5839bf877e39b010002ff1b51689b343bf8e0a 100644 (file)
@@ -170,6 +170,8 @@ class CRM_Core_Form_Search extends CRM_Core_Form {
    *
    * @param array $fields
    *   Posted values of the form.
+   * @param array $files
+   * @param object $form
    *
    * @return array
    *   list of errors to be posted back to the form
index 8d5d2b1ad1d64de3e8e5449f70caa0d394e42e4e..7d77c4c0fbf5fc8849e689e04f7a5449a846e706 100644 (file)
@@ -44,13 +44,13 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form {
    * Values should be an array with label and select.
    * Select can be NULL if there is no entity to select.
    * Otherwise it contains the shortcode key for this entity id (usually 'id') plus an array of params for the EntityRef field
-   * @see CRM_Core_Form::addEntityRef
    *
    * @var array
    *   [component => [
    *     label => Option Label
    *     select => key + EntityRef params
    *   ]]
+   * @see CRM_Core_Form::addEntityRef
    */
   public $components = [];
 
@@ -65,7 +65,6 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form {
    */
   public $options = [];
 
-
   /**
    * Build form data. Can be modified via hook_civicrm_preProcess.
    */
index c79fcf5321acbcbed76827b853d81636548a357e..d9279d2000725532af65ed958ae34a96e788eb9d 100644 (file)
@@ -80,14 +80,14 @@ abstract class CRM_Core_Form_Task extends CRM_Core_Form {
    *
    * @var string
    */
-  static $tableName = NULL;
+  public static $tableName = NULL;
 
   /**
    * Must be set to entity shortname (eg. event)
    *
    * @var string
    */
-  static $entityShortname = NULL;
+  public static $entityShortname = NULL;
 
   /**
    * Build all the data structures needed to build the form.
@@ -195,17 +195,16 @@ abstract class CRM_Core_Form_Task extends CRM_Core_Form {
    */
   public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
     $this->addButtons([
-        [
-          'type' => $nextType,
-          'name' => $title,
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => $backType,
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => $nextType,
+        'name' => $title,
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => $backType,
+        'name' => ts('Cancel'),
+      ],
+    ]);
   }
 
   /**
index 76d1b857563228197cf8717c8f1f9294de5366be..9e56fe92925a65f7e6df0b6dcd7e89a7a13a3a00 100644 (file)
@@ -44,6 +44,7 @@ class CRM_Core_Form_Task_Batch extends CRM_Core_Form_Task {
 
   /**
    * Maximum profile fields that will be displayed.
+   * @var int
    */
   protected $_maxFields = 9;
 
@@ -52,10 +53,16 @@ class CRM_Core_Form_Task_Batch extends CRM_Core_Form_Task {
    */
   protected $_fields;
 
-  // Must be set to entity table name (eg. civicrm_participant) by child class
-  static $tableName = NULL;
-  // Must be set to entity shortname (eg. event)
-  static $entityShortname = NULL;
+  /**
+   * Must be set to entity table name (eg. civicrm_participant) by child class
+   * @var string
+   */
+  public static $tableName = NULL;
+  /**
+   * Must be set to entity shortname (eg. event)
+   * @var string
+   */
+  public static $entityShortname = NULL;
 
   /**
    * Build all the data structures needed to build the form.
index 5fd95efa67efb15c1084f2fd7ca8949abfc60f32..171d5c7846ea4976277d17c68969f5b5682ca343 100644 (file)
@@ -132,15 +132,15 @@ class CRM_Core_Form_Task_PDFLetterCommon {
 
     $config = CRM_Core_Config::singleton();
     /** CRM-15883 Suppressing Stationery path field until we switch from DOMPDF to a library that supports it.
-    if ($config->wkhtmltopdfPath == FALSE) {
-    $form->add(
-    'text',
-    'stationery',
-    ts('Stationery (relative path to PDF you wish to use as the background)'),
-    array('size' => 25, 'maxlength' => 900, 'onkeyup' => "showUpdateFormatChkBox();"),
-    FALSE
-    );
-    }
+     * if ($config->wkhtmltopdfPath == FALSE) {
+     * $form->add(
+     * 'text',
+     * 'stationery',
+     * ts('Stationery (relative path to PDF you wish to use as the background)'),
+     * array('size' => 25, 'maxlength' => 900, 'onkeyup' => "showUpdateFormatChkBox();"),
+     * FALSE
+     * );
+     * }
      */
     $form->add('checkbox', 'bind_format', ts('Always use this Page Format with the selected Template'));
     $form->add('checkbox', 'update_format', ts('Update Page Format (this will affect all templates that use this format)'));
index 4043833a556224a88f11cad208579b8c894eccd9..926fdf30973d55f6a8d350b1e6fecebd60085af5 100644 (file)
@@ -61,14 +61,14 @@ abstract class CRM_Core_Form_Task_PickProfile extends CRM_Core_Form_Task {
    *
    * @var string
    */
-  static $tableName = NULL;
+  public static $tableName = NULL;
 
   /**
    * Must be set to entity shortname (eg. event)
    *
    * @var string
    */
-  static $entityShortname = NULL;
+  public static $entityShortname = NULL;
 
   /**
    * Build all the data structures needed to build the form.
index 425565de5bce60039deedd50cc90181fc2769bfe..217aec7397cd25876db3a0e76cbae3f6e39b8280 100644 (file)
@@ -71,11 +71,13 @@ class CRM_Core_I18n {
   /**
    * A PHP-gettext instance for string translation;
    * should stay null if the strings are not to be translated (en_US).
+   * @var object
    */
   private $_phpgettext = NULL;
 
   /**
    * Whether we are using native gettext or not.
+   * @var bool
    */
   private $_nativegettext = FALSE;
 
@@ -83,6 +85,7 @@ class CRM_Core_I18n {
    * Gettext cache for extension domains/streamers, depending on if native or phpgettext.
    * - native gettext: we cache the value for textdomain()
    * - phpgettext: we cache the file streamer.
+   * @var array
    */
   private $_extensioncache = [];
 
@@ -243,8 +246,8 @@ class CRM_Core_I18n {
 
   /**
    * Return the available UI languages
-   * @return array(string languageCode) if $justCodes
-   *         array(string languageCode => string languageName) if !$justCodes
+   * @return array|string
+   *   array(string languageCode => string languageName) if !$justCodes
    */
   public static function uiLanguages($justCodes = FALSE) {
     // In multilang we only allow the languages that are configured in db
@@ -617,7 +620,6 @@ class CRM_Core_I18n {
     return FALSE;
   }
 
-
   /**
    * Is the CiviCRM in multilingual mode.
    *
index 8433616cdd74f4aec5db20c17826dbf1bc5ca2c3..bc8b776af1fa4bbdcaff6dc63c9675836e792e34 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 class CRM_Core_I18n_Form extends CRM_Core_Form {
+
   public function buildQuickForm() {
     $config = CRM_Core_Config::singleton();
     $tsLocale = CRM_Core_I18n::getLocale();
index 721b37c1b875e25d26ffed6616a33418bff7208e..cec8fbfa6e590368fe95f9393c9eb7b7dd8ed4e7 100644 (file)
@@ -34,6 +34,7 @@
  * Convenience class for PHP-Gettext compatibility.
  */
 class CRM_Core_I18n_NativeGettext {
+
   /**
    * @param $string
    *
index 5bc0a76f01736491a82d698a2eb1b51fa09a5f94..e2468d6e6af7fda12d7a158f3e09f353f6e5a8a3 100644 (file)
@@ -23,7 +23,7 @@
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -42,7 +42,7 @@ class CRM_Core_I18n_SchemaStructure {
    *   A table-indexed array of translatable columns.
    */
   public static function &columns() {
-    static $result = null;
+    static $result = NULL;
     if (!$result) {
       $result = [
         'civicrm_location_type' => [
@@ -214,7 +214,7 @@ class CRM_Core_I18n_SchemaStructure {
    *   Indices for translatable fields.
    */
   public static function &indices() {
-    static $result = null;
+    static $result = NULL;
     if (!$result) {
       $result = [
         'civicrm_custom_group' => [
@@ -257,8 +257,8 @@ class CRM_Core_I18n_SchemaStructure {
    * @return array
    *   Array of names of tables with fields that can be translated.
    */
-  static function &tables() {
-    static $result = null;
+  public static function &tables() {
+    static $result = NULL;
     if (!$result) {
       $result = array_keys(self::columns());
     }
@@ -271,8 +271,8 @@ class CRM_Core_I18n_SchemaStructure {
    * @return array
    *   Array of the widgets for editing translatable fields.
    */
-  static function &widgets() {
-    static $result = null;
+  public static function &widgets() {
+    static $result = NULL;
     if (!$result) {
       $result = [
         'civicrm_location_type' => [
index 2450e0f27784de31ce6086303f8a55d3f401e0af..cfb456f973aa19f57875314096e07b7b2141c20a 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 class CRM_Core_I18n_SchemaStructure_4_2_alpha1 {
+
   /**
    * @return array
    */
index 6078d089ed8fe65b9dcfec55f9f743200de346e4..69f038d049a95257a4bbf799d8234e5cf9de5d9b 100644 (file)
@@ -33,6 +33,7 @@
  *
  */
 class CRM_Core_I18n_SchemaStructure_4_3_1 {
+
   /**
    * @return array
    */
index 0ecc107866e03aa7bf2a197c08530d0e6674e3cf..c5cb4f4431d3da362ef57f645826cfa805b03286 100644 (file)
@@ -34,6 +34,7 @@
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
  */
 class CRM_Core_I18n_SchemaStructure_4_5_alpha1 {
+
   /**
    * @return array
    */
index 648b680d22ff79638c7cd2f321161ba5bc794bd7..92af8f69c282a43881c143bf2ea26a64b8d7bc02 100644 (file)
@@ -34,6 +34,7 @@ class CRM_Core_IDS {
 
   /**
    * Define the threshold for the ids reactions.
+   * @var array
    */
   private $threshold = [
     'log' => 25,
index 123792a656b1bba446b42c2dc71989afb889fc2d..bdf45c9885fb44c2d4ddae1a90053c9053613489 100644 (file)
@@ -206,7 +206,8 @@ class CRM_Core_InnoDBIndexer {
    *   (string $indexName => string $sql)
    */
   public function buildIndexSql($table) {
-    $sqls = []; // array (string $idxName => string $sql)
+    // array (string $idxName => string $sql)
+    $sqls = [];
     if ($this->isActive && isset($this->indices[$table])) {
       foreach ($this->indices[$table] as $fields) {
         $name = self::IDX_PREFIX . md5($table . '::' . implode(',', $fields));
index 15ff125b0b9d037ec906c0b236dc4b9fdd45d969..9a9e04a9327b3000f32cb11bce2ce897acd574ca 100644 (file)
@@ -77,7 +77,8 @@ class CRM_Core_Invoke {
 
     if (!defined('CIVICRM_SYMFONY_PATH')) {
       // Traditional Civi invocation path
-      self::hackMenuRebuild($args); // may exit
+      // may exit
+      self::hackMenuRebuild($args);
       self::init($args);
       self::hackStandalone($args);
       $item = self::getItem($args);
@@ -108,13 +109,14 @@ class CRM_Core_Invoke {
    *   List of path parts.
    * @void
    */
-  static public function hackMenuRebuild($args) {
+  public static function hackMenuRebuild($args) {
     if (['civicrm', 'menu', 'rebuild'] == $args || ['civicrm', 'clearcache'] == $args) {
       // ensure that the user has a good privilege level
       if (CRM_Core_Permission::check('administer CiviCRM')) {
         self::rebuildMenuAndCaches();
         CRM_Core_Session::setStatus(ts('Cleared all CiviCRM caches (database, menu, templates)'), ts('Complete'), 'success');
-        return CRM_Utils_System::redirect(); // exits
+        // exits
+        return CRM_Utils_System::redirect();
       }
       else {
         CRM_Core_Error::fatal('You do not have permission to execute this url');
@@ -129,7 +131,7 @@ class CRM_Core_Invoke {
    *   List of path parts.
    * @void
    */
-  static public function init($args) {
+  public static function init($args) {
     // first fire up IDS and check for bad stuff
     $config = CRM_Core_Config::singleton();
 
@@ -145,7 +147,7 @@ class CRM_Core_Invoke {
    *   List of path parts.
    * @void
    */
-  static public function hackStandalone($args) {
+  public static function hackStandalone($args) {
     $config = CRM_Core_Config::singleton();
     if ($config->userFramework == 'Standalone') {
       $session = CRM_Core_Session::singleton();
@@ -165,7 +167,7 @@ class CRM_Core_Invoke {
    *   List of path parts.
    * @return array; see CRM_Core_Menu
    */
-  static public function getItem($args) {
+  public static function getItem($args) {
     if (is_array($args)) {
       // get the menu items
       $path = implode('/', $args);
@@ -192,7 +194,7 @@ class CRM_Core_Invoke {
    *   See CRM_Core_Menu.
    * @return string, HTML
    */
-  static public function runItem($item) {
+  public static function runItem($item) {
     $ids = new CRM_Core_IDS();
     $ids->check($item);
 
index 5d269cf24ae23a8df1a6295840a14078ef92dbfc..d583a1c9516a0b4c03b1ace01115c88c5c6edea0 100644 (file)
@@ -37,17 +37,16 @@ class CRM_Core_JobManager {
   /**
    * @var array ($id => CRM_Core_ScheduledJob)
    */
-  var $jobs = NULL;
+  public $jobs = NULL;
 
   /**
    * @var CRM_Core_ScheduledJob
    */
-  var $currentJob = NULL;
+  public $currentJob = NULL;
 
-  var $singleRunParams = [];
-
-  var $_source = NULL;
+  public $singleRunParams = [];
 
+  public $_source = NULL;
 
   /**
    * Class constructor.
index fb8c6739f0e88dfc63f88b5b8c4570eb4d7767a6..44240579115519fe7a739387ba47d1c0fc1ec688 100644 (file)
@@ -33,9 +33,9 @@
  *
  */
 class CRM_Core_Key {
-  static $_key = NULL;
+  public static $_key = NULL;
 
-  static $_sessionID = NULL;
+  public static $_sessionID = NULL;
 
   /**
    * Generate a private key per session and store in session.
index 837fbc34c4ae7ba3216541d1a13b05b9f6cfaa8f..ae0f1f9859351ac4be8a127edc2003fb2676b575 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Core_LegacyErrorHandler
  */
 class CRM_Core_LegacyErrorHandler {
+
   /**
    * @param \Civi\Core\Event\UnhandledExceptionEvent $event
    * @throws Exception
index 789639506cd293e185996139658b25f45ac532b7..31077138e65d87115425f309c8e66eaa362899c5 100644 (file)
@@ -44,11 +44,16 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface {
    *
    * @var bool
    */
-  static $jobLog = FALSE;
+  public static $jobLog = FALSE;
 
-  // lets have a 3 second timeout for now
+  /**
+   * lets have a 3 second timeout for now
+   */
   const TIMEOUT = 3;
 
+  /**
+   * @var bool
+   */
   protected $_hasLock = FALSE;
 
   protected $_name;
index f5ee0c38cabce0fff141284064a5869aba9b488a..a3883286963a35fd7e1eef88b2c2655905ab25e3 100644 (file)
@@ -259,7 +259,8 @@ class CRM_Core_ManagedEntities {
     if ($doUpdate) {
       $defaults = [
         'id' => $dao->entity_id,
-        'is_active' => 1, // FIXME: test whether is_active is valid
+      // FIXME: test whether is_active is valid
+        'is_active' => 1,
       ];
       $params = array_merge($defaults, $todo['params']);
       $result = civicrm_api($dao->entity_type, 'create', $params);
index 8ceccdd854eb13d9a1bcbfd9449584479e2a7d70..796491120402e5ddfba89dcc2c04d6b1a7f031aa 100644 (file)
@@ -44,16 +44,16 @@ class CRM_Core_Menu {
    *
    * @var array
    */
-  static $_items = NULL;
+  public static $_items = NULL;
 
   /**
    * The list of permissioned menu items.
    *
    * @var array
    */
-  static $_permissionedItems = NULL;
+  public static $_permissionedItems = NULL;
 
-  static $_serializedElements = array(
+  public static $_serializedElements = array(
     'access_arguments',
     'access_callback',
     'page_arguments',
@@ -61,7 +61,7 @@ class CRM_Core_Menu {
     'breadcrumb',
   );
 
-  static $_menuCache = NULL;
+  public static $_menuCache = NULL;
   const MENU_ITEM = 1;
 
   /**
@@ -367,13 +367,12 @@ class CRM_Core_Menu {
         'title' => $item['title'],
         'desc' => CRM_Utils_Array::value('desc', $item),
         'id' => strtr($item['title'], array(
-            '(' => '_',
-            ')' => '',
-            ' ' => '',
-            ',' => '_',
-            '/' => '_',
-          )
-        ),
+          '(' => '_',
+          ')' => '',
+          ' ' => '',
+          ',' => '_',
+          '/' => '_',
+        )),
         'url' => CRM_Utils_System::url($path, $query,
           FALSE,
           NULL,
@@ -570,11 +569,16 @@ class CRM_Core_Menu {
           'title' => $menu[$currentPath]['title'],
           'url' => CRM_Utils_System::url($currentPath,
             'reset=1' . $urlVar,
-            FALSE, // absolute
-            NULL, // fragment
-            TRUE, // htmlize
-            FALSE, // frontend
-            TRUE // forceBackend; CRM-14439 work-around; acceptable for now because we don't display breadcrumbs on frontend
+            // absolute
+            FALSE,
+            // fragment
+            NULL,
+            // htmlize
+            TRUE,
+            // frontend
+            FALSE,
+            // forceBackend; CRM-14439 work-around; acceptable for now because we don't display breadcrumbs on frontend
+            TRUE
           ),
         );
       }
index eca6f6e38dbfe653504d69a63c3f154a9d1ced4a..f3976d1c8c782ed22201d02de94d2e9352367030 100644 (file)
@@ -68,7 +68,8 @@ class CRM_Core_Module {
     static $result;
     if ($fresh || !is_array($result)) {
       $result = CRM_Extension_System::singleton()->getMapper()->getModules();
-      $result[] = new CRM_Core_Module('civicrm', TRUE); // pseudo-module for core
+      // pseudo-module for core
+      $result[] = new CRM_Core_Module('civicrm', TRUE);
 
       $config = CRM_Core_Config::singleton();
       $result = array_merge($result, $config->userSystem->getModules());
index 94368ec6a30a3586f9d90e298ac8badb6b098e3f..913f874d50b6c903b3311c3024f2e31d41b6bb38 100644 (file)
  * @copyright CiviCRM LLC (c) 2004-2019
  */
 class CRM_Core_OptionGroup {
-  static $_values = [];
-  static $_cache = [];
+  public static $_values = [];
+  public static $_cache = [];
 
   /**
    * $_domainIDGroups array maintains the list of option groups for whom
    * domainID is to be considered.
+   * @var array
    */
-  static $_domainIDGroups = [
+  public static $_domainIDGroups = [
     'from_email_address',
     'grant_type',
   ];
@@ -615,13 +616,13 @@ WHERE  v.option_group_id = g.id
 
     if ($dao->fetch()) {
       foreach ([
-                 'id',
-                 'name',
-                 'value',
-                 'label',
-                 'weight',
-                 'description',
-               ] as $fld) {
+        'id',
+        'name',
+        'value',
+        'label',
+        'weight',
+        'description',
+      ] as $fld) {
         $row[$fld] = $dao->$fld;
         if ($localize && in_array($fld, ['label', 'description'])) {
           $row[$fld] = ts($row[$fld]);
index 7390deb4ce576f6c59162c34fee96883c1c26d86..ed649405cd60d56952bb398b16b3442f32698006 100644 (file)
@@ -37,21 +37,21 @@ class CRM_Core_OptionValue {
    *
    * @var array
    */
-  static $_exportableFields = NULL;
+  public static $_exportableFields = NULL;
 
   /**
    * Static field for all the option value information that we can potentially export.
    *
    * @var array
    */
-  static $_importableFields = NULL;
+  public static $_importableFields = NULL;
 
   /**
    * Static field for all the option value information that we can potentially export.
    *
    * @var array
    */
-  static $_fields = NULL;
+  public static $_fields = NULL;
 
   /**
    * Return option-values of a particular group
index f06559285e424cb336ef6747d0ecd1eeac4cdc19..69b9c3c397b7aab22a8c0228b3ee07b7f63b24c2 100644 (file)
@@ -41,7 +41,8 @@
  */
 class CRM_Core_Page_AJAX_Attachment {
 
-  const ATTACHMENT_TOKEN_TTL = 10800; // 3hr; 3*60*60
+  // 3hr; 3*60*60
+  const ATTACHMENT_TOKEN_TTL = 10800;
 
   /**
    * (Page Callback)
index 04066e4bd166214f79233e60a299703282e6864a..7a998fe2a523caa951764e81bd2b2c3808b8e6e3 100644 (file)
@@ -51,7 +51,7 @@ class CRM_Core_Page_AJAX_Location {
 
     // Verify user id
     $user = CRM_Utils_Request::retrieve('uid', 'Integer', CRM_Core_DAO::$_nullObject, FALSE, CRM_Core_Session::singleton()
-        ->get('userID'));
+      ->get('userID'));
     if (empty($user) || (CRM_Utils_Request::retrieve('cs', 'String', $form, FALSE) && !CRM_Contact_BAO_Contact_Permission::validateChecksumContact($user, CRM_Core_DAO::$_nullObject, FALSE))
     ) {
       CRM_Utils_System::civiExit();
@@ -227,10 +227,9 @@ class CRM_Core_Page_AJAX_Location {
     // lets output only required fields.
     foreach ($addressOptions as $element => $isSet) {
       if ($isSet && (!in_array($element, [
-          'im',
-          'openid',
-        ]))
-      ) {
+        'im',
+        'openid',
+      ]))) {
         if (in_array($element, [
           'country',
           'state_province',
@@ -253,10 +252,10 @@ class CRM_Core_Page_AJAX_Location {
     }
 
     foreach ([
-               'email',
-               'phone_type_id',
-               'phone',
-             ] as $element) {
+      'email',
+      'phone_type_id',
+      'phone',
+    ] as $element) {
       $block = ($element == 'phone_type_id') ? 'phone' : $element;
       for ($i = 1; $i < 3; $i++) {
         $fld = "{$block}[{$i}][{$element}]";
index e3b12d2a9289adebb569e7f0cb79a49ef232c17b..362e3d1616869af1ea9b9562eb66e4e3ee99fc1a 100644 (file)
@@ -42,9 +42,12 @@ class CRM_Core_Page_File extends CRM_Core_Page {
     $download = CRM_Utils_Request::retrieve('download', 'Integer', $this, FALSE, 1);
     $disposition = $download == 0 ? 'inline' : 'download';
 
-    $entityId = CRM_Utils_Request::retrieve('eid', 'Positive', $this, FALSE); // Entity ID (e.g. Contact ID)
-    $fieldId = CRM_Utils_Request::retrieve('fid', 'Positive', $this, FALSE); // Field ID
-    $fileId = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE); // File ID
+    // Entity ID (e.g. Contact ID)
+    $entityId = CRM_Utils_Request::retrieve('eid', 'Positive', $this, FALSE);
+    // Field ID
+    $fieldId = CRM_Utils_Request::retrieve('fid', 'Positive', $this, FALSE);
+    // File ID
+    $fileId = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
     $fileName = CRM_Utils_Request::retrieve('filename', 'String', $this, FALSE);
     if (empty($fileName) && (empty($entityId) || empty($fileId))) {
       CRM_Core_Error::statusBounce("Cannot access file: Must pass either \"Filename\" or the combination of \"Entity ID\" + \"File ID\"");
index ed2d57e68a72e822774e5c6b96708a7b50218008..4920f1857fefd7096e0f9f39667c14339be47228 100644 (file)
@@ -36,6 +36,7 @@
  * This loads a smarty help file via ajax and returns as html
  */
 class CRM_Core_Page_Inline_Help {
+
   public function run() {
     $args = $_REQUEST;
     if (!empty($args['file']) && strpos($args['file'], '..') === FALSE) {
index 1aaa4aa5f5c379b105dacb4cb95a1319bb2ef474..9399504e1600a10dc3fc71341c68727c4547ba7c 100644 (file)
@@ -80,6 +80,9 @@ abstract class CRM_Core_Payment {
     RECURRING_PAYMENT_START = 'START',
     RECURRING_PAYMENT_END = 'END';
 
+  /**
+   * @var object
+   */
   protected $_paymentProcessor;
 
   /**
@@ -108,9 +111,9 @@ abstract class CRM_Core_Payment {
    *
    * (Deprecated parameter but used in some messages).
    *
+   * @var string
    * @deprecated
    *
-   * @var string
    */
   public $_processorName;
 
@@ -520,9 +523,9 @@ abstract class CRM_Core_Payment {
       case 'contributionPageRecurringHelp':
         // require exactly two parameters
         if (array_keys($params) == [
-            'is_recur_installments',
-            'is_email_receipt',
-          ]) {
+          'is_recur_installments',
+          'is_email_receipt',
+        ]) {
           $gotText = ts('Your recurring contribution will be processed automatically.');
           if ($params['is_recur_installments']) {
             $gotText .= ' ' . ts('You can specify the number of installments, or you can leave the number of installments blank if you want to make an open-ended commitment. In either case, you can choose to cancel at any time.');
@@ -910,7 +913,7 @@ abstract class CRM_Core_Payment {
    * @param int $billingLocationID
    *
    * @return array
-   *    Array of metadata for address fields.
+   *   Array of metadata for address fields.
    */
   public function getBillingAddressFieldsMetadata($billingLocationID = NULL) {
     if (!$billingLocationID) {
@@ -1012,8 +1015,8 @@ abstract class CRM_Core_Payment {
       'title' => ts('Country'),
       'cc_field' => TRUE,
       'attributes' => [
-          '' => ts('- select -'),
-        ] + CRM_Core_PseudoConstant::country(),
+        '' => ts('- select -'),
+      ] + CRM_Core_PseudoConstant::country(),
       'is_required' => TRUE,
     ];
     return $metadata;
index 0d39e192ac7b9a0d33f5abdc32c76253d709370a..dbdcdcbcac99c5e69fe6563b098fbff029fde967 100644 (file)
@@ -355,8 +355,10 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
    * @return array
    */
   public function _getAuthorizeNetFields() {
-    $amount = $this->_getParam('total_amount');//Total amount is from the form contribution field
-    if (empty($amount)) {//CRM-9894 would this ever be the case??
+    //Total amount is from the form contribution field
+    $amount = $this->_getParam('total_amount');
+    //CRM-9894 would this ever be the case??
+    if (empty($amount)) {
       $amount = $this->_getParam('amount');
     }
     $fields = [];
@@ -728,7 +730,7 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
   /**
    * Process incoming notification.
    */
-  static public function handlePaymentNotification() {
+  public static function handlePaymentNotification() {
     $ipnClass = new CRM_Core_Payment_AuthorizeNetIPN(array_merge($_GET, $_REQUEST));
     $ipnClass->main();
   }
index b68bd8cf2ccb1eeffa145f712b415b1cacf35622..a6beaf12316b4b0f3be9be2a56c17c88e1825949 100644 (file)
@@ -85,7 +85,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
           'is_test' => 0,
           'options' => ['limit' => 1],
           'payment_processor_type_id' => $paymentProcessorTypeID,
-           'return' => 'id',
+          'return' => 'id',
         ]);
       }
 
index e538c84ecd059947ef55e5307337953d550d9538..35af834bd575c67dc51e899a6223ab7b2b569d97 100644 (file)
@@ -30,7 +30,7 @@
  */
 class CRM_Core_Payment_BaseIPN {
 
-  static $_now = NULL;
+  public static $_now = NULL;
 
   /**
    * Input parameters from payment processor. Store these so that
@@ -41,19 +41,19 @@ class CRM_Core_Payment_BaseIPN {
 
   /**
    * Only used by AuthorizeNetIPN.
+   * @var bool
    *
    * @deprecated
    *
-   * @var bool
    */
   protected $_isRecurring = FALSE;
 
   /**
    * Only used by AuthorizeNetIPN.
+   * @var bool
    *
    * @deprecated
    *
-   * @var bool
    */
   protected $_isFirstOrLastRecurringPayment = FALSE;
 
@@ -232,9 +232,9 @@ class CRM_Core_Payment_BaseIPN {
 
     // CRM-15546
     $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', [
-        'labelColumn' => 'name',
-        'flip' => 1,
-      ]);
+      'labelColumn' => 'name',
+      'flip' => 1,
+    ]);
     $contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);
     $contribution->receipt_date = CRM_Utils_Date::isoToMysql($contribution->receipt_date);
     $contribution->thankyou_date = CRM_Utils_Date::isoToMysql($contribution->thankyou_date);
@@ -257,9 +257,9 @@ class CRM_Core_Payment_BaseIPN {
       if (!empty($memberships)) {
         // if transaction is failed then set "Cancelled" as membership status
         $membershipStatuses = CRM_Core_PseudoConstant::get('CRM_Member_DAO_Membership', 'status_id', [
-            'labelColumn' => 'name',
-            'flip' => 1,
-          ]);
+          'labelColumn' => 'name',
+          'flip' => 1,
+        ]);
         foreach ($memberships as $membership) {
           if ($membership) {
             $membership->status_id = $membershipStatuses['Cancelled'];
@@ -322,9 +322,9 @@ class CRM_Core_Payment_BaseIPN {
       $addLineItems = TRUE;
     }
     $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', [
-        'labelColumn' => 'name',
-        'flip' => 1,
-      ]);
+      'labelColumn' => 'name',
+      'flip' => 1,
+    ]);
     $contribution->contribution_status_id = $contributionStatuses['Cancelled'];
     $contribution->cancel_date = self::$_now;
     $contribution->cancel_reason = CRM_Utils_Array::value('reasonCode', $input);
@@ -348,9 +348,9 @@ class CRM_Core_Payment_BaseIPN {
     if (empty($input['IAmAHorribleNastyBeyondExcusableHackInTheCRMEventFORMTaskClassThatNeedsToBERemoved'])) {
       if (!empty($memberships)) {
         $membershipStatuses = CRM_Core_PseudoConstant::get('CRM_Member_DAO_Membership', 'status_id', [
-            'labelColumn' => 'name',
-            'flip' => 1,
-          ]);
+          'labelColumn' => 'name',
+          'flip' => 1,
+        ]);
         // Cancel only Pending memberships
         // CRM-18688
         $pendingStatusId = $membershipStatuses['Pending'];
index 38b0b2dc48b213d4b1697e94414f4ba18f6ed92d..a123e8f85deada69bf8b6a9527da76ee049798dc 100644 (file)
@@ -309,6 +309,7 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
       return $params;
     }
   }
+
   // end function doDirectPayment
 
   /**
index 09b39a2362f081c2b3f2a4783dc4f8eb4ad4d02d..027904845b363827c0030aadbdc0c6dbc6576455 100644 (file)
@@ -33,7 +33,6 @@
  */
 class CRM_Core_Payment_Form {
 
-
   /**
    * Add payment fields depending on payment processor.
    *
@@ -55,7 +54,7 @@ class CRM_Core_Payment_Form {
    * @param int $paymentInstrumentID
    *   ID of the payment processor.
    */
-  static public function setPaymentFieldsByProcessor(&$form, $processor, $billing_profile_id = NULL, $isBackOffice = FALSE, $paymentInstrumentID = NULL) {
+  public static function setPaymentFieldsByProcessor(&$form, $processor, $billing_profile_id = NULL, $isBackOffice = FALSE, $paymentInstrumentID = NULL) {
     $form->billingFieldSets = [];
     // Load the pay-later processor
     // @todo load this right up where the other processors are loaded initially.
@@ -84,7 +83,7 @@ class CRM_Core_Payment_Form {
    * @param CRM_Core_Form $form
    * @param CRM_Core_Payment $processor
    */
-  static protected function setBillingAddressFields(&$form, $processor) {
+  protected static function setBillingAddressFields(&$form, $processor) {
     $billingID = $form->_bltID;
     $smarty = CRM_Core_Smarty::singleton();
     $smarty->assign('billingDetailsFields', self::getBillingAddressFields($processor, $billingID));
index 0dcbecf453bafdb5716f5bac73f6439ed4b0bdee..42eeb94d4acb3e6d112fc8a092f804f731cb9572 100644 (file)
@@ -170,6 +170,7 @@ class CRM_Core_Payment_PayJunction extends CRM_Core_Payment {
 
     return $params;
   }
+
   // end function doDirectPayment
 
   /**
@@ -190,7 +191,6 @@ class CRM_Core_Payment_PayJunction extends CRM_Core_Payment {
     }
   }
 
-
   /**
    * ignore for now, more elaborate error handling later.
    * @param $response
index 155fae1d57413dc6d174f7a3c0ff058a87fb16db..cb68eff20150595844cdcd91f912d5a8bdced2b3 100644 (file)
@@ -33,7 +33,7 @@
  */
 class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
 
-  static $_paymentProcessor = NULL;
+  public static $_paymentProcessor = NULL;
 
   /**
    * Input parameters from payment processor. Store these so that
@@ -404,7 +404,6 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     }
   }
 
-
   /**
    * Gets PaymentProcessorID for PayPal
    *
@@ -451,7 +450,7 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     ];
     $paymentProcessorID = civicrm_api3('PaymentProcessor', 'getvalue', $processorParams);
     if (empty($paymentProcessorID)) {
-      Throw new CRM_Core_Exception('PayPalIPN: Could not get Payment Processor ID');
+      throw new CRM_Core_Exception('PayPalIPN: Could not get Payment Processor ID');
     }
     return $paymentProcessorID;
   }
index badb5e22eba61fceb6783451929d3cc3b78c25bc..5b4a109802e07e5ace1ce6df9d114b741d029a0d 100644 (file)
@@ -743,7 +743,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
    * @throws \CRM_Core_Exception
    * @throws \CiviCRM_API3_Exception
    */
-  static public function handlePaymentNotification() {
+  public static function handlePaymentNotification() {
     $params = array_merge($_GET, $_REQUEST);
     $q = explode('/', CRM_Utils_Array::value('q', $params, ''));
     $lastParam = array_pop($q);
index 4e0bcb46b09fd19e852edd24a93b1b65f6a3f9d9..d88f12de7deccd6b3de5f186efc98d236d2b316d 100644 (file)
@@ -32,7 +32,7 @@
  */
 class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
 
-  static $_paymentProcessor = NULL;
+  public static $_paymentProcessor = NULL;
 
   /**
    * Input parameters from payment processor. Store these so that
@@ -49,6 +49,7 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
 
   /**
    * Is this a payment express transaction.
+   * @var bool
    */
   protected $_isPaymentExpress = FALSE;
 
@@ -215,9 +216,9 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
     switch ($txnType) {
       case 'recurring_payment_profile_created':
         if (in_array($recur->contribution_status_id, [
-              $contributionStatuses['Pending'],
-              $contributionStatuses['In Progress'],
-            ])
+          $contributionStatuses['Pending'],
+          $contributionStatuses['In Progress'],
+        ])
           && !empty($recur->processor_id)
         ) {
           echo "already handled";
@@ -588,11 +589,11 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr
     }
     // arg api won't get this - fix it
     $ids['contributionPage'] = CRM_Core_DAO::singleValueQuery("SELECT contribution_page_id FROM civicrm_contribution WHERE invoice_id = %1", [
-        1 => [
-          $ids['contribution'],
-          'Integer',
-        ],
-      ]);
+      1 => [
+        $ids['contribution'],
+        'Integer',
+      ],
+    ]);
     // only handle component at this stage - not terribly sure how a recurring event payment would arise
     // & suspec main function may be a victom of copy & paste
     // membership would be an easy add - but not relevant to my customer...
index 46541a4b165d9005e489d986c31e137063ceb5a6..1d4b92c5e96ce64fb9fad1c3c35985c721dcc6b7 100644 (file)
@@ -44,6 +44,7 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
    * the processor. It is the main function for processing on-server
    * credit card transactions
    */
+
   /**
    * This function collects all the information from a web/api form and invokes
    * the relevant payment processor specific functions to perform the transaction
@@ -363,7 +364,6 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
     return $e;
   }
 
-
   /**
    * NOTE: 'doTransferCheckout' not implemented
    *
index 8683a65f853a5933f422e0c093a7aaa471f9fc69..e3e5b0d1a026335ec4143a926d963cd473c649b6 100644 (file)
@@ -145,7 +145,7 @@ class CRM_Core_Payment_PaymentExpressIPN extends CRM_Core_Payment_BaseIPN {
     if ($contribution->invoice_id != $input['invoice']) {
       CRM_Core_Error::debug_log_message("Invoice values dont match between database and IPN request");
       echo "Failure: Invoice values dont match between database and IPN request<p>";
-      return;
+      return FALSE;
     }
 
     // lets replace invoice-id with Payment Processor -number because thats what is common and unique
@@ -157,7 +157,7 @@ class CRM_Core_Payment_PaymentExpressIPN extends CRM_Core_Payment_BaseIPN {
     if ($contribution->total_amount != $input['amount']) {
       CRM_Core_Error::debug_log_message("Amount values dont match between database and IPN request");
       echo "Failure: Amount values dont match between database and IPN request. " . $contribution->total_amount . "/" . $input['amount'] . "<p>";
-      return;
+      return FALSE;
     }
 
     $transaction = new CRM_Core_Transaction();
index 55ec6ffff4356591f8a064bd580dbed9f537d7a1..6afebf6e535dda762faaaab1685180ba304147f6 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 use Civi\Payment\System;
+
 /**
  *
  * @package CRM
index 49759569803f7a29ad72dffb99671eec41c46c9c..68992819af9ac616b5d3b40efd7ab09d9814df4d 100644 (file)
@@ -410,6 +410,7 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
 
     return $params;
   }
+
   // end function doDirectPayment
 
   /**
index 5a3f0eff7aa0df9133a8beebcbe29b8802b25348..d1ed8ea0559e2b130af76389b59686b4c59981ba 100644 (file)
@@ -1449,7 +1449,8 @@ class CRM_Core_Permission {
 
     // Profile permissions
     $permissions['profile'] = [
-      'get' => [], // the profile will take care of this
+      // the profile will take care of this
+      'get' => [],
     ];
 
     $permissions['uf_group'] = [
index 9d4507c5a36347bf8f562b76edfb4d0ecf488777..e2277df2f173fa80f28a141340edcb6857637dee 100644 (file)
@@ -61,7 +61,6 @@ class CRM_Core_Permission_Backdrop extends CRM_Core_Permission_DrupalBase {
   protected $_viewPermissionedGroups;
   protected $_editPermissionedGroups;
 
-
   /**
    * Given a permission string, check for access requirements
    *
@@ -157,25 +156,25 @@ class CRM_Core_Permission_Backdrop extends CRM_Core_Permission_DrupalBase {
 
     // FIXME!!!!
     /**
-    $uids = array();
-    $sql = "
-      SELECT {users}.uid, {role_permission}.permission
-      FROM {users}
-      JOIN {users_roles}
-        ON {users}.uid = {users_roles}.uid
-      JOIN {role_permission}
-        ON {role_permission}.rid = {users_roles}.rid
-      WHERE {role_permission}.permission = '{$permissionName}'
-        AND {users}.status = 1
-    ";
-
-    $result = db_query($sql);
-    foreach ($result as $record) {
-      $uids[] = $record->uid;
-    }
-
-    $_cache[$permissionName] = self::getContactEmails($uids);
-    return $_cache[$permissionName];
+     * $uids = array();
+     * $sql = "
+     * SELECT {users}.uid, {role_permission}.permission
+     * FROM {users}
+     * JOIN {users_roles}
+     * ON {users}.uid = {users_roles}.uid
+     * JOIN {role_permission}
+     * ON {role_permission}.rid = {users_roles}.rid
+     * WHERE {role_permission}.permission = '{$permissionName}'
+     * AND {users}.status = 1
+     * ";
+     *
+     * $result = db_query($sql);
+     * foreach ($result as $record) {
+     * $uids[] = $record->uid;
+     * }
+     *
+     * $_cache[$permissionName] = self::getContactEmails($uids);
+     * return $_cache[$permissionName];
     */
     return [];
   }
index c14e63e3ae79cc666023b8d34acc3cc65b225261..d598e15cb3b03492bac1e7ee4cf1514519890f17 100644 (file)
  */
 class CRM_Core_Permission_Base {
 
-  // permission mapping to stub check() calls
+  /**
+   * permission mapping to stub check() calls
+   * @var array
+   */
   public $permissions = NULL;
 
   /**
index 4f67b6ce3899d26681244cdb80aee65c1d0e78aa..9c0bbdee78c9da83c4917da2bfb1efe4964cdb64 100644 (file)
@@ -61,7 +61,6 @@ class CRM_Core_Permission_Drupal extends CRM_Core_Permission_DrupalBase {
   protected $_viewPermissionedGroups;
   protected $_editPermissionedGroups;
 
-
   /**
    * Given a permission string, check for access requirements
    *
index 2b728bc477332fc06885ae3d705318d6d06930a9..dc2e4df2154e38d66fd7cb6725d287a740046564 100644 (file)
@@ -37,6 +37,7 @@
  *
  */
 class CRM_Core_Permission_Drupal8 extends CRM_Core_Permission_DrupalBase {
+
   /**
    * Given a permission string, check for access requirements
    *
index 2eea7228a8e76a662a8196b6aad6959d43581fcf..97c7a054c2825792c3c84a8fc9252ff90222e0cc 100644 (file)
@@ -37,6 +37,7 @@
  *
  */
 class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base {
+
   /**
    * Given a permission string, check for access requirements
    *
@@ -74,7 +75,7 @@ class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base {
         // This is a codeblock copied from /Civicrm/Utils/REST
         $uid = NULL;
         if (!$uid) {
-          $store      = NULL;
+          $store = NULL;
 
           $contact_id = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $api_key, 'id', 'api_key');
 
@@ -180,9 +181,9 @@ class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base {
     $query = $db->getQuery(TRUE);
 
     $query
-        ->select($db->quoteName('rules'))
-        ->from($db->quoteName('#__assets'))
-        ->where($db->quoteName('name') . ' = ' . $db->quote('com_civicrm'));
+      ->select($db->quoteName('rules'))
+      ->from($db->quoteName('#__assets'))
+      ->where($db->quoteName('name') . ' = ' . $db->quote('com_civicrm'));
 
     $db->setQuery($query);
 
@@ -204,9 +205,9 @@ class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base {
     $query = $db->getQuery(TRUE);
 
     $query
-        ->update($db->quoteName('#__assets'))
-        ->set($db->quoteName('rules') . ' = ' . $db->quote(json_encode($associations)))
-        ->where($db->quoteName('name') . ' = ' . $db->quote('com_civicrm'));
+      ->update($db->quoteName('#__assets'))
+      ->set($db->quoteName('rules') . ' = ' . $db->quote(json_encode($associations)))
+      ->where($db->quoteName('name') . ' = ' . $db->quote('com_civicrm'));
 
     $db->setQuery($query)->execute();
   }
index 18740068a9177b3b4a1832de3a4f8b02ba917c19..145e820832cdaeaa6058cfb9bbe88cbf93d58120 100644 (file)
@@ -41,7 +41,7 @@
  * used when processing certain API backends.
  */
 class CRM_Core_Permission_Temp {
-  static $id = 0;
+  public static $id = 0;
 
   /**
    * Array(int $grantId => array($perm))
index 66e5ad7e1e5b637384a7b1a0895503e3fb920999..0dccf48cdfee3d1067f7e486446bb2e6700c7abf 100644 (file)
  */
 class CRM_Core_Permission_UnitTests extends CRM_Core_Permission_Base {
 
-  // permission mapping to stub check() calls
+  /**
+   * permission mapping to stub check() calls
+   * @var array
+   */
   public $permissions = NULL;
 
   /**
index dc5224f7f9639e7ed76838a7f8ae993f28d86258..b58b059eb5844932b3c731e3d03fd09161c38a2b 100644 (file)
@@ -37,6 +37,7 @@
  *
  */
 class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base {
+
   /**
    * Given a permission string, check for access requirements
    *
index 51f767bee078bf56b36e4d79fde4429886592270..10fed3637e24a99b9df5cb2a08d6d94363c6795d 100644 (file)
@@ -34,7 +34,7 @@ class CRM_Core_PrevNextCache_Sql implements CRM_Core_PrevNextCache_Interface {
 
   /**
    * Store the results of a SQL query in the cache.
-   *
+   * @param string $cacheKey
    * @param string $sql
    *   A SQL query. The query *MUST* be a SELECT statement which yields
    *   the following columns (in order): cacheKey, entity_id1, data
@@ -66,7 +66,7 @@ INSERT INTO civicrm_prevnext_cache (cacheKey, entity_id1, data)
       ->columns([
         'entity_id1',
         'cacheKey',
-        'data'
+        'data',
       ]);
 
     foreach ($rows as &$row) {
index 96f9bba4231419d29d0b3dec4cd4e39a9c52a96c..0af4bd1e105fa78cb1e19915f544dcdc8468fa14 100644 (file)
@@ -54,10 +54,9 @@ class CRM_Core_PseudoConstant {
   private static $cache;
 
   /**
-   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
-   *
    * activity type
    * @var array
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    */
   private static $activityType;
 
@@ -92,10 +91,9 @@ class CRM_Core_PseudoConstant {
   private static $countryIsoCode;
 
   /**
-   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
-   *
    * group
    * @var array
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    */
   private static $group;
 
@@ -136,10 +134,9 @@ class CRM_Core_PseudoConstant {
   private static $worldRegions;
 
   /**
-   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
-   *
    * activity status
    * @var array
+   * @deprecated Please use the buildOptions() method in the appropriate BAO object.
    */
   private static $activityStatus;
 
@@ -1524,7 +1521,6 @@ WHERE  id = %1
     return CRM_Extension_System::singleton()->getMapper()->getActiveModuleFiles($fresh);
   }
 
-
   /**
    * Get all tax rates.
    *
@@ -1551,7 +1547,7 @@ WHERE  id = %1
         else {
           $value[] = $option['values'][0]['value'];
         }
-        $where = 'AND efa.account_relationship IN (' . implode(', ', $value)  . ' )';
+        $where = 'AND efa.account_relationship IN (' . implode(', ', $value) . ' )';
       }
       else {
         $where = '';
index 9118e2f2f3d80fc65bd22c4185ec782a41c1573c..53d012ae9551a9d7a8e775f45d9f4cc8bb9403f9 100644 (file)
@@ -37,13 +37,13 @@ class CRM_Core_QuickForm_Action_Display extends CRM_Core_QuickForm_Action {
    * The template to display the required "red" asterick.
    * @var string
    */
-  static $_requiredTemplate = NULL;
+  public static $_requiredTemplate = NULL;
 
   /**
    * The template to display error messages inline with the form element.
    * @var string
    */
-  static $_errorTemplate = NULL;
+  public static $_errorTemplate = NULL;
 
   /**
    * Class constructor.
index b684036a1927b8d290bc14bcdbde8a5a215843a9..7f282ff36c0f3a6dfd0d6b4d4ddd15ea3286c5c8 100644 (file)
@@ -97,9 +97,9 @@ class CRM_Core_QuickForm_Action_Upload extends CRM_Core_QuickForm_Action {
         $status = $element->moveUploadedFile($this->_uploadDir, $newName);
         if (!$status) {
           CRM_Core_Error::statusBounce(ts('We could not move the uploaded file %1 to the upload directory %2. Please verify that the \'Temporary Files\' setting points to a valid path which is writable by your web server.', [
-                1 => $value['name'],
-                2 => $this->_uploadDir,
-              ]));
+            1 => $value['name'],
+            2 => $this->_uploadDir,
+          ]));
         }
         if (!empty($data['values'][$pageName][$uploadName]['name'])) {
           @unlink($this->_uploadDir . $data['values'][$pageName][$uploadName]);
index 051ccda21753bacbca25bdf51f1c137348a5e5a8..35a959ad942b6edf938d6c5bc265e4d87a9ba13b 100644 (file)
@@ -34,6 +34,7 @@
  *
  */
 class CRM_Core_QuickForm_GroupMultiSelect extends CRM_Core_QuickForm_NestedAdvMultiSelect {
+
   /**
    * Returns the HTML generated for the advanced multiple select component.
    *
index 84a787a1c64369ce4d458ed71168fbd76c3c8ed1..791ef9ef2477c90d5d0abda06e76d42825bc6072 100644 (file)
@@ -40,6 +40,7 @@ require_once 'HTML/QuickForm/advmultiselect.php';
  * Class CRM_Core_QuickForm_NestedAdvMultiSelect
  */
 class CRM_Core_QuickForm_NestedAdvMultiSelect extends HTML_QuickForm_advmultiselect {
+
   /**
    * Loads options from different types of data sources.
    *
index 09e0a0ba6dbf5eec1ab98082dc6cc1046c5906f5..f1bcaff6d26e0d4d18c6630a876b14247b309f82 100644 (file)
@@ -4,6 +4,7 @@
  * Interface CRM_Core_Reference_Interface
  */
 interface CRM_Core_Reference_Interface {
+
   public function getReferenceTable();
 
   public function getReferenceKey();
index 6ea85bc07a8442ab022305e1c7c7865ca0502d1d..a9f9e13b71ae571c8a5247a10b637bbedc665767 100644 (file)
@@ -26,21 +26,21 @@ class CRM_Core_Region {
    *
    * @var string
    */
-  var $_name;
+  public $_name;
 
   /**
    * List of snippets to inject within region
    *
    * @var array; e.g. $this->_snippets[3]['type'] = 'template';
    */
-  var $_snippets;
+  public $_snippets;
 
   /**
    * Whether the snippets array has been sorted
    *
    * @var boolean
    */
-  var $_isSorted;
+  public $_isSorted;
 
   /**
    * @param string $name
index c65d0330eb777422797f665d03f50674004d8fda..014750ece774cbbc59b5a51a1127dcd0d1dc310d 100644 (file)
@@ -111,7 +111,7 @@ class CRM_Core_Resources {
    *   New copy of the manager.
    * @return CRM_Core_Resources
    */
-  static public function singleton(CRM_Core_Resources $instance = NULL) {
+  public static function singleton(CRM_Core_Resources $instance = NULL) {
     if ($instance !== NULL) {
       self::$_singleton = $instance;
     }
@@ -207,12 +207,12 @@ class CRM_Core_Resources {
    */
   public function addScriptUrl($url, $weight = self::DEFAULT_WEIGHT, $region = self::DEFAULT_REGION) {
     CRM_Core_Region::instance($region)->add([
-        'name' => $url,
-        'type' => 'scriptUrl',
-        'scriptUrl' => $url,
-        'weight' => $weight,
-        'region' => $region,
-      ]);
+      'name' => $url,
+      'type' => 'scriptUrl',
+      'scriptUrl' => $url,
+      'weight' => $weight,
+      'region' => $region,
+    ]);
     return $this;
   }
 
@@ -230,11 +230,11 @@ class CRM_Core_Resources {
   public function addScript($code, $weight = self::DEFAULT_WEIGHT, $region = self::DEFAULT_REGION) {
     CRM_Core_Region::instance($region)->add([
         // 'name' => automatic
-        'type' => 'script',
-        'script' => $code,
-        'weight' => $weight,
-        'region' => $region,
-      ]);
+      'type' => 'script',
+      'script' => $code,
+      'weight' => $weight,
+      'region' => $region,
+    ]);
     return $this;
   }
 
@@ -423,12 +423,12 @@ class CRM_Core_Resources {
    */
   public function addStyleUrl($url, $weight = self::DEFAULT_WEIGHT, $region = self::DEFAULT_REGION) {
     CRM_Core_Region::instance($region)->add([
-        'name' => $url,
-        'type' => 'styleUrl',
-        'styleUrl' => $url,
-        'weight' => $weight,
-        'region' => $region,
-      ]);
+      'name' => $url,
+      'type' => 'styleUrl',
+      'styleUrl' => $url,
+      'weight' => $weight,
+      'region' => $region,
+    ]);
     return $this;
   }
 
@@ -446,11 +446,11 @@ class CRM_Core_Resources {
   public function addStyle($code, $weight = self::DEFAULT_WEIGHT, $region = self::DEFAULT_REGION) {
     CRM_Core_Region::instance($region)->add([
         // 'name' => automatic
-        'type' => 'style',
-        'style' => $code,
-        'weight' => $weight,
-        'region' => $region,
-      ]);
+      'type' => 'style',
+      'style' => $code,
+      'weight' => $weight,
+      'region' => $region,
+    ]);
     return $this;
   }
 
@@ -535,7 +535,8 @@ class CRM_Core_Resources {
         $files = array_merge($files, (array) glob("$path/$pattern", $flags));
       }
     }
-    sort($files); // Deterministic order.
+    // Deterministic order.
+    sort($files);
     $files = array_unique($files);
     return array_map(function ($file) use ($path) {
       return CRM_Utils_File::relativize($file, "$path/");
@@ -813,10 +814,10 @@ class CRM_Core_Resources {
    */
   public static function isAjaxMode() {
     if (in_array(CRM_Utils_Array::value('snippet', $_REQUEST), [
-        CRM_Core_Smarty::PRINT_SNIPPET,
-        CRM_Core_Smarty::PRINT_NOFORM,
-        CRM_Core_Smarty::PRINT_JSON,
-      ])
+      CRM_Core_Smarty::PRINT_SNIPPET,
+      CRM_Core_Smarty::PRINT_NOFORM,
+      CRM_Core_Smarty::PRINT_JSON,
+    ])
     ) {
       return TRUE;
     }
@@ -825,7 +826,7 @@ class CRM_Core_Resources {
   }
 
   /**
-   * @param GenericHookEvent $e
+   * @param \Civi\Core\Event\GenericHookEvent $e
    * @see \CRM_Utils_Hook::buildAsset()
    */
   public static function renderMenubarStylesheet(GenericHookEvent $e) {
index 4f1315c46835e06c4eee2b59334deeee67fb1ff9..451d02dda28a44ddfe82fd95c28945fbfb944ecb 100644 (file)
@@ -67,7 +67,8 @@ class CRM_Core_Resources_Strings {
    *   List of translatable strings.
    */
   public function get($bucket, $file, $format) {
-    $stringsByFile = $this->cache->get($bucket); // array($file => array(...strings...))
+    // array($file => array(...strings...))
+    $stringsByFile = $this->cache->get($bucket);
     if (!$stringsByFile) {
       $stringsByFile = [];
     }
index eb2be0bf13b98d297f65a485a783285e3cb16f15..87ec71d94f27452e677112952e754ff6de3b8a6d 100644 (file)
  */
 class CRM_Core_ScheduledJob {
 
-  var $version = 3;
+  public $version = 3;
 
-  var $name = NULL;
+  public $name = NULL;
 
-  var $apiParams = [];
+  public $apiParams = [];
 
-  var $remarks = [];
+  public $remarks = [];
 
   /**
    * @param array $params
index 87dd9c37ebee48b47a8e20ed950ff75026e27596..18af287821b791be21296cfdbae67200d1eb63ab 100644 (file)
@@ -306,7 +306,7 @@ class CRM_Core_SelectValues {
    *   date format (QF format)
    * @param null $minOffset
    * @param null $maxOffset
-   *
+   * @param string $context
    * @return array
    *   the date array
    */
@@ -933,7 +933,6 @@ class CRM_Core_SelectValues {
     return $profileGroupType;
   }
 
-
   /**
    * Word replacement match type.
    *
index 30a9225b9b5965fa6cc9479fdefc2470d3697f55..a64a7eabeb68bd5046c0ba38e3e8c941eb2cd5eb 100644 (file)
@@ -104,6 +104,7 @@ class CRM_Core_Selector_Controller {
 
   /**
    * The objectAction for the WebObject
+   * @var int
    */
   protected $_action;
 
index c9d10d2b3a9f1821849269647a6af78162144e78..8aa67bf9ca927db805919366120a78040ca49a05 100644 (file)
@@ -32,8 +32,9 @@ class CRM_Core_Session {
 
   /**
    * Cache of all the session names that we manage.
+   * @var array
    */
-  static $_managedNames = NULL;
+  public static $_managedNames = NULL;
 
   /**
    * Key is used to allow the application to have multiple top
index ba2edef2062e8171c828584b636e5be6d2be60da..ca66329ca81cf4d336acabed50ae0f99af960a0e 100644 (file)
@@ -37,7 +37,8 @@ class CRM_Core_ShowHideBlocks {
    *
    * @var string
    */
-  static $_showIcon, $_hideIcon;
+  public static $_showIcon;
+  public static $_hideIcon;
 
   /**
    * The array of ids of blocks that will be shown.
index 9e2f35b0062933231cb6ab8839b7ed562f32b177..47229be3949a6c938714f95630649cc061c9ca43 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Core_Smarty_Permissions
  */
 class CRM_Core_Smarty_Permissions {
+
   /**
    * non-static adapter for CRM_Core_Permission::check
    * @param $offset
index 7c4db3139304a7e8f0ced556b62a6c9d2479c367..38fd03892825bb3102894e0a4eeb5eff0a8663af 100644 (file)
@@ -55,7 +55,6 @@ function smarty_function_crmAPI($params, &$smarty) {
   unset($errorScope);
   if ($result === FALSE) {
     $smarty->trigger_error("Unknown error");
-    return;
   }
 
   if (!empty($result['is_error'])) {
index a9ed3f2c80d647aadb9162f79d23027eeced57f2..72bb841749629f078f97a750b33bcf0936e16d4d 100644 (file)
@@ -45,8 +45,7 @@
  *   the generated key
  */
 function smarty_function_crmKey($params, &$smarty) {
-  return
-    CRM_Core_Key::get(
+  return CRM_Core_Key::get(
       $params['name'],
       CRM_Utils_Array::value('addSequence', $params, 0)
     );
index b45e5f85f782baaeee97fa751869aa0e9910a9a8..cb3ecf363a7d8595f7f442134d3a0a03302d5a2f 100644 (file)
@@ -51,15 +51,15 @@ function smarty_function_simpleActivityContacts($params, &$smarty) {
   }
 
   foreach ([
-             'target',
-             'assignee',
-           ] as $role) {
+    'target',
+    'assignee',
+  ] as $role) {
     $contact = [];
     if (!empty($activity[$role . '_contact_id'])) {
       $contact_id = array_shift($activity[$role . '_contact_id']);
       $contact = civicrm_api('contact', 'getsingle', $baseContactParams + [
-          'contact_id' => $contact_id,
-        ]);
+        'contact_id' => $contact_id,
+      ]);
     }
     $smarty->assign($params[$role . '_var'], $contact);
   }
index 88bb6382c050aa89a30a64a8fd701f35b16f2206..c9c35ec46683e71b9c61c4ae42d149b4bdace97e 100644 (file)
@@ -8,8 +8,7 @@
  * @return string
  */
 function smarty_prefilter_resetExtScope($tpl_source, &$smarty) {
-  return
-    '{crmScope extensionKey=""}'
+  return '{crmScope extensionKey=""}'
     . $tpl_source
     . '{/crmScope}';
 }
index 0ac2ad8dca99677524d2915da51d1bbdf25b8a78..11241937d40f393cc656cdbd4b7a45a834e2981e 100644 (file)
@@ -75,10 +75,9 @@ function civicrm_smarty_resource_string_get_trusted($tpl_name, &$smarty_obj) {
 function civicrm_smarty_register_string_resource() {
   $template = CRM_Core_Smarty::singleton();
   $template->register_resource('string', [
-      'civicrm_smarty_resource_string_get_template',
-      'civicrm_smarty_resource_string_get_timestamp',
-      'civicrm_smarty_resource_string_get_secure',
-      'civicrm_smarty_resource_string_get_trusted',
-    ]
-  );
+    'civicrm_smarty_resource_string_get_template',
+    'civicrm_smarty_resource_string_get_timestamp',
+    'civicrm_smarty_resource_string_get_secure',
+    'civicrm_smarty_resource_string_get_trusted',
+  ]);
 }
index 05037234e08d3323dfe5c95e8e91d99934b6637b..49a0955554ca16e117a974ca2d88c518ddb52e22 100644 (file)
@@ -39,7 +39,7 @@ class CRM_Core_TableHierarchy {
    * This array defines weights for table, which are used to sort array of table in from clause
    * @var array
    */
-  static $info = [
+  public static $info = [
     'civicrm_contact' => '01',
     'civicrm_address' => '09',
     'civicrm_county' => '10',
index 1ecace68330e6ab155446790a6df3039f9c8c80c..96724ea89fada5de9c9791a271223660711f3f36 100644 (file)
@@ -70,7 +70,7 @@ abstract class CRM_Core_Task {
    *   This must be defined in each child class.  It is passed to the searchTasks hook.
    *   Example: $objectType = 'event';
    */
-  static $objectType = NULL;
+  public static $objectType = NULL;
 
   /**
    * Generates a list of batch tasks available for the current entities.
index 0aefdbf63dcab788f29d0de4250269c63930afef..d8853b8ef8cdff4b6ea0802a32e832b9d2d630d9 100644 (file)
@@ -22,7 +22,7 @@
  * safe to temporarily switch to exception
  */
 class CRM_Core_TemporaryErrorScope {
-  static $oldFrames;
+  public static $oldFrames;
 
   /**
    * @return CRM_Core_TemporaryErrorScope
index a61fbf4611854a2c073a55953e517772eb5355eb..e23e9f4315eed0dcad62b44a4a4a6f4bcc45d04a 100644 (file)
@@ -95,6 +95,7 @@ class CRM_Core_Transaction {
   /**
    * Whether commit() has been called on this instance
    * of CRM_Core_Transaction
+   * @var bool
    */
   private $_pseudoCommitted = FALSE;
 
@@ -147,7 +148,7 @@ class CRM_Core_Transaction {
   /**
    * @param $flag
    */
-  static public function rollbackIfFalse($flag) {
+  public static function rollbackIfFalse($flag) {
     $frame = \Civi\Core\Transaction\Manager::singleton()->getFrame();
     if ($flag === FALSE && $frame !== NULL) {
       $frame->setRollbackOnly();
@@ -203,7 +204,7 @@ class CRM_Core_Transaction {
    * callstack will not wind-down normally -- e.g. before
    * a call to exit().
    */
-  static public function forceRollbackIfEnabled() {
+  public static function forceRollbackIfEnabled() {
     if (\Civi\Core\Transaction\Manager::singleton()->getFrame() !== NULL) {
       \Civi\Core\Transaction\Manager::singleton()->forceRollback();
     }
@@ -212,7 +213,7 @@ class CRM_Core_Transaction {
   /**
    * @return bool
    */
-  static public function willCommit() {
+  public static function willCommit() {
     $frame = \Civi\Core\Transaction\Manager::singleton()->getFrame();
     return ($frame === NULL) ? TRUE : !$frame->isRollbackOnly();
   }
@@ -220,7 +221,7 @@ class CRM_Core_Transaction {
   /**
    * Determine whether there is a pending transaction.
    */
-  static public function isActive() {
+  public static function isActive() {
     $frame = \Civi\Core\Transaction\Manager::singleton()->getFrame();
     return ($frame !== NULL);
   }
@@ -246,7 +247,7 @@ class CRM_Core_Transaction {
    *          See php manual call_user_func_array for details.
    * @param int $id
    */
-  static public function addCallback($phase, $callback, $params = NULL, $id = NULL) {
+  public static function addCallback($phase, $callback, $params = NULL, $id = NULL) {
     $frame = \Civi\Core\Transaction\Manager::singleton()->getBaseFrame();
     $frame->addCallback($phase, $callback, $params, $id);
   }
index 89aa390a1891b3eb233e537b79f0b1526a06f415..7e89f123826ba8a7b825b61174a445b68b1f4f77 100644 (file)
@@ -47,11 +47,13 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form {
 
   /**
    * Array of custom field values
+   * @var array
    */
   protected $_values;
 
   /**
    * Mapper array of valid field type
+   * @var array
    */
   protected $_htmlTypeTransitions;
 
@@ -118,18 +120,17 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form {
     );
 
     $this->addButtons([
-        [
-          'type' => 'next',
-          'name' => ts('Change Field Type'),
-          'isDefault' => TRUE,
-          'js' => ['onclick' => 'return checkCustomDataField();'],
-        ],
-        [
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => 'next',
+        'name' => ts('Change Field Type'),
+        'isDefault' => TRUE,
+        'js' => ['onclick' => 'return checkCustomDataField();'],
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
   }
 
   /**
@@ -165,23 +166,20 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form {
     $customField->find(TRUE);
 
     if ($dstHtmlType == 'Text' && in_array($srcHtmlType, [
-        'Select',
-        'Radio',
-        'Autocomplete-Select',
-      ])
-    ) {
+      'Select',
+      'Radio',
+      'Autocomplete-Select',
+    ])) {
       $customField->option_group_id = "NULL";
       CRM_Core_BAO_CustomField::checkOptionGroup($this->_values['option_group_id']);
     }
 
     if (in_array($srcHtmlType, $mutliValueOps) &&
-      in_array($dstHtmlType, $singleValueOps)
-    ) {
+      in_array($dstHtmlType, $singleValueOps)) {
       $this->flattenToFirstValue($tableName, $this->_values['column_name']);
     }
     elseif (in_array($srcHtmlType, $singleValueOps) &&
-      in_array($dstHtmlType, $mutliValueOps)
-    ) {
+      in_array($dstHtmlType, $mutliValueOps)) {
       $this->firstValueToFlatten($tableName, $this->_values['column_name']);
     }
 
index f196a29b9f01245eb46108e9c858a4d6e7f9759e..364f44fe9d743569be95a33bd215b534f882cf54 100644 (file)
@@ -78,17 +78,16 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form {
   public function buildQuickForm() {
 
     $this->addButtons([
-        [
-          'type' => 'next',
-          'name' => ts('Delete Custom Field'),
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => 'next',
+        'name' => ts('Delete Custom Field'),
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
   }
 
   /**
index 4c6af1a9a4f03cb0a6e010541b7960fae4601a90..fa7f356c0f9d3e16af00afeb1e9a5e25359fddd2 100644 (file)
@@ -89,17 +89,16 @@ class CRM_Custom_Form_DeleteGroup extends CRM_Core_Form {
   public function buildQuickForm() {
 
     $this->addButtons([
-        [
-          'type' => 'next',
-          'name' => ts('Delete Custom Group'),
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => 'next',
+        'name' => ts('Delete Custom Group'),
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
   }
 
   /**
index f9e25de480f3f787e5c1df5a464ca48611fc0cf3..14d407950af546e1d6f4c901e80c03d174ae51a9 100644 (file)
@@ -66,6 +66,7 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
 
   /**
    * Array of custom field values if update mode.
+   * @var array
    */
   protected $_values;
 
@@ -483,7 +484,8 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
     $this->add('number',
       'note_length',
       ts('Maximum length') . ' ',
-      $attributes['text_length'], // note_length is an alias for the text-length field
+      // note_length is an alias for the text-length field
+      $attributes['text_length'],
       FALSE
     );
 
@@ -540,22 +542,21 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
 
     // add buttons
     $this->addButtons([
-        [
-          'type' => 'done',
-          'name' => ts('Save'),
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => 'next',
-          'name' => ts('Save and New'),
-          'subName' => 'new',
-        ],
-        [
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => 'done',
+        'name' => ts('Save'),
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'next',
+        'name' => ts('Save and New'),
+        'subName' => 'new',
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
 
     // add a form rule to check default value
     $this->addFormRule(['CRM_Custom_Form_Field', 'formRule'], $this);
@@ -595,7 +596,8 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
     //validate field label as well as name.
     $title = $fields['label'];
     $name = CRM_Utils_String::munge($title, '_', 64);
-    $gId = $self->_gid;  // CRM-7564
+    // CRM-7564
+    $gId = $self->_gid;
     $query = 'select count(*) from civicrm_custom_field where ( name like %1 OR label like %2 ) and id != %3 and custom_group_id = %4';
     $fldCnt = CRM_Core_DAO::singleValueQuery($query, [
       1 => [$name, 'String'],
index d05af627a34607fc995cbd1b508038e2592c52a1..f52a549fc0e8ad7f3b742867a9b7687e651febeb 100644 (file)
@@ -126,17 +126,16 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form {
     );
 
     $this->addButtons([
-        [
-          'type' => 'next',
-          'name' => ts('Move Custom Field'),
-          'isDefault' => TRUE,
-        ],
-        [
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ],
-      ]
-    );
+      [
+        'type' => 'next',
+        'name' => ts('Move Custom Field'),
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
 
     $this->addFormRule(['CRM_Custom_Form_MoveField', 'formRule'], $this);
   }
index 96d8a42058a0b7cb161c56d2560a5f23aae46a2f..34b02bd2bcf1a5c781c26b8c00fcab7f9195c154 100644 (file)
@@ -54,6 +54,7 @@ class CRM_Custom_Form_Option extends CRM_Core_Form {
 
   /**
    * The option group ID
+   * @var int
    */
   protected $_optionGroupID = NULL;
 
@@ -153,17 +154,16 @@ class CRM_Custom_Form_Option extends CRM_Core_Form {
       $option = civicrm_api3('option_value', 'getsingle', ['id' => $this->_id]);
       $this->assign('label', $option['label']);
       $this->addButtons([
-          [
-            'type' => 'next',
-            'name' => ts('Delete'),
-            'isDefault' => TRUE,
-          ],
-          [
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ],
-        ]
-      );
+        [
+          'type' => 'next',
+          'name' => ts('Delete'),
+          'isDefault' => TRUE,
+        ],
+        [
+          'type' => 'cancel',
+          'name' => ts('Cancel'),
+        ],
+      ]);
     }
     else {
       // lets trim all the whitespace
@@ -196,22 +196,21 @@ class CRM_Custom_Form_Option extends CRM_Core_Form {
 
       // add buttons
       $this->addButtons([
-          [
-            'type' => 'next',
-            'name' => ts('Save'),
-            'isDefault' => TRUE,
-          ],
-          [
-            'type' => 'next',
-            'name' => ts('Save and New'),
-            'subName' => 'new',
-          ],
-          [
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ],
-        ]
-      );
+        [
+          'type' => 'next',
+          'name' => ts('Save'),
+          'isDefault' => TRUE,
+        ],
+        [
+          'type' => 'next',
+          'name' => ts('Save and New'),
+          'subName' => 'new',
+        ],
+        [
+          'type' => 'cancel',
+          'name' => ts('Cancel'),
+        ],
+      ]);
 
       // if view mode pls freeze it with the done button.
       if ($this->_action & CRM_Core_Action::VIEW) {
index 4ad064eaf5bec9d512d6c6704db7f6c75ff60d87..9f7c9e06a73838c88fe0daa0fa0b89f70411f8db 100644 (file)
@@ -118,13 +118,12 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form {
       $this->assign('groupTree', $this->_groupTree);
     }
     $this->addButtons([
-        [
-          'type' => 'cancel',
-          'name' => ts('Done with Preview'),
-          'isDefault' => TRUE,
-        ],
-      ]
-    );
+      [
+        'type' => 'cancel',
+        'name' => ts('Done with Preview'),
+        'isDefault' => TRUE,
+      ],
+    ]);
   }
 
 }
index 375991f3f796bc70e10000362b3445cf4b34c3d2..c67e3990314cf229300676cfc20888cc20751840 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Custom_Import_Controller
  */
 class CRM_Custom_Import_Controller extends CRM_Core_Controller {
+
   /**
    * Class constructor.
    *
index 228465fa21b1de96bd3fd59d399431fa32cf9da4..716e59f1f9518bc9b80f518f6465be7fb9b9812e 100644 (file)
@@ -4,6 +4,7 @@
  * Class CRM_Custom_Import_Form_Summary
  */
 class CRM_Custom_Import_Form_Summary extends CRM_Contact_Import_Form_Summary {
+
   /**
    * Set variables up before form is built.
    *
index 7d8fb5e2ac96d1796126ba291558184148e53de2..0832d00bac6e4322521c5388d3bc608db542d8fb 100644 (file)
@@ -36,22 +36,26 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
 
   protected $_fileName;
 
-  /**#@+
+  /**
+   * #@+
    * @var integer
    */
 
   /**
    * Imported file size
+   * @var int
    */
   protected $_fileSize;
 
   /**
    * Separator being used
+   * @var string
    */
   protected $_separator;
 
   /**
    * Total number of lines in file
+   * @var int
    */
   protected $_lineCount;
 
@@ -252,31 +256,25 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
       if ($this->_invalidRowCount) {
         // removed view url for invlaid contacts
         $headers = array_merge([
-            ts('Line Number'),
-            ts('Reason'),
-          ],
-          $customHeaders
-        );
+          ts('Line Number'),
+          ts('Reason'),
+        ], $customHeaders);
         $this->_errorFileName = self::errorFileName(self::ERROR);
         self::exportCSV($this->_errorFileName, $headers, $this->_errors);
       }
       if ($this->_conflictCount) {
         $headers = array_merge([
-            ts('Line Number'),
-            ts('Reason'),
-          ],
-          $customHeaders
-        );
+          ts('Line Number'),
+          ts('Reason'),
+        ], $customHeaders);
         $this->_conflictFileName = self::errorFileName(self::CONFLICT);
         self::exportCSV($this->_conflictFileName, $headers, $this->_conflicts);
       }
       if ($this->_duplicateCount) {
         $headers = array_merge([
-            ts('Line Number'),
-            ts('View Activity History URL'),
-          ],
-          $customHeaders
-        );
+          ts('Line Number'),
+          ts('View Activity History URL'),
+        ], $customHeaders);
 
         $this->_duplicateFileName = self::errorFileName(self::DUPLICATE);
         self::exportCSV($this->_duplicateFileName, $headers, $this->_duplicates);
index 13f0c2db89a0dfe1c8986e3681aa40fb6b0f74f8..ab60fa1d336d73485e8f1892ed6128907990b834 100644 (file)
@@ -33,10 +33,10 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser {
     $customGroupID = $this->_multipleCustomData;
     $importableFields = $this->getGroupFieldsForImport($customGroupID, $this);
     $this->_fields = array_merge([
-        'do_not_import' => ['title' => ts('- do not import -')],
-        'contact_id' => ['title' => ts('Contact ID')],
-        'external_identifier' => ['title' => ts('External Identifier')],
-      ], $importableFields);
+      'do_not_import' => ['title' => ts('- do not import -')],
+      'contact_id' => ['title' => ts('Contact ID')],
+      'external_identifier' => ['title' => ts('External Identifier')],
+    ], $importableFields);
   }
 
   /**
index 3daff16951f333e556b83b3bc241efcf21b3788a..1137be40c940e0a36698caf275e0a3bac0cab7b8 100644 (file)
@@ -3,6 +3,7 @@
  * Class CRM_Dedupe_BAO_QueryBuilder
  */
 class CRM_Dedupe_BAO_QueryBuilder {
+
   /**
    * @param $rg
    * @param string $strID1
index 5f9aa38dceff366f7b2668ae53dc6fc8ecfb7d41..373866f7a868166751158a7a2573f51345209e14 100644 (file)
@@ -5,6 +5,7 @@
  * Class CRM_Dedupe_BAO_QueryBuilder_IndividualGeneral
  */
 class CRM_Dedupe_BAO_QueryBuilder_IndividualGeneral extends CRM_Dedupe_BAO_QueryBuilder {
+
   /**
    * @param $rg
    *
index 67ce966cb6636e3fcabe9b3b3858494531e3bc68..ed0cdb6bc0f441c53ee70f71a5b72bd9aa4f5bce 100644 (file)
@@ -41,13 +41,15 @@ class CRM_Dedupe_BAO_Rule extends CRM_Dedupe_DAO_Rule {
 
   /**
    * Ids of the contacts to limit the SQL queries (whole-database queries otherwise)
+   * @var array
    */
-  var $contactIds = [];
+  public $contactIds = [];
 
   /**
    * Params to dedupe against (queries against the whole contact set otherwise)
+   * @var array
    */
-  var $params = [];
+  public $params = [];
 
   /**
    * Return the SQL query for the given rule - either for finding matching
@@ -78,7 +80,7 @@ class CRM_Dedupe_BAO_Rule extends CRM_Dedupe_DAO_Rule {
     $innerJoinClauses = [
       "t1.{$this->rule_field} IS NOT NULL",
       "t2.{$this->rule_field} IS NOT NULL",
-      "t1.{$this->rule_field} = t2.{$this->rule_field}"
+      "t1.{$this->rule_field} = t2.{$this->rule_field}",
     ];
     if ($fields[$this->rule_field]['type'] === CRM_Utils_Type::T_DATE) {
       $innerJoinClauses[] = "t1.{$this->rule_field} > '1000-01-01'";
index f1bfd1478befe06a68acb72a753a9f577e62b24b..b6dab2843a97fc3ae7be1ebee9bd369f9263d920 100644 (file)
@@ -41,8 +41,9 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup {
 
   /**
    * Ids of the contacts to limit the SQL queries (whole-database queries otherwise)
+   * @var array
    */
-  var $contactIds = [];
+  public $contactIds = [];
 
   /**
    * Set the contact IDs to restrict the dedupe to.
@@ -55,13 +56,15 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup {
 
   /**
    * Params to dedupe against (queries against the whole contact set otherwise)
+   * @var array
    */
-  var $params = [];
+  public $params = [];
 
   /**
    * If there are no rules in rule group.
+   * @var bool
    */
-  var $noRules = FALSE;
+  public $noRules = FALSE;
 
   protected $temporaryTables = [];
 
@@ -497,7 +500,6 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup {
     return $result;
   }
 
-
   /**
    * Get the cached contact type for a particular rule group.
    *
index 4926760db0ea150374181690036f67e4efa1e853..7b6c936e72dfedcd603ca3912055beecdb0f8755 100644 (file)
@@ -331,7 +331,7 @@ class CRM_Dedupe_Finder {
    * @param array $foundDupes
    * @param string $cacheKeyString
    *
-   * @return array Dupe pairs with the keys
+   * @return array
    *   Dupe pairs with the keys
    *   -srcID
    *   -srcName
index 3cab5581bbd1b5a8941d19c8ebbfa838d7aea72d..ceea27b4e854b69d56d5bbf864521acb167093f5 100644 (file)
@@ -468,10 +468,9 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
       $membershipIDs = CRM_Utils_Array::collect('id',
         CRM_Utils_Array::value('values',
           civicrm_api3("Membership", "get", [
-              "contact_id" => $otherID,
-              "return" => "id",
-            ]
-          )
+            "contact_id" => $otherID,
+            "return" => "id",
+          ])
         )
       );
 
@@ -817,15 +816,15 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
     $msg = '';
     if (!empty($stats['merged'])) {
       $msg = '<p>' . ts('One contact merged.', [
-          'count' => $stats['merged'],
-          'plural' => '%count contacts merged.',
-        ]) . '</p>';
+        'count' => $stats['merged'],
+        'plural' => '%count contacts merged.',
+      ]) . '</p>';
     }
     if (!empty($stats['skipped'])) {
       $msg .= '<p>' . ts('One contact was skipped.', [
-          'count' => $stats['skipped'],
-          'plural' => '%count contacts were skipped.',
-        ]) . '</p>';
+        'count' => $stats['skipped'],
+        'plural' => '%count contacts were skipped.',
+      ]) . '</p>';
     }
     return $msg;
   }
@@ -1039,7 +1038,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
    *
    * @return bool
    */
-  static public function locationIsSame($mainAddress, $comparisonAddress) {
+  public static function locationIsSame($mainAddress, $comparisonAddress) {
     $keysToIgnore = [
       'id',
       'is_primary',
@@ -2037,7 +2036,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
     ];
     $activity = civicrm_api3('activity', 'create', [
       'source_contact_id' => CRM_Core_Session::getLoggedInContactID() ? CRM_Core_Session::getLoggedInContactID() :
-        $mainId,
+      $mainId,
       'subject' => ts('Contact ID %1 has been merged and deleted.', $params),
       'target_contact_id' => $mainId,
       'activity_type_id' => 'Contact Merged',
@@ -2049,7 +2048,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
     ])) {
       civicrm_api3('activity', 'create', [
         'source_contact_id' => CRM_Core_Session::getLoggedInContactID() ? CRM_Core_Session::getLoggedInContactID() :
-          $otherId,
+        $otherId,
         'subject' => ts('Contact ID %1 has been merged into Contact ID %2 and deleted.', $params),
         'target_contact_id' => $otherId,
         'activity_type_id' => 'Contact Deleted by Merge',
@@ -2081,7 +2080,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
    *   Limit to searching for matches against this many contacts.
    *
    * @return array
-   *    Array of matches meeting the criteria.
+   *   Array of matches meeting the criteria.
    */
   public static function getDuplicatePairs($rule_group_id, $group_id, $reloadCacheIfEmpty, $batchLimit, $isSelected, $orderByClause = '', $includeConflicts = TRUE, $criteria = [], $checkPermissions = TRUE, $searchLimit = 0) {
     $where = self::getWhereString($isSelected);