diff --git a/CRM/Contact/ActionMapping.php b/CRM/Contact/ActionMapping.php
index 90cae0a3a8dd..2f5f7b28d7de 100644
--- a/CRM/Contact/ActionMapping.php
+++ b/CRM/Contact/ActionMapping.php
@@ -25,7 +25,6 @@
+--------------------------------------------------------------------+
*/
-use Civi\ActionSchedule\RecipientBuilder;
/**
* Class CRM_Contact_ActionMapping
@@ -142,7 +141,8 @@ public function createQuery($schedule, $phase, $defaultParams) {
'casEntityIdField' => 'e.id',
'casContactTableAlias' => NULL,
]);
- $query->where('1'); // possible to have no "where" in this case
+ // possible to have no "where" in this case
+ $query->where('1');
}
$query['casDateField'] = 'e.' . $dateDBField;
diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index 4a8d50a5199c..f1fb6929d82e 100644
--- a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -62,7 +62,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
*
* @var array
*/
- static $_commPrefs = array(
+ public static $_commPrefs = array(
'do_not_phone',
'do_not_email',
'do_not_mail',
@@ -75,7 +75,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
*
* @var array
*/
- static $_greetingTypes = array(
+ public static $_greetingTypes = array(
'addressee',
'email_greeting',
'postal_greeting',
@@ -86,14 +86,14 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
*
* @var array
*/
- static $_importableFields = array();
+ public static $_importableFields = array();
/**
* Static field for all the contact information that we can potentially export.
*
* @var array
*/
- static $_exportableFields = NULL;
+ public static $_exportableFields = NULL;
/**
* Class constructor.
@@ -462,7 +462,8 @@ public static function ensureGreetingParamsAreSet(&$params) {
if (!empty($params['contact_id']) && !empty($missingGreetingParams)) {
$savedGreetings = civicrm_api3('Contact', 'getsingle', array(
'id' => $params['contact_id'],
- 'return' => array_keys($missingGreetingParams))
+ 'return' => array_keys($missingGreetingParams),
+ )
);
foreach (array_keys($missingGreetingParams) as $missingGreetingParam) {
@@ -1489,7 +1490,7 @@ public static function importableFields(
* True when used during search, might conflict with export param?.
*
* @param bool $withMultiRecord
- *
+ * @param bool $checkPermissions
* @return array
* array of exportable Fields
*/
@@ -1524,8 +1525,7 @@ public static function &exportableFields($contactType = 'Individual', $status =
'Household',
'Organization',
'All',
- )
- )) {
+ ))) {
$fields = array_merge($fields, CRM_Core_OptionValue::getFields('', $contactType));
}
// add current employer for individuals
@@ -1591,10 +1591,10 @@ public static function &exportableFields($contactType = 'Individual', $status =
}
else {
foreach (array(
- 'Individual',
- 'Household',
- 'Organization',
- ) as $type) {
+ 'Individual',
+ 'Household',
+ 'Organization',
+ ) as $type) {
$fields = array_merge($fields,
CRM_Core_BAO_CustomField::getFieldsForImport($type, FALSE, FALSE, $search, $checkPermissions, $withMultiRecord)
);
@@ -2387,23 +2387,21 @@ public static function formatProfileContactParams(
}
}
}
- elseif (in_array($key,
- array(
- 'nick_name',
- 'job_title',
- 'middle_name',
- 'birth_date',
- 'gender_id',
- 'current_employer',
- 'prefix_id',
- 'suffix_id',
- )) &&
- ($value == '' || !isset($value)) &&
- ($session->get('authSrc') & (CRM_Core_Permission::AUTH_SRC_CHECKSUM + CRM_Core_Permission::AUTH_SRC_LOGIN)) == 0 ||
- ($key == 'current_employer' && empty($params['current_employer']))) {
- // CRM-10128: if auth source is not checksum / login && $value is blank, do not fill $data with empty value
- // to avoid update with empty values
- continue;
+ elseif (in_array($key, array(
+ 'nick_name',
+ 'job_title',
+ 'middle_name',
+ 'birth_date',
+ 'gender_id',
+ 'current_employer',
+ 'prefix_id',
+ 'suffix_id',
+ )) && ($value == '' || !isset($value)) &&
+ ($session->get('authSrc') & (CRM_Core_Permission::AUTH_SRC_CHECKSUM + CRM_Core_Permission::AUTH_SRC_LOGIN)) == 0 ||
+ ($key == 'current_employer' && empty($params['current_employer']))) {
+ // CRM-10128: if auth source is not checksum / login && $value is blank, do not fill $data with empty value
+ // to avoid update with empty values
+ continue;
}
else {
$data[$key] = $value;
@@ -3416,8 +3414,7 @@ public static function triggerInfo(&$info, $tableName = NULL) {
array('table' => 'civicrm_im', 'column' => 'contact_id'),
array('table' => 'civicrm_phone', 'column' => 'contact_id'),
array('table' => 'civicrm_website', 'column' => 'contact_id'),
- )
- )
+ ))
->alterTriggerInfo($info, $tableName);
// Update phone table to populate phone_numeric field
diff --git a/CRM/Contact/BAO/Contact/Permission.php b/CRM/Contact/BAO/Contact/Permission.php
index 3ab63c829043..731958c98a5f 100644
--- a/CRM/Contact/BAO/Contact/Permission.php
+++ b/CRM/Contact/BAO/Contact/Permission.php
@@ -47,7 +47,7 @@ class CRM_Contact_BAO_Contact_Permission {
* @see CRM_Contact_BAO_Contact_Permission::allow
*
* @return array
- * list of contact IDs the logged in user has the given permission for
+ * list of contact IDs the logged in user has the given permission for
*/
public static function allowList($contact_ids, $type = CRM_Core_Permission::VIEW) {
$result_set = [];
@@ -114,7 +114,7 @@ public static function allowList($contact_ids, $type = CRM_Core_Permission::VIEW
// if some have been rejected, double check for permissions inherited by relationship
if (count($result_set) < count($contact_ids)) {
- $rejected_contacts = array_diff_key($contact_ids, $result_set);
+ $rejected_contacts = array_diff_key($contact_ids, $result_set);
// @todo consider storing these to the acl cache for next time, since we have fetched.
$allowed_by_relationship = self::relationshipList($rejected_contacts, $type);
foreach ($allowed_by_relationship as $contact_id) {
@@ -427,7 +427,6 @@ public static function relationshipList($contact_ids, $type) {
return array_keys($result_set);
}
-
/**
* @param int $contactID
* @param CRM_Core_Form $form
diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php
index 3ac9d2747020..94d8852e9ab8 100644
--- a/CRM/Contact/BAO/Group.php
+++ b/CRM/Contact/BAO/Group.php
@@ -751,7 +751,7 @@ public static function createHiddenSmartGroup($params) {
* @todo there seems little reason for the small number of functions that call this to pass in
* params that then need to be translated in this function since they are coding them when calling
*/
- static public function getGroupListSelector(&$params) {
+ public static function getGroupListSelector(&$params) {
// format the params
$params['offset'] = ($params['page'] - 1) * $params['rp'];
$params['rowCount'] = $params['rp'];
@@ -999,11 +999,13 @@ public static function getGroupList(&$params) {
$values[$object->id]['org_info'] = "{$object->org_name}";
}
else {
- $values[$object->id]['org_info'] = ''; // Empty cell
+ // Empty cell
+ $values[$object->id]['org_info'] = '';
}
}
else {
- $values[$object->id]['org_info'] = NULL; // Collapsed column if all cells are NULL
+ // Collapsed column if all cells are NULL
+ $values[$object->id]['org_info'] = NULL;
}
if ($object->created_id) {
$contactUrl = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$object->created_id}");
diff --git a/CRM/Contact/BAO/GroupContact.php b/CRM/Contact/BAO/GroupContact.php
index 688fb63f022e..c4540d79d53f 100644
--- a/CRM/Contact/BAO/GroupContact.php
+++ b/CRM/Contact/BAO/GroupContact.php
@@ -318,7 +318,7 @@ public static function getGroupList($contactId = 0, $visibility = FALSE) {
* @param bool $includeSmartGroups
* Include or Exclude Smart Group(s)
*
- * @return array|int $values
+ * @return array|int
* the relevant data object values for the contact or the total count when $count is TRUE
*/
public static function getContactGroup(
diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php
index e05bd90938ae..a54dcdeb43fc 100644
--- a/CRM/Contact/BAO/GroupContactCache.php
+++ b/CRM/Contact/BAO/GroupContactCache.php
@@ -32,7 +32,7 @@
*/
class CRM_Contact_BAO_GroupContactCache extends CRM_Contact_DAO_GroupContactCache {
- static $_alreadyLoaded = [];
+ public static $_alreadyLoaded = [];
/**
* Get a list of caching modes.
diff --git a/CRM/Contact/BAO/GroupNestingCache.php b/CRM/Contact/BAO/GroupNestingCache.php
index 74d7d6f1fe75..e48d988b9023 100644
--- a/CRM/Contact/BAO/GroupNestingCache.php
+++ b/CRM/Contact/BAO/GroupNestingCache.php
@@ -37,7 +37,7 @@ class CRM_Contact_BAO_GroupNestingCache {
*
* @throws \Exception
*/
- static public function update() {
+ public static function update() {
// lets build the tree in memory first
$sql = "
diff --git a/CRM/Contact/BAO/ProximityQuery.php b/CRM/Contact/BAO/ProximityQuery.php
index 2815979a17ab..c1e72783b872 100644
--- a/CRM/Contact/BAO/ProximityQuery.php
+++ b/CRM/Contact/BAO/ProximityQuery.php
@@ -50,6 +50,9 @@ class CRM_Contact_BAO_ProximityQuery {
* This version has been taken from Drupal's location module: http://drupal.org/project/location
*/
+ /**
+ * @var string
+ */
static protected $_earthFlattening;
static protected $_earthRadiusSemiMinor;
static protected $_earthRadiusSemiMajor;
diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php
index bc0450975b85..e5f9b4c6048b 100644
--- a/CRM/Contact/BAO/Query.php
+++ b/CRM/Contact/BAO/Query.php
@@ -80,14 +80,14 @@ class CRM_Contact_BAO_Query {
*
* @var array
*/
- static $_defaultReturnProperties = NULL;
+ public static $_defaultReturnProperties = NULL;
/**
* The default set of hier return properties.
*
* @var array
*/
- static $_defaultHierReturnProperties;
+ public static $_defaultHierReturnProperties;
/**
* The set of input params.
@@ -292,6 +292,7 @@ class CRM_Contact_BAO_Query {
/**
* Should we just display one contact record
+ * @var bool
*/
public $_useGroupBy = FALSE;
@@ -300,14 +301,14 @@ class CRM_Contact_BAO_Query {
*
* @var array
*/
- static $_relType;
+ public static $_relType;
/**
* The activity role
*
* @var array
*/
- static $_activityRole;
+ public static $_activityRole;
/**
* Consider the component activity type
@@ -315,7 +316,7 @@ class CRM_Contact_BAO_Query {
*
* @var array
*/
- static $_considerCompActivities;
+ public static $_considerCompActivities;
/**
* Consider with contact activities only,
@@ -323,7 +324,7 @@ class CRM_Contact_BAO_Query {
*
* @var array
*/
- static $_withContactActivitiesOnly;
+ public static $_withContactActivitiesOnly;
/**
* Use distinct component clause for component searches
@@ -359,7 +360,7 @@ class CRM_Contact_BAO_Query {
*
* @var array
*/
- static $_dependencies = [
+ public static $_dependencies = [
'civicrm_state_province' => 1,
'civicrm_country' => 1,
'civicrm_county' => 1,
@@ -369,8 +370,9 @@ class CRM_Contact_BAO_Query {
/**
* List of location specific fields.
+ * @var array
*/
- static $_locationSpecificFields = [
+ public static $_locationSpecificFields = [
'street_address',
'street_number',
'street_name',
@@ -396,6 +398,7 @@ class CRM_Contact_BAO_Query {
/**
* Remember if we handle either end of a number or date range
* so we can skip the other
+ * @var array
*/
protected $_rangeCache = [];
/**
@@ -408,7 +411,7 @@ class CRM_Contact_BAO_Query {
* Set to the name of the temp table if one has been created
* @var String
*/
- static $_relationshipTempTable = NULL;
+ public static $_relationshipTempTable = NULL;
public $_pseudoConstantsSelect = [];
@@ -2049,7 +2052,7 @@ public function whereClause($apiEntity = NULL) {
$this->_qill[0][] = ts("%1 %2 %3", [
1 => $field['title'],
2 => $qillop,
- 3 => $qillVal
+ 3 => $qillVal,
]);
}
else {
@@ -2326,7 +2329,8 @@ public function restWhere(&$values) {
$this->_qill[$grouping][] = ts("%1 %2 %3", [
1 => $field['title'],
2 => $qillop,
- 3 => (strpos($op, 'NULL') !== FALSE || strpos($op, 'EMPTY') !== FALSE) ? $qillVal : "'$qillVal'"]);
+ 3 => (strpos($op, 'NULL') !== FALSE || strpos($op, 'EMPTY') !== FALSE) ? $qillVal : "'$qillVal'",
+ ]);
if (is_array($value)) {
// traditionally an array being passed has been a fatal error. We can take advantage of this to add support
@@ -2573,9 +2577,7 @@ public static function fromClause(&$tables, $inner = NULL, $right = NULL, $prima
}
if ((!empty($tables['civicrm_state_province']) || !empty($tables['civicrm_country']) ||
- CRM_Utils_Array::value('civicrm_county', $tables)
- ) && empty($tables['civicrm_address'])
- ) {
+ CRM_Utils_Array::value('civicrm_county', $tables)) && empty($tables['civicrm_address'])) {
$tables = array_merge(['civicrm_address' => 1],
$tables
);
@@ -2584,9 +2586,9 @@ public static function fromClause(&$tables, $inner = NULL, $right = NULL, $prima
// add group_contact and group table is subscription history is present
if (!empty($tables['civicrm_subscription_history']) && empty($tables['civicrm_group'])) {
$tables = array_merge([
- 'civicrm_group' => 1,
- 'civicrm_group_contact' => 1,
- ],
+ 'civicrm_group' => 1,
+ 'civicrm_group_contact' => 1,
+ ],
$tables
);
}
@@ -4816,7 +4818,8 @@ public static function appendAnyValueToSelect($selectClauses, $groupBy, $aggrega
public static function getGroupByFromOrderBy(&$groupBy, $orderBys) {
if (!CRM_Utils_SQL::disableFullGroupByMode()) {
foreach ($orderBys as $orderBy) {
- $orderBy = str_ireplace([' DESC', ' ASC', '`'], '', $orderBy); // remove sort syntax from ORDER BY clauses if present
+ // remove sort syntax from ORDER BY clauses if present
+ $orderBy = str_ireplace([' DESC', ' ASC', '`'], '', $orderBy);
// if ORDER BY column is not present in GROUP BY then append it to end
if (preg_match('/(MAX|MIN)\(/i', trim($orderBy)) !== 1 && !strstr($groupBy, $orderBy)) {
$groupBy .= ", {$orderBy}";
@@ -5417,7 +5420,6 @@ public function numberRangeBuilder(
}
}
-
/**
* @param $values
* @param string $tableName
@@ -5435,7 +5437,8 @@ public function ageRangeQueryBuilder(
list($name, $op, $value, $grouping, $wildcard) = $values;
$asofDateValues = $this->getWhereValues("{$fieldName}_asof_date", $grouping);
- $asofDate = NULL; // will be treated as current day
+ // will be treated as current day
+ $asofDate = NULL;
if ($asofDateValues) {
$asofDate = CRM_Utils_Date::processDate($asofDateValues[2]);
$asofDateFormat = CRM_Utils_Date::customFormat(substr($asofDate, 0, 8));
@@ -5768,8 +5771,7 @@ public function filterRelatedContacts(&$from, &$where, &$having) {
* @return bool
*/
public static function caseImportant($op) {
- return
- in_array($op, ['LIKE', 'IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY']) ? FALSE : TRUE;
+ return in_array($op, ['LIKE', 'IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY']) ? FALSE : TRUE;
}
/**
@@ -5883,7 +5885,7 @@ public function optionValueQuery(
public static function parseSearchBuilderString($string, $dataType = 'Integer') {
$string = trim($string);
if (substr($string, 0, 1) != '(' || substr($string, -1, 1) != ')') {
- Return FALSE;
+ return FALSE;
}
$string = substr($string, 1, -1);
@@ -6022,11 +6024,11 @@ public function convertToPseudoNames(&$dao, $return = FALSE, $usedForAPI = FALSE
}
if (!$usedForAPI) {
foreach ([
- 'gender_id' => 'gender',
- 'prefix_id' => 'individual_prefix',
- 'suffix_id' => 'individual_suffix',
- 'communication_style_id' => 'communication_style',
- ] as $realField => $labelField) {
+ 'gender_id' => 'gender',
+ 'prefix_id' => 'individual_prefix',
+ 'suffix_id' => 'individual_suffix',
+ 'communication_style_id' => 'communication_style',
+ ] as $realField => $labelField) {
// This is a temporary routine for handling these fields while
// we figure out how to handled them based on metadata in
/// export and search builder. CRM-19815, CRM-19830.
@@ -6703,7 +6705,7 @@ public function getSearchSQLParts($offset = 0, $rowCount = 0, $sort = NULL,
'=',
'1',
'0',
- '0'
+ '0',
], $this->_params);
// if we’re explicitly looking for a certain contact’s contribs, events, etc.
@@ -6926,25 +6928,25 @@ protected function buildRelativeDateQuery(&$values) {
$this->_where[$grouping][] = $fieldSpec['where'] . " <= '{$dates[1]}'";
$this->_qill[$grouping][] = ts('%1 is ', [$fieldSpec['title']]) . $filters[$value] . ' (' . ts("to %1", [
- CRM_Utils_Date::customFormat($dates[1]),
- ]) . ')';
+ CRM_Utils_Date::customFormat($dates[1]),
+ ]) . ')';
}
elseif (empty($dates[1])) {
// ie. no end date we only have start date
$this->_where[$grouping][] = $fieldSpec['where'] . " >= '{$dates[1]}'";
$this->_qill[$grouping][] = ts('%1 is ', [$fieldSpec['title']]) . $filters[$value] . ' (' . ts("from %1", [
- CRM_Utils_Date::customFormat($dates[0]),
- ]) . ')';
+ CRM_Utils_Date::customFormat($dates[0]),
+ ]) . ')';
}
else {
// we have start and end dates.
$this->_where[$grouping][] = $fieldSpec['where'] . " BETWEEN '{$dates[0]}' AND '{$dates[1]}'";
$this->_qill[$grouping][] = ts('%1 is ', [$fieldSpec['title']]) . $filters[$value] . ' (' . ts("between %1 and %2", [
- CRM_Utils_Date::customFormat($dates[0]),
- CRM_Utils_Date::customFormat($dates[1]),
- ]) . ')';
+ CRM_Utils_Date::customFormat($dates[0]),
+ CRM_Utils_Date::customFormat($dates[1]),
+ ]) . ')';
}
}
@@ -6968,7 +6970,7 @@ protected function addAddressTable($tableKey, $joinCondition) {
return [
$aName,
- $addressJoin
+ $addressJoin,
];
}
diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php
index 8f2157f47495..d5c76f345e84 100644
--- a/CRM/Contact/BAO/Relationship.php
+++ b/CRM/Contact/BAO/Relationship.php
@@ -485,7 +485,6 @@ public static function getdefaults() {
);
}
-
/**
* Check if there is data to create the object.
*
@@ -1465,7 +1464,7 @@ public static function getRelationship(
* @return array
* array reference of all relationship types with context to current contact type .
*/
- static public function getRelationType($targetContactType) {
+ public static function getRelationType($targetContactType) {
$relationshipType = array();
$allRelationshipType = CRM_Core_PseudoConstant::relationshipType();
@@ -2038,7 +2037,6 @@ public static function membershipTypeToRelationshipTypes(&$params, $direction =
}
}
-
/**
* Wrapper for contact relationship selector.
*
diff --git a/CRM/Contact/BAO/SubscriptionHistory.php b/CRM/Contact/BAO/SubscriptionHistory.php
index 34064dddf4f0..ec1a44d18991 100644
--- a/CRM/Contact/BAO/SubscriptionHistory.php
+++ b/CRM/Contact/BAO/SubscriptionHistory.php
@@ -35,6 +35,7 @@
* BAO object for crm_email table.
*/
class CRM_Contact_BAO_SubscriptionHistory extends CRM_Contact_DAO_SubscriptionHistory {
+
/**
* Class constructor.
*/
diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php
index 5f3ce8babc46..f275cfa377f4 100644
--- a/CRM/Contact/Form/Contact.php
+++ b/CRM/Contact/Form/Contact.php
@@ -110,11 +110,13 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
/**
* Do we want to parse street address.
+ * @var bool
*/
public $_parseStreetAddress;
/**
* Check contact has a subtype or not.
+ * @var bool
*/
public $_isContactSubType;
@@ -122,6 +124,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
* Lets keep a cache of all the values that we retrieved.
* THis is an attempt to avoid the number of update statements
* during the write phase
+ * @var array
*/
public $_preEditValues;
@@ -586,6 +589,7 @@ public function addRules() {
* List of errors to be posted back to the form.
* @param int $contactId
* Contact id if doing update.
+ * @param string $contactType
*
* @return bool
* email/openId
@@ -1161,20 +1165,20 @@ public static function checkDuplicateContacts(&$fields, &$errors, $contactID, $c
$duplicateContactsLinks = '
';
$duplicateContactsLinks .= ts('One matching contact was found. ', [
- 'count' => count($contactLinks['rows']),
- 'plural' => '%count matching contacts were found.
',
- ]);
+ 'count' => count($contactLinks['rows']),
+ 'plural' => '%count matching contacts were found.
',
+ ]);
if ($contactLinks['msg'] == 'view') {
$duplicateContactsLinks .= ts('You can View the existing contact', [
- 'count' => count($contactLinks['rows']),
- 'plural' => 'You can View the existing contacts',
- ]);
+ 'count' => count($contactLinks['rows']),
+ 'plural' => 'You can View the existing contacts',
+ ]);
}
else {
$duplicateContactsLinks .= ts('You can View or Edit the existing contact', [
- 'count' => count($contactLinks['rows']),
- 'plural' => 'You can View or Edit the existing contacts',
- ]);
+ 'count' => count($contactLinks['rows']),
+ 'plural' => 'You can View or Edit the existing contacts',
+ ]);
}
if ($contactLinks['msg'] == 'merge') {
// We should also get a merge link if this is for an existing contact
@@ -1256,10 +1260,10 @@ public function parseAddress(&$params) {
$buildStreetAddress = FALSE;
$parseFieldName = 'street_address';
foreach ([
- 'street_number',
- 'street_name',
- 'street_unit',
- ] as $fld) {
+ 'street_number',
+ 'street_name',
+ 'street_unit',
+ ] as $fld) {
if (!empty($address[$fld])) {
$parseFieldName = 'street_number';
$buildStreetAddress = TRUE;
@@ -1288,11 +1292,11 @@ public function parseAddress(&$params) {
$streetAddress = NULL;
foreach ([
- 'street_number',
- 'street_number_suffix',
- 'street_name',
- 'street_unit',
- ] as $fld) {
+ 'street_number',
+ 'street_number_suffix',
+ 'street_name',
+ 'street_unit',
+ ] as $fld) {
if (in_array($fld, [
'street_name',
'street_unit',
diff --git a/CRM/Contact/Form/CustomData.php b/CRM/Contact/Form/CustomData.php
index dadbeb75e798..ddd06219bb0f 100644
--- a/CRM/Contact/Form/CustomData.php
+++ b/CRM/Contact/Form/CustomData.php
@@ -92,7 +92,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form {
/**
* Custom group id
*
- * @int
+ * @var int
*/
public $_groupID;
@@ -178,22 +178,21 @@ public function buildQuickForm() {
$this->assign('multiRecordDisplay', $this->_multiRecordDisplay);
$saveButtonName = $this->_copyValueId ? ts('Save a Copy') : ts('Save');
$this->addButtons([
- [
- 'type' => 'upload',
- 'name' => $saveButtonName,
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'upload',
- 'name' => ts('Save and New'),
- 'subName' => 'new',
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'upload',
+ 'name' => $saveButtonName,
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'upload',
+ 'name' => ts('Save and New'),
+ 'subName' => 'new',
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
}
return CRM_Custom_Form_CustomData::buildQuickForm($this);
@@ -206,17 +205,16 @@ public function buildQuickForm() {
// make this form an upload since we dont know if the custom data injected dynamically
// is of type file etc
$this->addButtons([
- [
- 'type' => 'upload',
- 'name' => ts('Save'),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'upload',
+ 'name' => ts('Save'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
/**
diff --git a/CRM/Contact/Form/DedupeFind.php b/CRM/Contact/Form/DedupeFind.php
index 69e62a70c62a..7f9ebaec2466 100644
--- a/CRM/Contact/Form/DedupeFind.php
+++ b/CRM/Contact/Form/DedupeFind.php
@@ -38,6 +38,7 @@ class CRM_Contact_Form_DedupeFind extends CRM_Admin_Form {
/**
* Indicate if this form should warn users of unsaved changes
+ * @var bool
*/
protected $unsavedChangesWarn = FALSE;
@@ -60,20 +61,19 @@ public function buildQuickForm() {
$this->add('text', 'limit', ts('No of contacts to find matches for '));
}
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Continue'),
- 'isDefault' => TRUE,
- ],
- //hack to support cancel button functionality
- [
- 'type' => 'submit',
- 'class' => 'cancel',
- 'icon' => 'fa-times',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Continue'),
+ 'isDefault' => TRUE,
+ ],
+ //hack to support cancel button functionality
+ [
+ 'type' => 'submit',
+ 'class' => 'cancel',
+ 'icon' => 'fa-times',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
/**
diff --git a/CRM/Contact/Form/DedupeRules.php b/CRM/Contact/Form/DedupeRules.php
index 4a8294f44e0a..82bd6ef93f6a 100644
--- a/CRM/Contact/Form/DedupeRules.php
+++ b/CRM/Contact/Form/DedupeRules.php
@@ -186,6 +186,7 @@ public static function formRule($fields, $files, $self) {
*
* @return array
*/
+
/**
* @return array
*/
@@ -289,14 +290,13 @@ public function postProcess() {
if ($dao->fetch()) {
// set the length to null for all the fields where prefix length is not supported. eg. int,tinyint,date,enum etc dataTypes.
if ($dao->COLUMN_NAME == $field && !in_array($dao->DATA_TYPE, [
- 'char',
- 'varchar',
- 'binary',
- 'varbinary',
- 'text',
- 'blob',
- ])
- ) {
+ 'char',
+ 'varchar',
+ 'binary',
+ 'varbinary',
+ 'text',
+ 'blob',
+ ])) {
$length = NULL;
}
elseif ($dao->COLUMN_NAME == $field && !empty($dao->CHARACTER_MAXIMUM_LENGTH) && ($length > $dao->CHARACTER_MAXIMUM_LENGTH)) {
diff --git a/CRM/Contact/Form/Edit/Address.php b/CRM/Contact/Form/Edit/Address.php
index 2420f8bdda10..8cc795e56a58 100644
--- a/CRM/Contact/Form/Edit/Address.php
+++ b/CRM/Contact/Form/Edit/Address.php
@@ -73,7 +73,8 @@ public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharin
"address[$blockId][is_primary]", [
'entity' => 'address',
'label' => ts('Primary location for this contact'),
- 'text' => ts('Primary location for this contact')] + $js);
+ 'text' => ts('Primary location for this contact'),
+ ] + $js);
if (!$inlineEdit) {
$js = ['id' => 'Address_' . $blockId . '_IsBilling', 'onClick' => 'singleSelect( this.id );'];
@@ -83,7 +84,8 @@ public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharin
"address[$blockId][is_billing]", [
'entity' => 'address',
'label' => ts('Billing location for this contact'),
- 'text' => ts('Billing location for this contact')] + $js);
+ 'text' => ts('Billing location for this contact'),
+ ] + $js);
// hidden element to store master address id
$form->addField("address[$blockId][master_id]", ['entity' => 'address', 'type' => 'hidden']);
@@ -118,11 +120,10 @@ public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharin
$continue = TRUE;
//Don't skip street parsed fields when parsing is enabled.
if (in_array($nameWithoutID, [
- 'street_number',
- 'street_name',
- 'street_unit',
- ]) && !empty($addressOptions['street_address_parsing'])
- ) {
+ 'street_number',
+ 'street_name',
+ 'street_unit',
+ ]) && !empty($addressOptions['street_address_parsing'])) {
$continue = FALSE;
}
if ($continue) {
@@ -259,9 +260,9 @@ public static function setDefaultValues(&$defaults, &$form) {
'address' => $addressValue['display'],
'name' => $shareAddressContactNames[$addressValue['master_id']]['name'],
'options' => CRM_Core_BAO_Address::getValues([
- 'entity_id' => $master_cid,
- 'contact_id' => $master_cid,
- ]),
+ 'entity_id' => $master_cid,
+ 'contact_id' => $master_cid,
+ ]),
'master_id' => $addressValue['master_id'],
];
$defaults['address'][$key]['master_contact_id'] = $master_cid;
@@ -285,11 +286,11 @@ public static function setDefaultValues(&$defaults, &$form) {
foreach ($defaults['address'] as $cnt => & $address) {
$streetAddress = NULL;
foreach ([
- 'street_number',
- 'street_number_suffix',
- 'street_name',
- 'street_unit',
- ] as $fld) {
+ 'street_number',
+ 'street_number_suffix',
+ 'street_name',
+ 'street_unit',
+ ] as $fld) {
if (in_array($fld, [
'street_name',
'street_unit',
diff --git a/CRM/Contact/Form/Edit/CommunicationPreferences.php b/CRM/Contact/Form/Edit/CommunicationPreferences.php
index dddb5d58d39f..91d125fa1ea2 100644
--- a/CRM/Contact/Form/Edit/CommunicationPreferences.php
+++ b/CRM/Contact/Form/Edit/CommunicationPreferences.php
@@ -41,7 +41,7 @@ class CRM_Contact_Form_Edit_CommunicationPreferences {
*
* @var array
*/
- static $greetings = [];
+ public static $greetings = [];
/**
* Build the form object elements for Communication Preferences object.
diff --git a/CRM/Contact/Form/Edit/Phone.php b/CRM/Contact/Form/Edit/Phone.php
index 0a881f3f9502..79538fbaf977 100644
--- a/CRM/Contact/Form/Edit/Phone.php
+++ b/CRM/Contact/Form/Edit/Phone.php
@@ -70,10 +70,10 @@ public static function buildQuickForm(&$form, $addressBlockCount = NULL, $blockE
//Block type select
$form->addField("phone[$blockId][location_type_id]", [
'entity' => 'phone',
- 'class' => 'eight',
- 'placeholder' => NULL,
- 'option_url' => NULL,
- ]);
+ 'class' => 'eight',
+ 'placeholder' => NULL,
+ 'option_url' => NULL,
+ ]);
//is_Primary radio
$js = ['id' => 'Phone_' . $blockId . '_IsPrimary', 'onClick' => 'singleSelect( this.id );', 'aria-label' => ts('Phone %1 is primary?', [1 => $blockId])];
diff --git a/CRM/Contact/Form/GroupContact.php b/CRM/Contact/Form/GroupContact.php
index 522121091811..da68e58b7755 100644
--- a/CRM/Contact/Form/GroupContact.php
+++ b/CRM/Contact/Form/GroupContact.php
@@ -126,13 +126,12 @@ public function buildQuickForm() {
$this->addField('group_id', ['class' => 'crm-action-menu fa-plus', 'placeholder' => $msg, 'options' => $groupSelect]);
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Add'),
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Add'),
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
}
diff --git a/CRM/Contact/Form/Inline.php b/CRM/Contact/Form/Inline.php
index 541cf814c6bb..0a03b0475e34 100644
--- a/CRM/Contact/Form/Inline.php
+++ b/CRM/Contact/Form/Inline.php
@@ -38,16 +38,19 @@ abstract class CRM_Contact_Form_Inline extends CRM_Core_Form {
/**
* Id of the contact that is being edited
+ * @var int
*/
public $_contactId;
/**
* Type of contact being edited
+ * @var string
*/
public $_contactType;
/**
* Sub type of contact being edited
+ * @var string
*/
public $_contactSubType;
diff --git a/CRM/Contact/Form/Inline/Address.php b/CRM/Contact/Form/Inline/Address.php
index 3bbd2d28a991..eda850c7d3ec 100644
--- a/CRM/Contact/Form/Inline/Address.php
+++ b/CRM/Contact/Form/Inline/Address.php
@@ -38,26 +38,31 @@ class CRM_Contact_Form_Inline_Address extends CRM_Contact_Form_Inline {
/**
* Location block no
+ * @var int
*/
private $_locBlockNo;
/**
* Do we want to parse street address.
+ * @var bool
*/
public $_parseStreetAddress;
/**
* Store address values
+ * @var array
*/
public $_values;
/**
* Form action
+ * @var string
*/
public $_action;
/**
* Address id
+ * @var int
*/
public $_addressId;
diff --git a/CRM/Contact/Form/Inline/CustomData.php b/CRM/Contact/Form/Inline/CustomData.php
index 62ae8adc167f..046ff6e4cb6b 100644
--- a/CRM/Contact/Form/Inline/CustomData.php
+++ b/CRM/Contact/Form/Inline/CustomData.php
@@ -39,7 +39,7 @@ class CRM_Contact_Form_Inline_CustomData extends CRM_Contact_Form_Inline {
/**
* Custom group id.
*
- * @int
+ * @var int
*/
public $_groupID;
diff --git a/CRM/Contact/Form/Inline/Email.php b/CRM/Contact/Form/Inline/Email.php
index f7595e051c36..322633df4ee8 100644
--- a/CRM/Contact/Form/Inline/Email.php
+++ b/CRM/Contact/Form/Inline/Email.php
@@ -38,11 +38,13 @@ class CRM_Contact_Form_Inline_Email extends CRM_Contact_Form_Inline {
/**
* Email addresses of the contact that is been viewed.
+ * @var array
*/
private $_emails = [];
/**
* No of email blocks for inline edit.
+ * @var int
*/
private $_blockCount = 6;
diff --git a/CRM/Contact/Form/Inline/IM.php b/CRM/Contact/Form/Inline/IM.php
index a44fbb3c4500..89658d42bced 100644
--- a/CRM/Contact/Form/Inline/IM.php
+++ b/CRM/Contact/Form/Inline/IM.php
@@ -38,11 +38,13 @@ class CRM_Contact_Form_Inline_IM extends CRM_Contact_Form_Inline {
/**
* Ims of the contact that is been viewed.
+ * @var array
*/
private $_ims = [];
/**
* No of im blocks for inline edit.
+ * @var int
*/
private $_blockCount = 6;
diff --git a/CRM/Contact/Form/Inline/OpenID.php b/CRM/Contact/Form/Inline/OpenID.php
index 55b9f1b22726..399279fd98e1 100644
--- a/CRM/Contact/Form/Inline/OpenID.php
+++ b/CRM/Contact/Form/Inline/OpenID.php
@@ -38,11 +38,13 @@ class CRM_Contact_Form_Inline_OpenID extends CRM_Contact_Form_Inline {
/**
* Ims of the contact that is been viewed.
+ * @var array
*/
private $_openids = [];
/**
* No of openid blocks for inline edit.
+ * @var int
*/
private $_blockCount = 6;
diff --git a/CRM/Contact/Form/Inline/Phone.php b/CRM/Contact/Form/Inline/Phone.php
index 1ee20388abfb..8cd7b6f729b1 100644
--- a/CRM/Contact/Form/Inline/Phone.php
+++ b/CRM/Contact/Form/Inline/Phone.php
@@ -38,11 +38,13 @@ class CRM_Contact_Form_Inline_Phone extends CRM_Contact_Form_Inline {
/**
* Phones of the contact that is been viewed
+ * @var array
*/
private $_phones = [];
/**
* No of phone blocks for inline edit
+ * @var int
*/
private $_blockCount = 6;
diff --git a/CRM/Contact/Form/Inline/Website.php b/CRM/Contact/Form/Inline/Website.php
index 0491e745ce47..a90ae37734a7 100644
--- a/CRM/Contact/Form/Inline/Website.php
+++ b/CRM/Contact/Form/Inline/Website.php
@@ -38,11 +38,13 @@ class CRM_Contact_Form_Inline_Website extends CRM_Contact_Form_Inline {
/**
* Websitess of the contact that is been viewed.
+ * @var array
*/
private $_websites = [];
/**
* No of website blocks for inline edit.
+ * @var int
*/
private $_blockCount = 6;
diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php
index 6dc3475ef0ce..1434c173f647 100644
--- a/CRM/Contact/Form/Merge.php
+++ b/CRM/Contact/Form/Merge.php
@@ -36,13 +36,19 @@
*/
class CRM_Contact_Form_Merge extends CRM_Core_Form {
// The id of the contact that there's a duplicate for; this one will
- // possibly inherit some of $_oid's properties and remain in the system.
- var $_cid = NULL;
+ /**
+ * possibly inherit some of $_oid's properties and remain in the system.
+ * @var int
+ */
+ public $_cid = NULL;
- // The id of the other contact - the duplicate one that will get deleted.
- var $_oid = NULL;
+ /**
+ * The id of the other contact - the duplicate one that will get deleted.
+ * @var int
+ */
+ public $_oid = NULL;
- var $_contactType = NULL;
+ public $_contactType = NULL;
/**
* @var array
@@ -54,7 +60,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
*
* @var int
*/
- var $limit;
+ public $limit;
/**
* String for quickform bug handling.
@@ -66,7 +72,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
*
* @var string
*/
- var $_qfZeroBug = 'e8cddb72-a257-11dc-b9cc-0016d3330ee9';
+ public $_qfZeroBug = 'e8cddb72-a257-11dc-b9cc-0016d3330ee9';
public function preProcess() {
try {
@@ -137,9 +143,9 @@ public function preProcess() {
$this->prev = $this->next = NULL;
foreach ([
- 'prev',
- 'next',
- ] as $position) {
+ 'prev',
+ 'next',
+ ] as $position) {
if (!empty($pos[$position])) {
if ($pos[$position]['id1'] && $pos[$position]['id2']) {
$rowParams = array_merge($urlParams, [
diff --git a/CRM/Contact/Form/RelatedContact.php b/CRM/Contact/Form/RelatedContact.php
index ad21672bee3f..2795870041ad 100644
--- a/CRM/Contact/Form/RelatedContact.php
+++ b/CRM/Contact/Form/RelatedContact.php
@@ -154,10 +154,10 @@ public function postProcess() {
$locType = CRM_Core_BAO_LocationType::getDefault();
foreach ([
- 'phone',
- 'email',
- 'address',
- ] as $locFld) {
+ 'phone',
+ 'email',
+ 'address',
+ ] as $locFld) {
if (!empty($this->_defaults[$locFld]) && $this->_defaults[$locFld][1]['location_type_id']) {
$params[$locFld][1]['is_primary'] = $this->_defaults[$locFld][1]['is_primary'];
$params[$locFld][1]['location_type_id'] = $this->_defaults[$locFld][1]['location_type_id'];
diff --git a/CRM/Contact/Form/Relationship.php b/CRM/Contact/Form/Relationship.php
index 686a371c2bf3..1516238bbf77 100644
--- a/CRM/Contact/Form/Relationship.php
+++ b/CRM/Contact/Form/Relationship.php
@@ -46,21 +46,25 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
/**
* This is a string which is either a_b or b_a used to determine the relationship between to contacts
+ * @var string
*/
public $_rtype;
/**
* This is a string which is used to determine the relationship between to contacts
+ * @var string
*/
public $_rtypeId;
/**
* Display name of contact a
+ * @var string
*/
public $_display_name_a;
/**
* Display name of contact b
+ * @var string
*/
public $_display_name_b;
@@ -95,11 +99,13 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
/**
* The relationship values if Updating relationship
+ * @var array
*/
public $_values;
/**
* Case id if it called from case context
+ * @var int
*/
public $_caseId;
@@ -277,17 +283,16 @@ public function addRules() {
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::DELETE) {
$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'),
+ ],
+ ]);
return;
}
@@ -568,7 +573,6 @@ private function createAction($params) {
return [$params, $relationshipIds];
}
-
/**
* Prepares parameters to be used for create/update actions
*
diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php
index 4671db0ec8d9..297b0f3face6 100644
--- a/CRM/Contact/Form/Search.php
+++ b/CRM/Contact/Form/Search.php
@@ -42,14 +42,14 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
*
* @var array
*/
- static $_validContext = NULL;
+ public static $_validContext = NULL;
/**
* List of values used when we want to display other objects.
*
* @var array
*/
- static $_modeValues = NULL;
+ public static $_modeValues = NULL;
/**
* The contextMenu.
@@ -129,7 +129,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
*
* @var array
*/
- static $csv = ['contact_type', 'group', 'tag'];
+ public static $csv = ['contact_type', 'group', 'tag'];
/**
* @var string how to display the results. Should we display as
@@ -153,8 +153,9 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
/**
* Name of the selector to use.
+ * @var string
*/
- static $_selectorName = 'CRM_Contact_Selector';
+ public static $_selectorName = 'CRM_Contact_Selector';
protected $_customSearchID = NULL;
protected $_customSearchClass = NULL;
@@ -638,17 +639,17 @@ public function preProcess() {
// FIXME: we should generalise in a way that components could inject url-filters
// just like they build their own form elements
foreach ([
- 'mailing_id',
- 'mailing_delivery_status',
- 'mailing_open_status',
- 'mailing_click_status',
- 'mailing_reply_status',
- 'mailing_optout',
- 'mailing_forward',
- 'mailing_unsubscribe',
- 'mailing_date_low',
- 'mailing_date_high',
- ] as $mailingFilter) {
+ 'mailing_id',
+ 'mailing_delivery_status',
+ 'mailing_open_status',
+ 'mailing_click_status',
+ 'mailing_reply_status',
+ 'mailing_optout',
+ 'mailing_forward',
+ 'mailing_unsubscribe',
+ 'mailing_date_low',
+ 'mailing_date_high',
+ ] as $mailingFilter) {
$type = 'String';
if ($mailingFilter == 'mailing_id' &&
$filterVal = CRM_Utils_Request::retrieve('mailing_id', 'Positive', $this)
diff --git a/CRM/Contact/Form/Search/Advanced.php b/CRM/Contact/Form/Search/Advanced.php
index 6c40a36ed7a4..0656d737d63d 100644
--- a/CRM/Contact/Form/Search/Advanced.php
+++ b/CRM/Contact/Form/Search/Advanced.php
@@ -168,6 +168,7 @@ public function buildQuickForm() {
*
* @return string
*/
+
/**
* @return string
*/
@@ -236,9 +237,9 @@ public function postProcess() {
// FIXME: so leaving this as a dependency for now
if (array_key_exists('contribution_amount_low', $this->_formValues)) {
foreach (array(
- 'contribution_amount_low',
- 'contribution_amount_high',
- ) as $f) {
+ 'contribution_amount_low',
+ 'contribution_amount_high',
+ ) as $f) {
$this->_formValues[$f] = CRM_Utils_Rule::cleanMoney($this->_formValues[$f]);
}
}
@@ -269,11 +270,11 @@ public function postProcess() {
!$this->_force
) {
foreach (array(
- 'case_type_id',
- 'case_status_id',
- 'case_deleted',
- 'case_tags',
- ) as $caseCriteria) {
+ 'case_type_id',
+ 'case_status_id',
+ 'case_deleted',
+ 'case_tags',
+ ) as $caseCriteria) {
if (!empty($this->_formValues[$caseCriteria])) {
$allCases = TRUE;
$this->_formValues['case_owner'] = 1;
diff --git a/CRM/Contact/Form/Search/Basic.php b/CRM/Contact/Form/Search/Basic.php
index cdfc0c71ba2f..9a3386836dbb 100644
--- a/CRM/Contact/Form/Search/Basic.php
+++ b/CRM/Contact/Form/Search/Basic.php
@@ -41,7 +41,7 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search {
*
* @var array
*/
- static $csv = ['contact_type', 'group', 'tag'];
+ public static $csv = ['contact_type', 'group', 'tag'];
/**
* Build the form object.
@@ -68,21 +68,21 @@ public function buildQuickForm() {
$groupHierarchy = CRM_Contact_BAO_Group::getGroupsHierarchy($this->_group, NULL, ' ', TRUE);
if (!empty($searchOptions['groups'])) {
$this->addField('group', [
- 'entity' => 'group_contact',
- 'label' => ts('in'),
- 'placeholder' => ts('- any group -'),
- 'options' => $groupHierarchy,
- ]);
+ 'entity' => 'group_contact',
+ 'label' => ts('in'),
+ 'placeholder' => ts('- any group -'),
+ 'options' => $groupHierarchy,
+ ]);
}
if (!empty($searchOptions['tags'])) {
// tag criteria
if (!empty($this->_tag)) {
$this->addField('tag', [
- 'entity' => 'entity_tag',
- 'label' => ts('with'),
- 'placeholder' => ts('- any tag -'),
- ]);
+ 'entity' => 'entity_tag',
+ 'label' => ts('with'),
+ 'placeholder' => ts('- any tag -'),
+ ]);
}
}
@@ -197,6 +197,8 @@ public function postProcess() {
* If Go is pressed then we must select some checkboxes and an action.
*
* @param array $fields
+ * @param array $files
+ * @param object $form
*
* @return array|bool
*/
@@ -232,6 +234,7 @@ public static function formRule($fields, $files, $form) {
*
* @return string
*/
+
/**
* @return string
*/
diff --git a/CRM/Contact/Form/Search/Builder.php b/CRM/Contact/Form/Search/Builder.php
index a1322ee1b85e..2a73f11a250f 100644
--- a/CRM/Contact/Form/Search/Builder.php
+++ b/CRM/Contact/Form/Search/Builder.php
@@ -161,13 +161,11 @@ public static function formRule($values, $files, $self) {
$v[2] = self::checkArrayKeyEmpty($v[2]);
if (in_array($v[1], [
- 'IS NULL',
- 'IS NOT NULL',
- 'IS EMPTY',
- 'IS NOT EMPTY',
- ]) &&
- !empty($v[2])
- ) {
+ 'IS NULL',
+ 'IS NOT NULL',
+ 'IS EMPTY',
+ 'IS NOT EMPTY',
+ ]) && !empty($v[2])) {
$errorMsg["value[$v[3]][$v[4]]"] = ts('Please clear your value if you want to use %1 operator.', [1 => $v[1]]);
}
elseif (substr($v[0], 0, 7) === 'do_not_' or substr($v[0], 0, 3) === 'is_') {
@@ -479,9 +477,9 @@ public static function fieldOptions() {
}
}
elseif (in_array(substr($field, 0, 3), [
- 'is_',
- 'do_',
- ]) || CRM_Utils_Array::value('data_type', $info) == 'Boolean'
+ 'is_',
+ 'do_',
+ ]) || CRM_Utils_Array::value('data_type', $info) == 'Boolean'
) {
$options[$field] = 'yesno';
if ($entity != 'contact') {
diff --git a/CRM/Contact/Form/Search/Criteria.php b/CRM/Contact/Form/Search/Criteria.php
index 10e61cb3a84c..a22d9a95ecc0 100644
--- a/CRM/Contact/Form/Search/Criteria.php
+++ b/CRM/Contact/Form/Search/Criteria.php
@@ -31,6 +31,7 @@
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Contact_Form_Search_Criteria {
+
/**
* @param CRM_Core_Form $form
*/
@@ -283,7 +284,7 @@ protected static function setBasicSearchFields($form) {
'all_tag_types' => [
'name' => 'all_tag_types',
'class' => 'search-field__span-3 search-field__checkbox',
- 'help' => ['id' => 'id-all-tag-types']
+ 'help' => ['id' => 'id-all-tag-types'],
],
'phone_numeric' => [
'name' => 'phone_numeric',
@@ -321,7 +322,6 @@ protected static function setBasicSearchFields($form) {
]);
}
-
/**
* @param CRM_Core_Form $form
*/
diff --git a/CRM/Contact/Form/Search/Custom.php b/CRM/Contact/Form/Search/Custom.php
index 3cb4ca2bd4e8..fad711ba9017 100644
--- a/CRM/Contact/Form/Search/Custom.php
+++ b/CRM/Contact/Form/Search/Custom.php
@@ -136,6 +136,7 @@ public function buildQuickForm() {
*
* @return string
*/
+
/**
* @return string
*/
diff --git a/CRM/Contact/Form/Search/Custom/Basic.php b/CRM/Contact/Form/Search/Custom/Basic.php
index 9968ce95c867..63a55860c0d7 100644
--- a/CRM/Contact/Form/Search/Custom/Basic.php
+++ b/CRM/Contact/Form/Search/Custom/Basic.php
@@ -66,13 +66,12 @@ public function __construct(&$formValues) {
foreach ($this->_columns as $name => $field) {
if (in_array($field, [
- 'street_address',
- 'city',
- 'state_province',
- 'postal_code',
- 'country',
- ]) && empty($addressOptions[$field])
- ) {
+ 'street_address',
+ 'city',
+ 'state_province',
+ 'postal_code',
+ 'country',
+ ]) && empty($addressOptions[$field])) {
unset($this->_columns[$name]);
continue;
}
diff --git a/CRM/Contact/Form/Search/Custom/DateAdded.php b/CRM/Contact/Form/Search/Custom/DateAdded.php
index 14916ac87770..27c954641238 100644
--- a/CRM/Contact/Form/Search/Custom/DateAdded.php
+++ b/CRM/Contact/Form/Search/Custom/DateAdded.php
@@ -35,7 +35,9 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
protected $_aclFrom = NULL;
protected $_aclWhere = NULL;
- protected $_datesTable = NULL, $_xgTable = NULL, $_igTable = NULL;
+ protected $_datesTable = NULL;
+ protected $_xgTable = NULL;
+ protected $_igTable = NULL;
/**
* Class constructor.
diff --git a/CRM/Contact/Form/Search/Custom/EventAggregate.php b/CRM/Contact/Form/Search/Custom/EventAggregate.php
index 004e080c28d7..441688dab657 100644
--- a/CRM/Contact/Form/Search/Custom/EventAggregate.php
+++ b/CRM/Contact/Form/Search/Custom/EventAggregate.php
@@ -93,13 +93,13 @@ public function buildForm(&$form) {
* for the search form.
*/
$form->assign('elements', [
- 'paid_online',
- 'start_date',
- 'end_date',
- 'show_payees',
- 'event_type_id',
- 'event_id',
- ]);
+ 'paid_online',
+ 'start_date',
+ 'end_date',
+ 'show_payees',
+ 'event_type_id',
+ 'event_id',
+ ]);
}
/**
@@ -276,8 +276,8 @@ public function where($includeContactIDs = FALSE) {
return implode(' AND ', $clauses);
}
-
/* This function does a query to get totals for some of the search result columns and returns a totals array. */
+
/**
* @return array
*/
diff --git a/CRM/Contact/Form/Search/Custom/FullText.php b/CRM/Contact/Form/Search/Custom/FullText.php
index 43dad2e26eb9..e8868722cb9e 100644
--- a/CRM/Contact/Form/Search/Custom/FullText.php
+++ b/CRM/Contact/Form/Search/Custom/FullText.php
@@ -69,7 +69,11 @@ class CRM_Contact_Form_Search_Custom_FullText extends CRM_Contact_Form_Search_Cu
protected $_limitDetailClause = NULL;
protected $_limitNumber = 10;
- protected $_limitNumberPlus1 = 11; // this should be one more than self::LIMIT
+ /**
+ * this should be one more than self::LIMIT
+ * @var int
+ */
+ protected $_limitNumberPlus1 = 11;
protected $_foundRows = [];
@@ -196,7 +200,8 @@ public function buildTempTable() {
'membership_status' => 'varchar(255)',
// We may have multiple files to list on one record.
// The temporary-table approach can't store full details for all of them
- 'file_ids' => 'varchar(255)', // comma-separate id listing
+ // comma-separate id listing
+ 'file_ids' => 'varchar(255)',
];
$sql = "
diff --git a/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php b/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php
index 2e3c9ade0c98..fc4dc667fc5e 100644
--- a/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php
+++ b/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php
@@ -93,7 +93,7 @@ public function getName() {
* keys: match-descriptor
* - count: int
*/
- public abstract function fillTempTable($queryText, $entityIDTableName, $detailTable, $queryLimit, $detailLimit);
+ abstract public function fillTempTable($queryText, $entityIDTableName, $detailTable, $queryLimit, $detailLimit);
/**
* @return bool
@@ -177,7 +177,7 @@ public function runQueries($queryText, &$tables, $entityIDTableName, $limit) {
$query = $tableValues + [
'text' => CRM_Utils_QueryFormatter::singleton()
- ->format($queryText, CRM_Utils_QueryFormatter::LANG_SOLR),
+ ->format($queryText, CRM_Utils_QueryFormatter::LANG_SOLR),
];
list($intLimit, $intOffset) = $this->parseLimitOffset($limit);
$files = $searcher->search($query, $intLimit, $intOffset);
@@ -191,8 +191,10 @@ public function runQueries($queryText, &$tables, $entityIDTableName, $limit) {
}
}
else {
- $fullTextFields = []; // array (string $sqlColumnName)
- $clauses = []; // array (string $sqlExpression)
+ // array (string $sqlColumnName)
+ $fullTextFields = [];
+ // array (string $sqlExpression)
+ $clauses = [];
foreach ($tableValues['fields'] as $fieldName => $fieldType) {
if ($fieldType == 'Int') {
diff --git a/CRM/Contact/Form/Search/Custom/FullText/Contribution.php b/CRM/Contact/Form/Search/Custom/FullText/Contribution.php
index 758dcedfc3be..293b728a6186 100644
--- a/CRM/Contact/Form/Search/Custom/FullText/Contribution.php
+++ b/CRM/Contact/Form/Search/Custom/FullText/Contribution.php
@@ -89,7 +89,8 @@ public function prepareQueries($queryText, $entityIDTableName) {
'amount_level' => NULL,
'trxn_Id' => NULL,
'invoice_id' => NULL,
- 'check_number' => 'Int', // Odd: This is really a VARCHAR, so why are we searching like an INT?
+ // Odd: This is really a VARCHAR, so why are we searching like an INT?
+ 'check_number' => 'Int',
'total_amount' => 'Int',
],
],
diff --git a/CRM/Contact/Form/Search/Custom/PostalMailing.php b/CRM/Contact/Form/Search/Custom/PostalMailing.php
index 865740f7deed..fc6998dbe7f7 100644
--- a/CRM/Contact/Form/Search/Custom/PostalMailing.php
+++ b/CRM/Contact/Form/Search/Custom/PostalMailing.php
@@ -33,6 +33,7 @@
class CRM_Contact_Form_Search_Custom_PostalMailing extends CRM_Contact_Form_Search_Custom_Base implements CRM_Contact_Form_Search_Interface {
protected $_aclFrom = NULL;
protected $_aclWhere = NULL;
+
/**
* Class constructor.
*
diff --git a/CRM/Contact/Form/Search/Custom/Proximity.php b/CRM/Contact/Form/Search/Custom/Proximity.php
index 4d382d46fa7b..dc517d92c8ec 100644
--- a/CRM/Contact/Form/Search/Custom/Proximity.php
+++ b/CRM/Contact/Form/Search/Custom/Proximity.php
@@ -248,6 +248,7 @@ public function from() {
//unused
return '';
}
+
/**
* @param bool $includeContactIDs
*
diff --git a/CRM/Contact/Form/Search/Custom/RandomSegment.php b/CRM/Contact/Form/Search/Custom/RandomSegment.php
index 57e45eb016b4..36addc77c6c9 100644
--- a/CRM/Contact/Form/Search/Custom/RandomSegment.php
+++ b/CRM/Contact/Form/Search/Custom/RandomSegment.php
@@ -372,6 +372,7 @@ public function setTitle($title) {
/**
* @return mixed
*/
+
/**
* @return mixed
*/
diff --git a/CRM/Contact/Form/Search/Custom/Sample.php b/CRM/Contact/Form/Search/Custom/Sample.php
index 197985fd94c4..a148f5ca3d48 100644
--- a/CRM/Contact/Form/Search/Custom/Sample.php
+++ b/CRM/Contact/Form/Search/Custom/Sample.php
@@ -33,6 +33,7 @@
class CRM_Contact_Form_Search_Custom_Sample extends CRM_Contact_Form_Search_Custom_Base implements CRM_Contact_Form_Search_Interface {
protected $_aclFrom = NULL;
protected $_aclWhere = NULL;
+
/**
* Class constructor.
*
diff --git a/CRM/Contact/Form/Search/Custom/TagContributions.php b/CRM/Contact/Form/Search/Custom/TagContributions.php
index 123de6f387fa..df0e60488fe1 100644
--- a/CRM/Contact/Form/Search/Custom/TagContributions.php
+++ b/CRM/Contact/Form/Search/Custom/TagContributions.php
@@ -169,6 +169,7 @@ public function from() {
* WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
*
*/
+
/**
* @param bool $includeContactIDs
*
@@ -218,7 +219,6 @@ public function where($includeContactIDs = FALSE) {
return implode(' AND ', $clauses);
}
-
/*
* Functions below generally don't need to be modified
*/
diff --git a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php
index 0ffa0ee4f054..3b341bcb2818 100644
--- a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php
+++ b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php
@@ -33,6 +33,7 @@
class CRM_Contact_Form_Search_Custom_ZipCodeRange extends CRM_Contact_Form_Search_Custom_Base implements CRM_Contact_Form_Search_Interface {
protected $_aclFrom = NULL;
protected $_aclWhere = NULL;
+
/**
* Class constructor.
*
diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php
index 76a875ee3880..9448c3b59c55 100644
--- a/CRM/Contact/Form/Task.php
+++ b/CRM/Contact/Form/Task.php
@@ -80,6 +80,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form_Task {
/**
* This includes the submitted values of the search form
+ * @var array
*/
static protected $_searchFormValues;
@@ -332,7 +333,6 @@ public static function getContactIds($form) {
return $contactIds;
}
-
/**
* Set default values for the form. Relationship that in edit/view action.
*
@@ -378,18 +378,17 @@ public function postProcess() {
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons([
- [
- 'type' => $nextType,
- 'name' => $title,
- 'isDefault' => TRUE,
- ],
- [
- 'type' => $backType,
- 'name' => ts('Cancel'),
- 'icon' => 'fa-times',
- ],
- ]
- );
+ [
+ 'type' => $nextType,
+ 'name' => $title,
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => $backType,
+ 'name' => ts('Cancel'),
+ 'icon' => 'fa-times',
+ ],
+ ]);
}
/**
@@ -507,7 +506,8 @@ public function createHiddenGroup() {
$searchParams = $this->controller->exportValues();
if ($searchParams['radio_ts'] == 'ts_sel') {
// Create a static group.
- $randID = md5(time() . rand(1, 1000)); // groups require a unique name
+ // groups require a unique name
+ $randID = md5(time() . rand(1, 1000));
$grpTitle = "Hidden Group {$randID}";
$grpID = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Group', $grpTitle, 'id', 'title');
diff --git a/CRM/Contact/Form/Task/AddToGroup.php b/CRM/Contact/Form/Task/AddToGroup.php
index c14badd6520b..2958f6e98eff 100644
--- a/CRM/Contact/Form/Task/AddToGroup.php
+++ b/CRM/Contact/Form/Task/AddToGroup.php
@@ -221,22 +221,22 @@ public function postProcess() {
$status = [
ts('%count contact added to group', [
- 'count' => $added,
- 'plural' => '%count contacts added to group',
+ 'count' => $added,
+ 'plural' => '%count contacts added to group',
]),
];
if ($notAdded) {
$status[] = ts('%count contact was already in group', [
- 'count' => $notAdded,
- 'plural' => '%count contacts were already in group',
- ]);
+ 'count' => $notAdded,
+ 'plural' => '%count contacts were already in group',
+ ]);
}
$status = '
- ' . implode('
- ', $status) . '
';
CRM_Core_Session::setStatus($status, ts('Added Contact to %1', [
- 1 => $groupName,
- 'count' => $added,
- 'plural' => 'Added Contacts to %1',
- ]), 'success', ['expires' => 0]);
+ 1 => $groupName,
+ 'count' => $added,
+ 'plural' => 'Added Contacts to %1',
+ ]), 'success', ['expires' => 0]);
if ($this->_context === 'amtg') {
CRM_Core_Session::singleton()
diff --git a/CRM/Contact/Form/Task/AddToParentClass.php b/CRM/Contact/Form/Task/AddToParentClass.php
index 729b86838f56..3a1231f5b364 100644
--- a/CRM/Contact/Form/Task/AddToParentClass.php
+++ b/CRM/Contact/Form/Task/AddToParentClass.php
@@ -84,18 +84,18 @@ public function buildQuickForm() {
$this->addElement('submit', $this->getButtonName('refresh'), ts('Search'), ['class' => 'crm-form-submit']);
$this->addElement('submit', $this->getButtonName('cancel'), ts('Cancel'), ['class' => 'crm-form-submit']);
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Add to %1', [1 => $contactType]),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Add to %1', [1 => $contactType]),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
+
/**
* Add relationships from form.
*/
diff --git a/CRM/Contact/Form/Task/AddToTag.php b/CRM/Contact/Form/Task/AddToTag.php
index c296641ac62f..db80cfc11985 100644
--- a/CRM/Contact/Form/Task/AddToTag.php
+++ b/CRM/Contact/Form/Task/AddToTag.php
@@ -142,9 +142,9 @@ public function postProcess() {
$status = [ts('%count contact tagged', ['count' => $added, 'plural' => '%count contacts tagged'])];
if ($notAdded) {
$status[] = ts('%count contact already had this tag', [
- 'count' => $notAdded,
- 'plural' => '%count contacts already had this tag',
- ]);
+ 'count' => $notAdded,
+ 'plural' => '%count contacts already had this tag',
+ ]);
}
$status = '
- ' . implode('
- ', $status) . '
';
CRM_Core_Session::setStatus($status, ts("Added Tag
%1", [1 => $this->_tags[$key]]), 'success', ['expires' => 0]);
diff --git a/CRM/Contact/Form/Task/Batch.php b/CRM/Contact/Form/Task/Batch.php
index cea1787a0654..d0bc8ac47756 100644
--- a/CRM/Contact/Form/Task/Batch.php
+++ b/CRM/Contact/Form/Task/Batch.php
@@ -45,21 +45,25 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task {
/**
* Maximum contacts that should be allowed to update.
+ * @var int
*/
protected $_maxContacts = 100;
/**
* Maximum profile fields that will be displayed.
+ * @var int
*/
protected $_maxFields = 9;
/**
* Variable to store redirect path.
+ * @var string
*/
protected $_userContext;
/**
* When not to reset sort_name.
+ * @var bool
*/
protected $_preserveDefault = TRUE;
@@ -102,17 +106,16 @@ public function buildQuickForm() {
//$this->_fields = array_slice($this->_fields, 0, $this->_maxFields);
$this->addButtons([
- [
- 'type' => 'submit',
- 'name' => ts('Update Contact(s)'),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'submit',
+ 'name' => ts('Update Contact(s)'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
$this->assign('profileTitle', $this->_title);
$this->assign('componentIds', $this->_contactIds);
@@ -249,9 +252,9 @@ public function postProcess() {
CRM_Core_Session::setStatus('', ts("Updates Saved"), 'success');
if ($inValidSubtypeCnt) {
CRM_Core_Session::setStatus(ts('Contact Subtype field of 1 contact has not been updated.', [
- 'plural' => 'Contact Subtype field of %count contacts has not been updated.',
- 'count' => $inValidSubtypeCnt,
- ]), ts('Invalid Subtype'));
+ 'plural' => 'Contact Subtype field of %count contacts has not been updated.',
+ 'count' => $inValidSubtypeCnt,
+ ]), ts('Invalid Subtype'));
}
}
diff --git a/CRM/Contact/Form/Task/Delete.php b/CRM/Contact/Form/Task/Delete.php
index 1c0b5c71e5ba..3411f67d05f0 100644
--- a/CRM/Contact/Form/Task/Delete.php
+++ b/CRM/Contact/Form/Task/Delete.php
@@ -48,6 +48,7 @@ class CRM_Contact_Form_Task_Delete extends CRM_Contact_Form_Task {
/**
* Cache shared address message so we don't query twice
+ * @var string
*/
protected $_sharedAddressMessage = NULL;
@@ -123,16 +124,16 @@ public function preProcess() {
if (count($this->_contactIds) > 1) {
// more than one contact deleted
$message = ts('One of the selected contacts has an address record that is shared with 1 other contact.', [
- 'plural' => 'One or more selected contacts have address records which are shared with %count other contacts.',
- 'count' => $sharedAddressCount,
- ]);
+ 'plural' => 'One or more selected contacts have address records which are shared with %count other contacts.',
+ 'count' => $sharedAddressCount,
+ ]);
}
else {
// only one contact deleted
$message = ts('This contact has an address record which is shared with 1 other contact.', [
- 'plural' => 'This contact has an address record which is shared with %count other contacts.',
- 'count' => $sharedAddressCount,
- ]);
+ 'plural' => 'This contact has an address record which is shared with %count other contacts.',
+ 'count' => $sharedAddressCount,
+ ]);
}
CRM_Core_Session::setStatus($message . ' ' . ts('Shared addresses will not be removed or altered but will no longer be shared.'), ts('Shared Addesses Owner'));
}
@@ -246,24 +247,24 @@ public function postProcess() {
if ($this->_restore) {
$title = ts('Restored');
$status = ts('%1 has been restored from the trash.', [
- 1 => $name,
- 'plural' => '%count contacts restored from trash.',
- 'count' => $deleted,
- ]);
+ 1 => $name,
+ 'plural' => '%count contacts restored from trash.',
+ 'count' => $deleted,
+ ]);
}
elseif ($this->_skipUndelete) {
$status = ts('%1 has been permanently deleted.', [
- 1 => $name,
- 'plural' => '%count contacts permanently deleted.',
- 'count' => $deleted,
- ]);
+ 1 => $name,
+ 'plural' => '%count contacts permanently deleted.',
+ 'count' => $deleted,
+ ]);
}
else {
$status = ts('%1 has been moved to the trash.', [
- 1 => $name,
- 'plural' => '%count contacts moved to trash.',
- 'count' => $deleted,
- ]);
+ 1 => $name,
+ 'plural' => '%count contacts moved to trash.',
+ 'count' => $deleted,
+ ]);
}
$session->setStatus($status, $title, 'success');
}
diff --git a/CRM/Contact/Form/Task/EmailCommon.php b/CRM/Contact/Form/Task/EmailCommon.php
index 60d7f653c556..5006f9d5321c 100644
--- a/CRM/Contact/Form/Task/EmailCommon.php
+++ b/CRM/Contact/Form/Task/EmailCommon.php
@@ -526,9 +526,9 @@ public static function submit(&$form, $formValues) {
$count_success = count($form->_toContactDetails);
CRM_Core_Session::setStatus(ts('One message was sent successfully. ', array(
- 'plural' => '%count messages were sent successfully. ',
- 'count' => $count_success,
- )) . $followupStatus, ts('Message Sent', array('plural' => 'Messages Sent', 'count' => $count_success)), 'success');
+ 'plural' => '%count messages were sent successfully. ',
+ 'count' => $count_success,
+ )) . $followupStatus, ts('Message Sent', array('plural' => 'Messages Sent', 'count' => $count_success)), 'success');
}
// Display the name and number of contacts for those email is not sent.
@@ -547,9 +547,9 @@ public static function submit(&$form, $formValues) {
}
$status = '(' . ts('because no email address on file or communication preferences specify DO NOT EMAIL or Contact is deceased or Primary email address is On Hold') . ')
- ' . implode('
- ', $not_sent) . '
';
CRM_Core_Session::setStatus($status, ts('One Message Not Sent', array(
- 'count' => count($emailsNotSent),
- 'plural' => '%count Messages Not Sent',
- )), 'info');
+ 'count' => count($emailsNotSent),
+ 'plural' => '%count Messages Not Sent',
+ )), 'info');
}
if (isset($form->_caseId)) {
diff --git a/CRM/Contact/Form/Task/LabelCommon.php b/CRM/Contact/Form/Task/LabelCommon.php
index d9cb7052832a..74bdc83cb185 100644
--- a/CRM/Contact/Form/Task/LabelCommon.php
+++ b/CRM/Contact/Form/Task/LabelCommon.php
@@ -64,7 +64,6 @@ public static function createLabel(&$contactRows, &$format, $fileName = 'Mailing
$pdf->Output($fileName, 'D');
}
-
/**
* Get the rows for the labels.
*
diff --git a/CRM/Contact/Form/Task/Map.php b/CRM/Contact/Form/Task/Map.php
index f22d59d122e2..82e1af323efa 100644
--- a/CRM/Contact/Form/Task/Map.php
+++ b/CRM/Contact/Form/Task/Map.php
@@ -114,13 +114,12 @@ public function preProcess() {
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'done',
- 'name' => ts('Done'),
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'done',
+ 'name' => ts('Done'),
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
/**
diff --git a/CRM/Contact/Form/Task/PickProfile.php b/CRM/Contact/Form/Task/PickProfile.php
index 875d3ae1d49c..a3a061b8dde3 100644
--- a/CRM/Contact/Form/Task/PickProfile.php
+++ b/CRM/Contact/Form/Task/PickProfile.php
@@ -45,16 +45,19 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task {
/**
* Maximum contacts that should be allowed to update
+ * @var int
*/
protected $_maxContacts = 100;
/**
* Maximum profile fields that will be displayed
+ * @var int
*/
protected $_maxFields = 9;
/**
* Variable to store redirect path
+ * @var string
*/
protected $_userContext;
@@ -72,9 +75,9 @@ public function preProcess() {
//validations
if (count($this->_contactIds) > $this->_maxContacts) {
CRM_Core_Session::setStatus(ts("The maximum number of contacts you can select for Update multiple contacts is %1. You have selected %2. Please select fewer contacts from your search results and try again.", [
- 1 => $this->_maxContacts,
- 2 => count($this->_contactIds),
- ]), ts('Maximum Exceeded'), 'error');
+ 1 => $this->_maxContacts,
+ 2 => count($this->_contactIds),
+ ]), ts('Maximum Exceeded'), 'error');
$validate = TRUE;
}
diff --git a/CRM/Contact/Form/Task/Print.php b/CRM/Contact/Form/Task/Print.php
index 8040df3e5d90..911af3dd8257 100644
--- a/CRM/Contact/Form/Task/Print.php
+++ b/CRM/Contact/Form/Task/Print.php
@@ -113,18 +113,17 @@ public function buildQuickForm() {
// just need to add a javacript to popup the window for printing
//
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Print Contact List'),
- 'js' => ['onclick' => 'window.print()'],
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'back',
- 'name' => ts('Done'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Print Contact List'),
+ 'js' => ['onclick' => 'window.print()'],
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'back',
+ 'name' => ts('Done'),
+ ],
+ ]);
}
/**
diff --git a/CRM/Contact/Form/Task/ProximityCommon.php b/CRM/Contact/Form/Task/ProximityCommon.php
index 19d2bd37f04c..6f632cb9de6e 100644
--- a/CRM/Contact/Form/Task/ProximityCommon.php
+++ b/CRM/Contact/Form/Task/ProximityCommon.php
@@ -63,7 +63,7 @@ class CRM_Contact_Form_Task_ProximityCommon {
* @param CRM_Core_Form $form
* @param int $proxSearch
*/
- static public function buildQuickForm($form, $proxSearch) {
+ public static function buildQuickForm($form, $proxSearch) {
// is proximity search required (2) or optional (1)?
$proxRequired = ($proxSearch == 2 ? TRUE : FALSE);
$form->assign('proximity_search', TRUE);
@@ -107,7 +107,7 @@ public static function formRule($fields, $files, $form) {
if (empty($fields['prox_state_province_id']) || empty($fields['prox_country_id'])) {
$errors["prox_state_province_id"] = ts("Country AND State/Province are required to search by distance.");
}
- if (!CRM_Utils_Array::value('prox_postal_code', $fields) AND
+ if (!CRM_Utils_Array::value('prox_postal_code', $fields) and
!CRM_Utils_Array::value('prox_city', $fields)
) {
$errors["prox_distance"] = ts("City OR Postal Code are required to search by distance.");
@@ -125,7 +125,7 @@ public static function formRule($fields, $files, $form) {
* @return array
* the default array reference
*/
- static public function setDefaultValues($form) {
+ public static function setDefaultValues($form) {
$defaults = [];
$config = CRM_Core_Config::singleton();
$countryDefault = $config->defaultContactCountry;
diff --git a/CRM/Contact/Form/Task/RemoveFromGroup.php b/CRM/Contact/Form/Task/RemoveFromGroup.php
index 5df58cc48f03..d803f436e7b6 100644
--- a/CRM/Contact/Form/Task/RemoveFromGroup.php
+++ b/CRM/Contact/Form/Task/RemoveFromGroup.php
@@ -84,15 +84,15 @@ public function postProcess() {
];
if ($notRemoved) {
$status[] = ts('1 contact was already not in this group', [
- 'count' => $notRemoved,
- 'plural' => '%count contacts were already not in this group',
- ]);
+ 'count' => $notRemoved,
+ 'plural' => '%count contacts were already not in this group',
+ ]);
}
$status = '
- ' . implode('
- ', $status) . '
';
CRM_Core_Session::setStatus($status, ts("Removed Contact From Group", [
- 'plural' => "Removed Contacts From Group",
- 'count' => $removed,
- ]), 'success', ['expires' => 0]);
+ 'plural' => "Removed Contacts From Group",
+ 'count' => $removed,
+ ]), 'success', ['expires' => 0]);
}
}
diff --git a/CRM/Contact/Form/Task/RemoveFromTag.php b/CRM/Contact/Form/Task/RemoveFromTag.php
index d88a15b59f7b..3c18e5b3e2e3 100644
--- a/CRM/Contact/Form/Task/RemoveFromTag.php
+++ b/CRM/Contact/Form/Task/RemoveFromTag.php
@@ -129,15 +129,15 @@ public function postProcess() {
$status = [
ts('%count contact un-tagged', [
- 'count' => $removed,
- 'plural' => '%count contacts un-tagged',
- ]),
+ 'count' => $removed,
+ 'plural' => '%count contacts un-tagged',
+ ]),
];
if ($notRemoved) {
$status[] = ts('1 contact already did not have this tag', [
- 'count' => $notRemoved,
- 'plural' => '%count contacts already did not have this tag',
- ]);
+ 'count' => $notRemoved,
+ 'plural' => '%count contacts already did not have this tag',
+ ]);
}
$status = '
- ' . implode('
- ', $status) . '
';
CRM_Core_Session::setStatus($status, ts("Removed Tag
%1", [1 => $this->_tags[$key]]), 'success', ['expires' => 0]);
diff --git a/CRM/Contact/Form/Task/Result.php b/CRM/Contact/Form/Task/Result.php
index 3222cf410a6f..22c8bea27382 100644
--- a/CRM/Contact/Form/Task/Result.php
+++ b/CRM/Contact/Form/Task/Result.php
@@ -95,13 +95,12 @@ public function preProcess() {
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'done',
- 'name' => ts('Done'),
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'done',
+ 'name' => ts('Done'),
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
}
diff --git a/CRM/Contact/Form/Task/SMSCommon.php b/CRM/Contact/Form/Task/SMSCommon.php
index d6802158a196..eba06f8006ed 100644
--- a/CRM/Contact/Form/Task/SMSCommon.php
+++ b/CRM/Contact/Form/Task/SMSCommon.php
@@ -43,7 +43,6 @@ class CRM_Contact_Form_Task_SMSCommon {
public $_toContactPhone = [];
-
/**
* Pre process the provider.
*
@@ -401,9 +400,9 @@ public static function postProcess(&$form) {
if ($countSuccess > 0) {
CRM_Core_Session::setStatus(ts('One message was sent successfully.', [
- 'plural' => '%count messages were sent successfully.',
- 'count' => $countSuccess,
- ]), ts('Message Sent', ['plural' => 'Messages Sent', 'count' => $countSuccess]), 'success');
+ 'plural' => '%count messages were sent successfully.',
+ 'count' => $countSuccess,
+ ]), ts('Message Sent', ['plural' => 'Messages Sent', 'count' => $countSuccess]), 'success');
}
if (is_array($sent)) {
@@ -415,9 +414,9 @@ public static function postProcess(&$form) {
}
$status .= '';
CRM_Core_Session::setStatus($status, ts('One Message Not Sent', [
- 'count' => count($sent),
- 'plural' => '%count Messages Not Sent',
- ]), 'info');
+ 'count' => count($sent),
+ 'plural' => '%count Messages Not Sent',
+ ]), 'info');
}
else {
//Display the name and number of contacts for those sms is not sent.
@@ -437,9 +436,9 @@ public static function postProcess(&$form) {
}
$status .= ')
- ' . implode('
- ', $not_sent) . '
';
CRM_Core_Session::setStatus($status, ts('One Message Not Sent', [
- 'count' => count($smsNotSent),
- 'plural' => '%count Messages Not Sent',
- ]), 'info');
+ 'count' => count($smsNotSent),
+ 'plural' => '%count Messages Not Sent',
+ ]), 'info');
}
}
}
diff --git a/CRM/Contact/Form/Task/Unhold.php b/CRM/Contact/Form/Task/Unhold.php
index 0f51395bc2b1..add289176475 100644
--- a/CRM/Contact/Form/Task/Unhold.php
+++ b/CRM/Contact/Form/Task/Unhold.php
@@ -28,14 +28,14 @@ public function postProcess() {
if ($rowCount) {
CRM_Core_Session::setStatus(ts('%count email was found on hold and updated.', [
- 'count' => $rowCount,
- 'plural' => '%count emails were found on hold and updated.',
- ]), ts('Emails Restored'), 'success');
+ 'count' => $rowCount,
+ 'plural' => '%count emails were found on hold and updated.',
+ ]), ts('Emails Restored'), 'success');
}
else {
CRM_Core_Session::setStatus(ts('The selected contact does not have an email on hold.', [
- 'plural' => 'None of the selected contacts have an email on hold.',
- ]), ts('No Emails to Restore'), 'info');
+ 'plural' => 'None of the selected contacts have an email on hold.',
+ ]), ts('No Emails to Restore'), 'info');
}
}
else {
diff --git a/CRM/Contact/Import/Field.php b/CRM/Contact/Import/Field.php
index 84679aaf6ec2..a1abc023439e 100644
--- a/CRM/Contact/Import/Field.php
+++ b/CRM/Contact/Import/Field.php
@@ -30,17 +30,20 @@
*/
class CRM_Contact_Import_Field {
- /**#@+
+ /**
+ * #@+
* @var string
*/
/**
* Name of the field
+ * @var string
*/
public $_name;
/**
* Title of the field to be used in display
+ * @var string
*/
public $_title;
diff --git a/CRM/Contact/Import/Form/DataSource.php b/CRM/Contact/Import/Form/DataSource.php
index 0c8f1061bcbb..2a7b1839e67f 100644
--- a/CRM/Contact/Import/Form/DataSource.php
+++ b/CRM/Contact/Import/Form/DataSource.php
@@ -82,9 +82,9 @@ public function preProcess() {
closedir($handler);
if (!empty($results)) {
CRM_Core_Error::fatal(ts('
%1 file(s) in %2 directory are not writable. Listed file(s) might be used during the import to log the errors occurred during Import process. Contact your site administrator for assistance.', [
- 1 => implode(', ', $results),
- 2 => $config->uploadDir,
- ]));
+ 1 => implode(', ', $results),
+ 2 => $config->uploadDir,
+ ]));
}
$this->_dataSourceIsValid = FALSE;
@@ -216,18 +216,17 @@ public function buildQuickForm() {
}
$this->addButtons([
- [
- 'type' => 'upload',
- 'name' => ts('Continue'),
- 'spacing' => ' ',
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'upload',
+ 'name' => ts('Continue'),
+ 'spacing' => ' ',
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
}
/**
diff --git a/CRM/Contact/Import/Form/MapField.php b/CRM/Contact/Import/Form/MapField.php
index 185ddfff400d..fa24b121655c 100644
--- a/CRM/Contact/Import/Form/MapField.php
+++ b/CRM/Contact/Import/Form/MapField.php
@@ -130,10 +130,10 @@ public function preProcess() {
if ($this->_onDuplicate != CRM_Import_Parser::DUPLICATE_NOCHECK) {
//Mark Dedupe Rule Fields as required, since it's used in matching contact
foreach (array(
- 'Individual',
- 'Household',
- 'Organization',
- ) as $cType) {
+ 'Individual',
+ 'Household',
+ 'Organization',
+ ) as $cType) {
$ruleParams = array(
'contact_type' => $cType,
'used' => 'Unsupervised',
@@ -608,7 +608,7 @@ public function buildQuickForm() {
'type' => 'cancel',
'name' => ts('Cancel'),
),
- )
+ )
);
}
diff --git a/CRM/Contact/Import/Form/Preview.php b/CRM/Contact/Import/Form/Preview.php
index e132ea7db4bf..e47a5a10474a 100644
--- a/CRM/Contact/Import/Form/Preview.php
+++ b/CRM/Contact/Import/Form/Preview.php
@@ -151,9 +151,9 @@ public function buildQuickForm() {
if (!empty($groups)) {
$this->addElement('select', 'groups', ts('Add imported records to existing group(s)'), $groups, array(
- 'multiple' => "multiple",
- 'class' => 'crm-select2',
- ));
+ 'multiple' => "multiple",
+ 'class' => 'crm-select2',
+ ));
}
//display new tag
diff --git a/CRM/Contact/Import/Importer.php b/CRM/Contact/Import/Importer.php
index 6162b7090d41..779d994b6ebe 100644
--- a/CRM/Contact/Import/Importer.php
+++ b/CRM/Contact/Import/Importer.php
@@ -36,6 +36,7 @@
* via a form post) and asynchronously (i.e. by the workflow system)
*/
class CRM_Contact_Import_Importer {
+
/**
*/
public function __construct() {
diff --git a/CRM/Contact/Import/Parser.php b/CRM/Contact/Import/Parser.php
index 114986d8e78e..8979fb64f6a2 100644
--- a/CRM/Contact/Import/Parser.php
+++ b/CRM/Contact/Import/Parser.php
@@ -43,16 +43,19 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
/**
* Running total number of un-matched Contacts.
+ * @var int
*/
protected $_unMatchCount;
/**
* Array of unmatched lines
+ * @var array
*/
protected $_unMatch;
/**
* Total number of contacts with unparsed addresses
+ * @var int
*/
protected $_unparsedAddressCount;
@@ -294,53 +297,43 @@ public function run(
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 Contact URL'),
- ],
- $customHeaders
- );
+ ts('Line Number'),
+ ts('View Contact URL'),
+ ], $customHeaders);
$this->_duplicateFileName = self::errorFileName(self::DUPLICATE);
self::exportCSV($this->_duplicateFileName, $headers, $this->_duplicates);
}
if ($this->_unMatchCount) {
$headers = array_merge([
- ts('Line Number'),
- ts('Reason'),
- ],
- $customHeaders
- );
+ ts('Line Number'),
+ ts('Reason'),
+ ], $customHeaders);
$this->_misMatchFilemName = self::errorFileName(self::NO_MATCH);
self::exportCSV($this->_misMatchFilemName, $headers, $this->_unMatch);
}
if ($this->_unparsedAddressCount) {
$headers = array_merge([
- ts('Line Number'),
- ts('Contact Edit URL'),
- ],
- $customHeaders
- );
+ ts('Line Number'),
+ ts('Contact Edit URL'),
+ ], $customHeaders);
$this->_errorFileName = self::errorFileName(self::UNPARSED_ADDRESS_WARNING);
self::exportCSV($this->_errorFileName, $headers, $this->_unparsedAddresses);
}
@@ -380,6 +373,7 @@ public function setActiveFieldLocationTypes($elements) {
/**
* @param $elements
*/
+
/**
* @param $elements
*/
diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php
index 08bc64789f97..663aa55101cf 100644
--- a/CRM/Contact/Import/Parser/Contact.php
+++ b/CRM/Contact/Import/Parser/Contact.php
@@ -80,7 +80,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
/**
* Array of successfully imported contact id's
*
- * @array
+ * @var array
*/
protected $_newContacts;
@@ -94,7 +94,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
/**
* Array of successfully imported related contact id's
*
- * @array
+ * @var array
*/
protected $_newRelatedContacts;
@@ -251,10 +251,9 @@ public function init() {
$this->_updateWithId = FALSE;
if (in_array('id', $this->_mapperKeys) || ($this->_externalIdentifierIndex >= 0 && in_array($this->_onDuplicate, [
- CRM_Import_Parser::DUPLICATE_UPDATE,
- CRM_Import_Parser::DUPLICATE_FILL,
- ]))
- ) {
+ CRM_Import_Parser::DUPLICATE_UPDATE,
+ CRM_Import_Parser::DUPLICATE_FILL,
+ ]))) {
$this->_updateWithId = TRUE;
}
@@ -513,10 +512,9 @@ public function import($onDuplicate, &$values, $doGeocodeAddress = FALSE) {
//check if external identifier exists in database
if (!empty($params['external_identifier']) && (!empty($params['id']) || in_array($onDuplicate, [
- CRM_Import_Parser::DUPLICATE_SKIP,
- CRM_Import_Parser::DUPLICATE_NOCHECK,
- ]))
- ) {
+ CRM_Import_Parser::DUPLICATE_SKIP,
+ CRM_Import_Parser::DUPLICATE_NOCHECK,
+ ]))) {
$extIDResult = civicrm_api3('Contact', 'get', [
'external_identifier' => $params['external_identifier'],
@@ -833,10 +831,9 @@ public function import($onDuplicate, &$values, $doGeocodeAddress = FALSE) {
}
// check for valid related contact id in update/fill mode, CRM-4424
if (in_array($onDuplicate, [
- CRM_Import_Parser::DUPLICATE_UPDATE,
- CRM_Import_Parser::DUPLICATE_FILL,
- ]) && !empty($params[$key]['id'])
- ) {
+ CRM_Import_Parser::DUPLICATE_UPDATE,
+ CRM_Import_Parser::DUPLICATE_FILL,
+ ]) && !empty($params[$key]['id'])) {
$relatedContactType = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $params[$key]['id'], 'contact_type');
if (!$relatedContactType) {
$errorMessage = ts("No contact found for this related contact ID: %1", [1 => $params[$key]['id']]);
@@ -1316,10 +1313,10 @@ public static function isErrorInCustomData($params, &$errorMessage, $csType = NU
$error = TRUE;
foreach ([
- $countryNames,
- $countryIsoCodes,
- $limitCodes,
- ] as $values) {
+ $countryNames,
+ $countryIsoCodes,
+ $limitCodes,
+ ] as $values) {
if (in_array(trim($countryValue), $values)) {
$error = FALSE;
break;
diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php
index db7dca4ab7fd..f354d12bea9d 100644
--- a/CRM/Contact/Page/AJAX.php
+++ b/CRM/Contact/Page/AJAX.php
@@ -41,9 +41,11 @@ class CRM_Contact_Page_AJAX {
* is the time window in which they can check usernames
* (without reloading the overall form).
*/
- const CHECK_USERNAME_TTL = 10800; // 3hr; 3*60*60
+ // 3hr; 3*60*60
+ const CHECK_USERNAME_TTL = 10800;
- const AUTOCOMPLETE_TTL = 21600; // 6hr; 6*60*60
+ // 6hr; 6*60*60
+ const AUTOCOMPLETE_TTL = 21600;
/**
* Ajax callback for custom fields of type ContactReference
@@ -320,7 +322,7 @@ public static function deleteCustomValue() {
/**
* check the CMS username.
*/
- static public function checkUserName() {
+ public static function checkUserName() {
$signer = new CRM_Utils_Signer(CRM_Core_Key::privateKey(), ['for', 'ts']);
$sig = CRM_Utils_Request::retrieve('sig', 'String');
$for = CRM_Utils_Request::retrieve('for', 'String');
@@ -530,7 +532,6 @@ public static function getContactPhone() {
CRM_Utils_System::civiExit();
}
-
public static function buildSubTypes() {
$parent = CRM_Utils_Request::retrieve('parentId', 'Positive');
@@ -662,7 +663,7 @@ public static function getDedupes() {
$whereClause = $orderByClause = '';
$cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, json_decode($criteria, TRUE));
- $searchRows = [];
+ $searchRows = [];
$searchParams = self::getSearchOptionsFromRequest();
$queryParams = [];
@@ -695,11 +696,11 @@ public static function getDedupes() {
}
if ($isOrQuery) {
- $whereClause = ' ( ' . implode(' OR ', $where) . ' ) ';
+ $whereClause = ' ( ' . implode(' OR ', $where) . ' ) ';
}
else {
if (!empty($where)) {
- $whereClause = implode(' AND ', $where);
+ $whereClause = implode(' AND ', $where);
}
}
$whereClause .= $whereClause ? ' AND de.id IS NULL' : ' de.id IS NULL';
@@ -819,13 +820,13 @@ public static function getDedupes() {
if (!empty($pairInfo['data']['canMerge'])) {
$mergeParams = [
'reset' => 1,
- 'cid' => $pairInfo['entity_id1'],
- 'oid' => $pairInfo['entity_id2'],
- 'action' => 'update',
- 'rgid' => $rgid,
- 'criteria' => $criteria,
- 'limit' => CRM_Utils_Request::retrieve('limit', 'Integer'),
- ];
+ 'cid' => $pairInfo['entity_id1'],
+ 'oid' => $pairInfo['entity_id2'],
+ 'action' => 'update',
+ 'rgid' => $rgid,
+ 'criteria' => $criteria,
+ 'limit' => CRM_Utils_Request::retrieve('limit', 'Integer'),
+ ];
if ($gid) {
$mergeParams['gid'] = $gid;
}
@@ -1026,7 +1027,8 @@ public static function toggleDedupeSelect() {
$params = [
1 => [$isSelected, 'Boolean'],
- 3 => ["$cacheKeyString%", 'String'], // using % to address rows with conflicts as well
+ // using % to address rows with conflicts as well
+ 3 => ["$cacheKeyString%", 'String'],
];
//check pnid is_array or integer
diff --git a/CRM/Contact/Page/CustomSearch.php b/CRM/Contact/Page/CustomSearch.php
index e1f4749c25a1..15b313f23182 100644
--- a/CRM/Contact/Page/CustomSearch.php
+++ b/CRM/Contact/Page/CustomSearch.php
@@ -41,7 +41,7 @@ class CRM_Contact_Page_CustomSearch extends CRM_Core_Page {
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* @return array
diff --git a/CRM/Contact/Page/DedupeException.php b/CRM/Contact/Page/DedupeException.php
index ea612da89163..cb73cb3c2039 100644
--- a/CRM/Contact/Page/DedupeException.php
+++ b/CRM/Contact/Page/DedupeException.php
@@ -35,6 +35,7 @@
* Main page for viewing contact.
*/
class CRM_Contact_Page_DedupeException extends CRM_Core_Page {
+
/**
* the main function that is called when the page loads,
* it decides the which action has to be taken for the page.
diff --git a/CRM/Contact/Page/DedupeMerge.php b/CRM/Contact/Page/DedupeMerge.php
index 45064446bba5..1dddf5619470 100644
--- a/CRM/Contact/Page/DedupeMerge.php
+++ b/CRM/Contact/Page/DedupeMerge.php
@@ -86,7 +86,7 @@ public static function getRunner() {
$where = NULL;
$onlyProcessSelected = ($action == CRM_Core_Action::MAP) ? 1 : 0;
- $total = CRM_Core_BAO_PrevNextCache::getCount($cacheKeyString, NULL, ($onlyProcessSelected ? "pn.is_selected = 1" : NULL));
+ $total = CRM_Core_BAO_PrevNextCache::getCount($cacheKeyString, NULL, ($onlyProcessSelected ? "pn.is_selected = 1" : NULL));
if ($total <= 0) {
// Nothing to do.
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlQry));
@@ -96,7 +96,7 @@ public static function getRunner() {
CRM_Dedupe_Merger::resetMergeStats($cacheKeyString);
for ($i = 1; $i <= ceil($total / self::BATCHLIMIT); $i++) {
- $task = new CRM_Queue_Task(
+ $task = new CRM_Queue_Task(
['CRM_Contact_Page_DedupeMerge', 'callBatchMerge'],
[$rgid, $gid, $mode, self::BATCHLIMIT, $onlyProcessSelected, $criteria],
"Processed " . $i * self::BATCHLIMIT . " pair of duplicates out of " . $total
diff --git a/CRM/Contact/Page/DedupeRules.php b/CRM/Contact/Page/DedupeRules.php
index 73573cd38431..aa5fcfb11739 100644
--- a/CRM/Contact/Page/DedupeRules.php
+++ b/CRM/Contact/Page/DedupeRules.php
@@ -37,7 +37,7 @@ class CRM_Contact_Page_DedupeRules extends CRM_Core_Page_Basic {
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* Get BAO Name.
diff --git a/CRM/Contact/Page/SavedSearch.php b/CRM/Contact/Page/SavedSearch.php
index 128b22239ef8..a101e86283ba 100644
--- a/CRM/Contact/Page/SavedSearch.php
+++ b/CRM/Contact/Page/SavedSearch.php
@@ -41,7 +41,7 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page {
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* Delete a saved search.
diff --git a/CRM/Contact/Page/View.php b/CRM/Contact/Page/View.php
index ca01608a908c..8f7a78f214a5 100644
--- a/CRM/Contact/Page/View.php
+++ b/CRM/Contact/Page/View.php
@@ -39,28 +39,28 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
/**
* The id of the object being viewed (note/relationship etc)
*
- * @int
+ * @var int
*/
protected $_id;
/**
* The contact id of the contact being viewed
*
- * @int
+ * @var int
*/
protected $_contactId;
/**
* The action that we are performing
*
- * @string
+ * @var string
*/
protected $_action;
/**
* The permission we have on this contact
*
- * @string
+ * @var string
*/
protected $_permission;
@@ -332,9 +332,9 @@ public static function setTitle($contactId, $isDeleted = FALSE) {
$mergedToContactID = $mergedTo['id'];
$mergedToDisplayName = $mergedTo['values'][$mergedToContactID]['api.Contact.get']['values'][0]['display_name'];
$title .= ' ' . ts('(This contact has been merged to
%2)', [
- 1 => CRM_Utils_System::url('civicrm/contact/view', ['reset' => 1, 'cid' => $mergedToContactID]),
- 2 => $mergedToDisplayName,
- ]);
+ 1 => CRM_Utils_System::url('civicrm/contact/view', ['reset' => 1, 'cid' => $mergedToContactID]),
+ 2 => $mergedToDisplayName,
+ ]);
}
}
diff --git a/CRM/Contact/Page/View/CustomData.php b/CRM/Contact/Page/View/CustomData.php
index 37983dab9619..73d975338209 100644
--- a/CRM/Contact/Page/View/CustomData.php
+++ b/CRM/Contact/Page/View/CustomData.php
@@ -39,7 +39,7 @@ class CRM_Contact_Page_View_CustomData extends CRM_Core_Page {
/**
* The id of the object being viewed (note/relationship etc).
*
- * @int
+ * @var int
*/
public $_groupId;
diff --git a/CRM/Contact/Page/View/Note.php b/CRM/Contact/Page/View/Note.php
index e118762fd8ab..2930341be709 100644
--- a/CRM/Contact/Page/View/Note.php
+++ b/CRM/Contact/Page/View/Note.php
@@ -41,14 +41,14 @@ class CRM_Contact_Page_View_Note extends CRM_Core_Page {
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* The action links for comments that we need to display for the browse screen
*
* @var array
*/
- static $_commentLinks = NULL;
+ public static $_commentLinks = NULL;
/**
* View details of a note.
diff --git a/CRM/Contact/Page/View/Relationship.php b/CRM/Contact/Page/View/Relationship.php
index 12239acc3c72..8e7006369a4a 100644
--- a/CRM/Contact/Page/View/Relationship.php
+++ b/CRM/Contact/Page/View/Relationship.php
@@ -37,7 +37,7 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* Casid set if called from case context.
diff --git a/CRM/Contact/Page/View/Summary.php b/CRM/Contact/Page/View/Summary.php
index f91a87480b61..39594e4073dd 100644
--- a/CRM/Contact/Page/View/Summary.php
+++ b/CRM/Contact/Page/View/Summary.php
@@ -316,7 +316,7 @@ public static function basicTabs() {
'url' => '#contact-summary',
'title' => ts('Summary'),
'weight' => 0,
- 'icon' => 'crm-i fa-address-card-o'
+ 'icon' => 'crm-i fa-address-card-o',
],
[
'id' => 'activity',
diff --git a/CRM/Contact/Page/View/UserDashBoard.php b/CRM/Contact/Page/View/UserDashBoard.php
index af3e6e0d6bd5..c3eb11af2d49 100644
--- a/CRM/Contact/Page/View/UserDashBoard.php
+++ b/CRM/Contact/Page/View/UserDashBoard.php
@@ -50,7 +50,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* @throws Exception
diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php
index 385958764e9e..a560a9adf32b 100644
--- a/CRM/Contact/Selector.php
+++ b/CRM/Contact/Selector.php
@@ -45,20 +45,20 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
*/
- static $_columnHeaders;
+ public static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
*/
- static $_properties = [
+ public static $_properties = [
'contact_id',
'contact_type',
'contact_sub_type',
diff --git a/CRM/Contact/Selector/Controller.php b/CRM/Contact/Selector/Controller.php
index 12f64b2dc8b5..27dc70f75327 100644
--- a/CRM/Contact/Selector/Controller.php
+++ b/CRM/Contact/Selector/Controller.php
@@ -31,6 +31,7 @@
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Contact_Selector_Controller extends CRM_Core_Selector_Controller {
+
/**
* Default function for qill.
*
diff --git a/CRM/Contact/Selector/Custom.php b/CRM/Contact/Selector/Custom.php
index fa9d7ac463e5..109246f5ceb6 100644
--- a/CRM/Contact/Selector/Custom.php
+++ b/CRM/Contact/Selector/Custom.php
@@ -44,20 +44,20 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
*/
- static $_columnHeaders;
+ public static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
*/
- static $_properties = ['contact_id', 'contact_type', 'display_name'];
+ public static $_properties = ['contact_id', 'contact_type', 'display_name'];
/**
* FormValues is the array returned by exportValues called on
@@ -92,6 +92,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
/**
* The object that implements the search interface
+ * @var object
*/
protected $_search;
diff --git a/CRM/Contact/Task.php b/CRM/Contact/Task.php
index 03257dc91ff6..97c62e6b17bc 100644
--- a/CRM/Contact/Task.php
+++ b/CRM/Contact/Task.php
@@ -36,8 +36,10 @@
*/
class CRM_Contact_Task extends CRM_Core_Task {
+ /**
+ * Contact tasks
+ */
const
- // Contact tasks
HOUSEHOLD_CONTACTS = 101,
ORGANIZATION_CONTACTS = 102,
RECORD_CONTACTS = 103,
@@ -50,7 +52,10 @@ class CRM_Contact_Task extends CRM_Core_Task {
INDIVIDUAL_CONTACTS = 110,
ADD_TO_CASE = 111;
- static $objectType = 'contact';
+ /**
+ * @var string
+ */
+ public static $objectType = 'contact';
public static function tasks() {
if (!self::$_tasks) {
@@ -300,7 +305,7 @@ public static function permissionedTaskTitles($permission, $params = array()) {
foreach ([
self::MAP_CONTACTS,
self::CREATE_MAILING,
- self::TASK_SMS
+ self::TASK_SMS,
] as $task) {
if (isset(self::$_tasks[$task]) &&
!empty(self::$_tasks[$task]['title'])
diff --git a/CRM/Upgrade/Incremental/Base.php b/CRM/Upgrade/Incremental/Base.php
index a044dacf06c8..1ee17e37e856 100644
--- a/CRM/Upgrade/Incremental/Base.php
+++ b/CRM/Upgrade/Incremental/Base.php
@@ -149,6 +149,7 @@ public static function checkFKExists($table_name, $constraint_name) {
* @param string $column
* @param string $properties
* @param bool $localizable is this a field that should be localized
+ * @param string|NULL $version CiviCRM version to use if rebuilding multilingual schema
* @return bool
*/
public static function addColumn($ctx, $table, $column, $properties, $localizable = FALSE, $version = NULL) {
@@ -257,6 +258,7 @@ public static function dropIndex($ctx, $table, $indexName) {
/**
* Rebuild Multilingual Schema.
* @param CRM_Queue_TaskContext $ctx
+ * @param string|NULL $version CiviCRM version to use if rebuilding multilingual schema
* @return bool
*/
public static function rebuildMultilingalSchema($ctx, $version = NULL) {
diff --git a/settings/Developer.setting.php b/settings/Developer.setting.php
index 8f4f543eab5e..4ab27dd90a50 100644
--- a/settings/Developer.setting.php
+++ b/settings/Developer.setting.php
@@ -76,7 +76,8 @@
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'debug_enabled',
- 'config_key' => 'debug', // we can't call the setting debug as that has other meanings in api
+ // we can't call the setting debug as that has other meanings in api
+ 'config_key' => 'debug',
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => '0',