From 518fa0ee1556723e8e67e02a59e8e7f51ed76f6b Mon Sep 17 00:00:00 2001
From: Seamus Lee ";
- 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'] . " ";
- return;
+ return FALSE;
}
$transaction = new CRM_Core_Transaction();
diff --git a/CRM/Core/Payment/ProcessorForm.php b/CRM/Core/Payment/ProcessorForm.php
index 55ec6ffff4..6afebf6e53 100644
--- a/CRM/Core/Payment/ProcessorForm.php
+++ b/CRM/Core/Payment/ProcessorForm.php
@@ -26,6 +26,7 @@
*/
use Civi\Payment\System;
+
/**
*
* @package CRM
diff --git a/CRM/Core/Payment/eWAY.php b/CRM/Core/Payment/eWAY.php
index 4975956980..68992819af 100644
--- a/CRM/Core/Payment/eWAY.php
+++ b/CRM/Core/Payment/eWAY.php
@@ -410,6 +410,7 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
return $params;
}
+
// end function doDirectPayment
/**
diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php
index 5a3f0eff7a..d1ed8ea055 100644
--- a/CRM/Core/Permission.php
+++ b/CRM/Core/Permission.php
@@ -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'] = [
diff --git a/CRM/Core/Permission/Backdrop.php b/CRM/Core/Permission/Backdrop.php
index 9d4507c5a3..e2277df2f1 100644
--- a/CRM/Core/Permission/Backdrop.php
+++ b/CRM/Core/Permission/Backdrop.php
@@ -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 [];
}
diff --git a/CRM/Core/Permission/Base.php b/CRM/Core/Permission/Base.php
index c14e63e3ae..d598e15cb3 100644
--- a/CRM/Core/Permission/Base.php
+++ b/CRM/Core/Permission/Base.php
@@ -38,7 +38,10 @@
*/
class CRM_Core_Permission_Base {
- // permission mapping to stub check() calls
+ /**
+ * permission mapping to stub check() calls
+ * @var array
+ */
public $permissions = NULL;
/**
diff --git a/CRM/Core/Permission/Drupal.php b/CRM/Core/Permission/Drupal.php
index 4f67b6ce38..9c0bbdee78 100644
--- a/CRM/Core/Permission/Drupal.php
+++ b/CRM/Core/Permission/Drupal.php
@@ -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
*
diff --git a/CRM/Core/Permission/Drupal8.php b/CRM/Core/Permission/Drupal8.php
index 2b728bc477..dc2e4df215 100644
--- a/CRM/Core/Permission/Drupal8.php
+++ b/CRM/Core/Permission/Drupal8.php
@@ -37,6 +37,7 @@
*
*/
class CRM_Core_Permission_Drupal8 extends CRM_Core_Permission_DrupalBase {
+
/**
* Given a permission string, check for access requirements
*
diff --git a/CRM/Core/Permission/Joomla.php b/CRM/Core/Permission/Joomla.php
index 2eea7228a8..97c7a054c2 100644
--- a/CRM/Core/Permission/Joomla.php
+++ b/CRM/Core/Permission/Joomla.php
@@ -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();
}
diff --git a/CRM/Core/Permission/Temp.php b/CRM/Core/Permission/Temp.php
index 18740068a9..145e820832 100644
--- a/CRM/Core/Permission/Temp.php
+++ b/CRM/Core/Permission/Temp.php
@@ -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))
diff --git a/CRM/Core/Permission/UnitTests.php b/CRM/Core/Permission/UnitTests.php
index 66e5ad7e1e..0dccf48cdf 100644
--- a/CRM/Core/Permission/UnitTests.php
+++ b/CRM/Core/Permission/UnitTests.php
@@ -38,7 +38,10 @@
*/
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;
/**
diff --git a/CRM/Core/Permission/WordPress.php b/CRM/Core/Permission/WordPress.php
index dc5224f7f9..b58b059eb5 100644
--- a/CRM/Core/Permission/WordPress.php
+++ b/CRM/Core/Permission/WordPress.php
@@ -37,6 +37,7 @@
*
*/
class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base {
+
/**
* Given a permission string, check for access requirements
*
diff --git a/CRM/Core/PrevNextCache/Sql.php b/CRM/Core/PrevNextCache/Sql.php
index 51f767bee0..10fed3637e 100644
--- a/CRM/Core/PrevNextCache/Sql.php
+++ b/CRM/Core/PrevNextCache/Sql.php
@@ -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) {
diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php
index 96f9bba423..0af4bd1e10 100644
--- a/CRM/Core/PseudoConstant.php
+++ b/CRM/Core/PseudoConstant.php
@@ -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 = '';
diff --git a/CRM/Core/QuickForm/Action/Display.php b/CRM/Core/QuickForm/Action/Display.php
index 9118e2f2f3..53d012ae95 100644
--- a/CRM/Core/QuickForm/Action/Display.php
+++ b/CRM/Core/QuickForm/Action/Display.php
@@ -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.
diff --git a/CRM/Core/QuickForm/Action/Upload.php b/CRM/Core/QuickForm/Action/Upload.php
index b684036a19..7f282ff36c 100644
--- a/CRM/Core/QuickForm/Action/Upload.php
+++ b/CRM/Core/QuickForm/Action/Upload.php
@@ -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]);
diff --git a/CRM/Core/QuickForm/GroupMultiSelect.php b/CRM/Core/QuickForm/GroupMultiSelect.php
index 051ccda217..35a959ad94 100644
--- a/CRM/Core/QuickForm/GroupMultiSelect.php
+++ b/CRM/Core/QuickForm/GroupMultiSelect.php
@@ -34,6 +34,7 @@
*
*/
class CRM_Core_QuickForm_GroupMultiSelect extends CRM_Core_QuickForm_NestedAdvMultiSelect {
+
/**
* Returns the HTML generated for the advanced multiple select component.
*
diff --git a/CRM/Core/QuickForm/NestedAdvMultiSelect.php b/CRM/Core/QuickForm/NestedAdvMultiSelect.php
index 84a787a1c6..791ef9ef24 100644
--- a/CRM/Core/QuickForm/NestedAdvMultiSelect.php
+++ b/CRM/Core/QuickForm/NestedAdvMultiSelect.php
@@ -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.
*
diff --git a/CRM/Core/Reference/Interface.php b/CRM/Core/Reference/Interface.php
index 09e0a0ba6d..f1bcaff6d2 100644
--- a/CRM/Core/Reference/Interface.php
+++ b/CRM/Core/Reference/Interface.php
@@ -4,6 +4,7 @@
* Interface CRM_Core_Reference_Interface
*/
interface CRM_Core_Reference_Interface {
+
public function getReferenceTable();
public function getReferenceKey();
diff --git a/CRM/Core/Region.php b/CRM/Core/Region.php
index 6ea85bc07a..a9f9e13b71 100644
--- a/CRM/Core/Region.php
+++ b/CRM/Core/Region.php
@@ -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
diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php
index c65d0330eb..014750ece7 100644
--- a/CRM/Core/Resources.php
+++ b/CRM/Core/Resources.php
@@ -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) {
diff --git a/CRM/Core/Resources/Strings.php b/CRM/Core/Resources/Strings.php
index 4f1315c468..451d02dda2 100644
--- a/CRM/Core/Resources/Strings.php
+++ b/CRM/Core/Resources/Strings.php
@@ -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 = [];
}
diff --git a/CRM/Core/ScheduledJob.php b/CRM/Core/ScheduledJob.php
index eb2be0bf13..87ec71d94f 100644
--- a/CRM/Core/ScheduledJob.php
+++ b/CRM/Core/ScheduledJob.php
@@ -36,13 +36,13 @@
*/
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
diff --git a/CRM/Core/SelectValues.php b/CRM/Core/SelectValues.php
index 87dd9c37eb..18af287821 100644
--- a/CRM/Core/SelectValues.php
+++ b/CRM/Core/SelectValues.php
@@ -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.
*
diff --git a/CRM/Core/Selector/Controller.php b/CRM/Core/Selector/Controller.php
index 30a9225b9b..a64a7eabeb 100644
--- a/CRM/Core/Selector/Controller.php
+++ b/CRM/Core/Selector/Controller.php
@@ -104,6 +104,7 @@ class CRM_Core_Selector_Controller {
/**
* The objectAction for the WebObject
+ * @var int
*/
protected $_action;
diff --git a/CRM/Core/Session.php b/CRM/Core/Session.php
index c9d10d2b3a..8aa67bf9ca 100644
--- a/CRM/Core/Session.php
+++ b/CRM/Core/Session.php
@@ -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
diff --git a/CRM/Core/ShowHideBlocks.php b/CRM/Core/ShowHideBlocks.php
index ba2edef206..ca66329ca8 100644
--- a/CRM/Core/ShowHideBlocks.php
+++ b/CRM/Core/ShowHideBlocks.php
@@ -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.
diff --git a/CRM/Core/Smarty/Permissions.php b/CRM/Core/Smarty/Permissions.php
index 9e2f35b006..47229be394 100644
--- a/CRM/Core/Smarty/Permissions.php
+++ b/CRM/Core/Smarty/Permissions.php
@@ -4,6 +4,7 @@
* Class CRM_Core_Smarty_Permissions
*/
class CRM_Core_Smarty_Permissions {
+
/**
* non-static adapter for CRM_Core_Permission::check
* @param $offset
diff --git a/CRM/Core/Smarty/plugins/function.crmAPI.php b/CRM/Core/Smarty/plugins/function.crmAPI.php
index 7c4db31393..38fd038928 100644
--- a/CRM/Core/Smarty/plugins/function.crmAPI.php
+++ b/CRM/Core/Smarty/plugins/function.crmAPI.php
@@ -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'])) {
diff --git a/CRM/Core/Smarty/plugins/function.crmKey.php b/CRM/Core/Smarty/plugins/function.crmKey.php
index a9ed3f2c80..72bb841749 100644
--- a/CRM/Core/Smarty/plugins/function.crmKey.php
+++ b/CRM/Core/Smarty/plugins/function.crmKey.php
@@ -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)
);
diff --git a/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php b/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php
index b45e5f85f7..cb3ecf363a 100644
--- a/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php
+++ b/CRM/Core/Smarty/plugins/function.simpleActivityContacts.php
@@ -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);
}
diff --git a/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php b/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php
index 88bb6382c0..c9c35ec466 100644
--- a/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php
+++ b/CRM/Core/Smarty/plugins/prefilter.resetExtScope.php
@@ -8,8 +8,7 @@
* @return string
*/
function smarty_prefilter_resetExtScope($tpl_source, &$smarty) {
- return
- '{crmScope extensionKey=""}'
+ return '{crmScope extensionKey=""}'
. $tpl_source
. '{/crmScope}';
}
diff --git a/CRM/Core/Smarty/resources/String.php b/CRM/Core/Smarty/resources/String.php
index 0ac2ad8dca..11241937d4 100644
--- a/CRM/Core/Smarty/resources/String.php
+++ b/CRM/Core/Smarty/resources/String.php
@@ -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',
+ ]);
}
diff --git a/CRM/Core/TableHierarchy.php b/CRM/Core/TableHierarchy.php
index 05037234e0..49a0955554 100644
--- a/CRM/Core/TableHierarchy.php
+++ b/CRM/Core/TableHierarchy.php
@@ -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',
diff --git a/CRM/Core/Task.php b/CRM/Core/Task.php
index 1ecace6833..96724ea89f 100644
--- a/CRM/Core/Task.php
+++ b/CRM/Core/Task.php
@@ -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.
diff --git a/CRM/Core/TemporaryErrorScope.php b/CRM/Core/TemporaryErrorScope.php
index 0aefdbf63d..d8853b8ef8 100644
--- a/CRM/Core/TemporaryErrorScope.php
+++ b/CRM/Core/TemporaryErrorScope.php
@@ -22,7 +22,7 @@
* safe to temporarily switch to exception
*/
class CRM_Core_TemporaryErrorScope {
- static $oldFrames;
+ public static $oldFrames;
/**
* @return CRM_Core_TemporaryErrorScope
diff --git a/CRM/Core/Transaction.php b/CRM/Core/Transaction.php
index a61fbf4611..e23e9f4315 100644
--- a/CRM/Core/Transaction.php
+++ b/CRM/Core/Transaction.php
@@ -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);
}
diff --git a/CRM/Custom/Form/ChangeFieldType.php b/CRM/Custom/Form/ChangeFieldType.php
index 89aa390a18..7e89f12382 100644
--- a/CRM/Custom/Form/ChangeFieldType.php
+++ b/CRM/Custom/Form/ChangeFieldType.php
@@ -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']);
}
diff --git a/CRM/Custom/Form/DeleteField.php b/CRM/Custom/Form/DeleteField.php
index f196a29b9f..364f44fe9d 100644
--- a/CRM/Custom/Form/DeleteField.php
+++ b/CRM/Custom/Form/DeleteField.php
@@ -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'),
+ ],
+ ]);
}
/**
diff --git a/CRM/Custom/Form/DeleteGroup.php b/CRM/Custom/Form/DeleteGroup.php
index 4c6af1a9a4..fa7f356c0f 100644
--- a/CRM/Custom/Form/DeleteGroup.php
+++ b/CRM/Custom/Form/DeleteGroup.php
@@ -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'),
+ ],
+ ]);
}
/**
diff --git a/CRM/Custom/Form/Field.php b/CRM/Custom/Form/Field.php
index f9e25de480..14d407950a 100644
--- a/CRM/Custom/Form/Field.php
+++ b/CRM/Custom/Form/Field.php
@@ -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'],
diff --git a/CRM/Custom/Form/MoveField.php b/CRM/Custom/Form/MoveField.php
index d05af627a3..f52a549fc0 100644
--- a/CRM/Custom/Form/MoveField.php
+++ b/CRM/Custom/Form/MoveField.php
@@ -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);
}
diff --git a/CRM/Custom/Form/Option.php b/CRM/Custom/Form/Option.php
index 96d8a42058..34b02bd2bc 100644
--- a/CRM/Custom/Form/Option.php
+++ b/CRM/Custom/Form/Option.php
@@ -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) {
diff --git a/CRM/Custom/Form/Preview.php b/CRM/Custom/Form/Preview.php
index 4ad064eaf5..9f7c9e06a7 100644
--- a/CRM/Custom/Form/Preview.php
+++ b/CRM/Custom/Form/Preview.php
@@ -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,
+ ],
+ ]);
}
}
diff --git a/CRM/Custom/Import/Controller.php b/CRM/Custom/Import/Controller.php
index 375991f3f7..c67e399031 100644
--- a/CRM/Custom/Import/Controller.php
+++ b/CRM/Custom/Import/Controller.php
@@ -4,6 +4,7 @@
* Class CRM_Custom_Import_Controller
*/
class CRM_Custom_Import_Controller extends CRM_Core_Controller {
+
/**
* Class constructor.
*
diff --git a/CRM/Custom/Import/Form/Summary.php b/CRM/Custom/Import/Form/Summary.php
index 228465fa21..716e59f1f9 100644
--- a/CRM/Custom/Import/Form/Summary.php
+++ b/CRM/Custom/Import/Form/Summary.php
@@ -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.
*
diff --git a/CRM/Custom/Import/Parser.php b/CRM/Custom/Import/Parser.php
index 7d8fb5e2ac..0832d00bac 100644
--- a/CRM/Custom/Import/Parser.php
+++ b/CRM/Custom/Import/Parser.php
@@ -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);
diff --git a/CRM/Custom/Import/Parser/Api.php b/CRM/Custom/Import/Parser/Api.php
index 13f0c2db89..ab60fa1d33 100644
--- a/CRM/Custom/Import/Parser/Api.php
+++ b/CRM/Custom/Import/Parser/Api.php
@@ -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);
}
/**
diff --git a/CRM/Dedupe/BAO/QueryBuilder.php b/CRM/Dedupe/BAO/QueryBuilder.php
index 3daff16951..1137be40c9 100644
--- a/CRM/Dedupe/BAO/QueryBuilder.php
+++ b/CRM/Dedupe/BAO/QueryBuilder.php
@@ -3,6 +3,7 @@
* Class CRM_Dedupe_BAO_QueryBuilder
*/
class CRM_Dedupe_BAO_QueryBuilder {
+
/**
* @param $rg
* @param string $strID1
diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php
index 5f9aa38dce..373866f7a8 100644
--- a/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php
+++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php
@@ -5,6 +5,7 @@
* Class CRM_Dedupe_BAO_QueryBuilder_IndividualGeneral
*/
class CRM_Dedupe_BAO_QueryBuilder_IndividualGeneral extends CRM_Dedupe_BAO_QueryBuilder {
+
/**
* @param $rg
*
diff --git a/CRM/Dedupe/BAO/Rule.php b/CRM/Dedupe/BAO/Rule.php
index 67ce966cb6..ed0cdb6bc0 100644
--- a/CRM/Dedupe/BAO/Rule.php
+++ b/CRM/Dedupe/BAO/Rule.php
@@ -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'";
diff --git a/CRM/Dedupe/BAO/RuleGroup.php b/CRM/Dedupe/BAO/RuleGroup.php
index f1bfd1478b..b6dab2843a 100644
--- a/CRM/Dedupe/BAO/RuleGroup.php
+++ b/CRM/Dedupe/BAO/RuleGroup.php
@@ -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.
*
diff --git a/CRM/Dedupe/Finder.php b/CRM/Dedupe/Finder.php
index 4926760db0..7b6c936e72 100644
--- a/CRM/Dedupe/Finder.php
+++ b/CRM/Dedupe/Finder.php
@@ -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
diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php
index 3cab5581bb..ceea27b4e8 100644
--- a/CRM/Dedupe/Merger.php
+++ b/CRM/Dedupe/Merger.php
@@ -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 = ' ' . ts('One contact merged.', [
- 'count' => $stats['merged'],
- 'plural' => '%count contacts merged.',
- ]) . '
') {
+ public static function getMessages(&$error, $separator = '
') {
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 {
diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php
index df614d75e9..b396667fe7 100644
--- a/CRM/Core/Form.php
+++ b/CRM/Core/Form.php
@@ -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);
}
diff --git a/CRM/Core/Form/Date.php b/CRM/Core/Form/Date.php
index 354762f65b..046f0f8803 100644
--- a/CRM/Core/Form/Date.php
+++ b/CRM/Core/Form/Date.php
@@ -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.
*
diff --git a/CRM/Core/Form/EntityFormTrait.php b/CRM/Core/Form/EntityFormTrait.php
index 96a15fdcd8..38f2548208 100644
--- a/CRM/Core/Form/EntityFormTrait.php
+++ b/CRM/Core/Form/EntityFormTrait.php
@@ -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);
diff --git a/CRM/Core/Form/RecurringEntity.php b/CRM/Core/Form/RecurringEntity.php
index 97f7bfaf13..85f53b22e2 100644
--- a/CRM/Core/Form/RecurringEntity.php
+++ b/CRM/Core/Form/RecurringEntity.php
@@ -38,36 +38,43 @@
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()),
diff --git a/CRM/Core/Form/Renderer.php b/CRM/Core/Form/Renderer.php
index 201c266f07..0809b46099 100644
--- a/CRM/Core/Form/Renderer.php
+++ b/CRM/Core/Form/Renderer.php
@@ -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),
+ ]));
}
}
}
diff --git a/CRM/Core/Form/Search.php b/CRM/Core/Form/Search.php
index 836ed37eec..cb5839bf87 100644
--- a/CRM/Core/Form/Search.php
+++ b/CRM/Core/Form/Search.php
@@ -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
diff --git a/CRM/Core/Form/ShortCode.php b/CRM/Core/Form/ShortCode.php
index 8d5d2b1ad1..7d77c4c0fb 100644
--- a/CRM/Core/Form/ShortCode.php
+++ b/CRM/Core/Form/ShortCode.php
@@ -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.
*/
diff --git a/CRM/Core/Form/Task.php b/CRM/Core/Form/Task.php
index c79fcf5321..d9279d2000 100644
--- a/CRM/Core/Form/Task.php
+++ b/CRM/Core/Form/Task.php
@@ -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'),
+ ],
+ ]);
}
/**
diff --git a/CRM/Core/Form/Task/Batch.php b/CRM/Core/Form/Task/Batch.php
index 76d1b85756..9e56fe9292 100644
--- a/CRM/Core/Form/Task/Batch.php
+++ b/CRM/Core/Form/Task/Batch.php
@@ -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.
diff --git a/CRM/Core/Form/Task/PDFLetterCommon.php b/CRM/Core/Form/Task/PDFLetterCommon.php
index 5fd95efa67..171d5c7846 100644
--- a/CRM/Core/Form/Task/PDFLetterCommon.php
+++ b/CRM/Core/Form/Task/PDFLetterCommon.php
@@ -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)'));
diff --git a/CRM/Core/Form/Task/PickProfile.php b/CRM/Core/Form/Task/PickProfile.php
index 4043833a55..926fdf3097 100644
--- a/CRM/Core/Form/Task/PickProfile.php
+++ b/CRM/Core/Form/Task/PickProfile.php
@@ -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.
diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php
index 425565de5b..217aec7397 100644
--- a/CRM/Core/I18n.php
+++ b/CRM/Core/I18n.php
@@ -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.
*
diff --git a/CRM/Core/I18n/Form.php b/CRM/Core/I18n/Form.php
index 8433616cdd..bc8b776af1 100644
--- a/CRM/Core/I18n/Form.php
+++ b/CRM/Core/I18n/Form.php
@@ -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();
diff --git a/CRM/Core/I18n/NativeGettext.php b/CRM/Core/I18n/NativeGettext.php
index 721b37c1b8..cec8fbfa6e 100644
--- a/CRM/Core/I18n/NativeGettext.php
+++ b/CRM/Core/I18n/NativeGettext.php
@@ -34,6 +34,7 @@
* Convenience class for PHP-Gettext compatibility.
*/
class CRM_Core_I18n_NativeGettext {
+
/**
* @param $string
*
diff --git a/CRM/Core/I18n/SchemaStructure.php b/CRM/Core/I18n/SchemaStructure.php
index 5bc0a76f01..e2468d6e6a 100644
--- a/CRM/Core/I18n/SchemaStructure.php
+++ b/CRM/Core/I18n/SchemaStructure.php
@@ -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' => [
diff --git a/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php b/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php
index 2450e0f277..cfb456f973 100644
--- a/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php
+++ b/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php
@@ -33,6 +33,7 @@
*
*/
class CRM_Core_I18n_SchemaStructure_4_2_alpha1 {
+
/**
* @return array
*/
diff --git a/CRM/Core/I18n/SchemaStructure_4_3_1.php b/CRM/Core/I18n/SchemaStructure_4_3_1.php
index 6078d089ed..69f038d049 100644
--- a/CRM/Core/I18n/SchemaStructure_4_3_1.php
+++ b/CRM/Core/I18n/SchemaStructure_4_3_1.php
@@ -33,6 +33,7 @@
*
*/
class CRM_Core_I18n_SchemaStructure_4_3_1 {
+
/**
* @return array
*/
diff --git a/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php b/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php
index 0ecc107866..c5cb4f4431 100644
--- a/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php
+++ b/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php
@@ -34,6 +34,7 @@
* DO NOT EDIT. Generated by CRM_Core_CodeGen
*/
class CRM_Core_I18n_SchemaStructure_4_5_alpha1 {
+
/**
* @return array
*/
diff --git a/CRM/Core/IDS.php b/CRM/Core/IDS.php
index 648b680d22..92af8f69c2 100644
--- a/CRM/Core/IDS.php
+++ b/CRM/Core/IDS.php
@@ -34,6 +34,7 @@ class CRM_Core_IDS {
/**
* Define the threshold for the ids reactions.
+ * @var array
*/
private $threshold = [
'log' => 25,
diff --git a/CRM/Core/InnoDBIndexer.php b/CRM/Core/InnoDBIndexer.php
index 123792a656..bdf45c9885 100644
--- a/CRM/Core/InnoDBIndexer.php
+++ b/CRM/Core/InnoDBIndexer.php
@@ -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));
diff --git a/CRM/Core/Invoke.php b/CRM/Core/Invoke.php
index 15ff125b0b..9a9e04a932 100644
--- a/CRM/Core/Invoke.php
+++ b/CRM/Core/Invoke.php
@@ -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);
diff --git a/CRM/Core/JobManager.php b/CRM/Core/JobManager.php
index 5d269cf24a..d583a1c951 100644
--- a/CRM/Core/JobManager.php
+++ b/CRM/Core/JobManager.php
@@ -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.
diff --git a/CRM/Core/Key.php b/CRM/Core/Key.php
index fb8c6739f0..4424057911 100644
--- a/CRM/Core/Key.php
+++ b/CRM/Core/Key.php
@@ -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.
diff --git a/CRM/Core/LegacyErrorHandler.php b/CRM/Core/LegacyErrorHandler.php
index 837fbc34c4..ae0f1f9859 100644
--- a/CRM/Core/LegacyErrorHandler.php
+++ b/CRM/Core/LegacyErrorHandler.php
@@ -4,6 +4,7 @@
* Class CRM_Core_LegacyErrorHandler
*/
class CRM_Core_LegacyErrorHandler {
+
/**
* @param \Civi\Core\Event\UnhandledExceptionEvent $event
* @throws Exception
diff --git a/CRM/Core/Lock.php b/CRM/Core/Lock.php
index 789639506c..31077138e6 100644
--- a/CRM/Core/Lock.php
+++ b/CRM/Core/Lock.php
@@ -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;
diff --git a/CRM/Core/ManagedEntities.php b/CRM/Core/ManagedEntities.php
index f5ee0c38ca..a388328696 100644
--- a/CRM/Core/ManagedEntities.php
+++ b/CRM/Core/ManagedEntities.php
@@ -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);
diff --git a/CRM/Core/Menu.php b/CRM/Core/Menu.php
index 8ceccdd854..7964911204 100644
--- a/CRM/Core/Menu.php
+++ b/CRM/Core/Menu.php
@@ -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
),
);
}
diff --git a/CRM/Core/Module.php b/CRM/Core/Module.php
index eca6f6e38d..f3976d1c8c 100644
--- a/CRM/Core/Module.php
+++ b/CRM/Core/Module.php
@@ -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());
diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php
index 94368ec6a3..913f874d50 100644
--- a/CRM/Core/OptionGroup.php
+++ b/CRM/Core/OptionGroup.php
@@ -31,14 +31,15 @@
* @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]);
diff --git a/CRM/Core/OptionValue.php b/CRM/Core/OptionValue.php
index 7390deb4ce..ed649405cd 100644
--- a/CRM/Core/OptionValue.php
+++ b/CRM/Core/OptionValue.php
@@ -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
diff --git a/CRM/Core/Page/AJAX/Attachment.php b/CRM/Core/Page/AJAX/Attachment.php
index f06559285e..69b9c3c397 100644
--- a/CRM/Core/Page/AJAX/Attachment.php
+++ b/CRM/Core/Page/AJAX/Attachment.php
@@ -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)
diff --git a/CRM/Core/Page/AJAX/Location.php b/CRM/Core/Page/AJAX/Location.php
index 04066e4bd1..7a998fe2a5 100644
--- a/CRM/Core/Page/AJAX/Location.php
+++ b/CRM/Core/Page/AJAX/Location.php
@@ -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}]";
diff --git a/CRM/Core/Page/File.php b/CRM/Core/Page/File.php
index e3b12d2a92..362e3d1616 100644
--- a/CRM/Core/Page/File.php
+++ b/CRM/Core/Page/File.php
@@ -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\"");
diff --git a/CRM/Core/Page/Inline/Help.php b/CRM/Core/Page/Inline/Help.php
index ed2d57e68a..4920f1857f 100644
--- a/CRM/Core/Page/Inline/Help.php
+++ b/CRM/Core/Page/Inline/Help.php
@@ -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) {
diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php
index 1aaa4aa5f5..9399504e16 100644
--- a/CRM/Core/Payment.php
+++ b/CRM/Core/Payment.php
@@ -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;
diff --git a/CRM/Core/Payment/AuthorizeNet.php b/CRM/Core/Payment/AuthorizeNet.php
index 0d39e192ac..dbdcdcbcac 100644
--- a/CRM/Core/Payment/AuthorizeNet.php
+++ b/CRM/Core/Payment/AuthorizeNet.php
@@ -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();
}
diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php
index b68bd8cf2c..a6beaf1231 100644
--- a/CRM/Core/Payment/AuthorizeNetIPN.php
+++ b/CRM/Core/Payment/AuthorizeNetIPN.php
@@ -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',
]);
}
diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php
index e538c84ecd..35af834bd5 100644
--- a/CRM/Core/Payment/BaseIPN.php
+++ b/CRM/Core/Payment/BaseIPN.php
@@ -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'];
diff --git a/CRM/Core/Payment/FirstData.php b/CRM/Core/Payment/FirstData.php
index 38b0b2dc48..a123e8f85d 100644
--- a/CRM/Core/Payment/FirstData.php
+++ b/CRM/Core/Payment/FirstData.php
@@ -309,6 +309,7 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
return $params;
}
}
+
// end function doDirectPayment
/**
diff --git a/CRM/Core/Payment/Form.php b/CRM/Core/Payment/Form.php
index 09b39a2362..027904845b 100644
--- a/CRM/Core/Payment/Form.php
+++ b/CRM/Core/Payment/Form.php
@@ -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));
diff --git a/CRM/Core/Payment/PayJunction.php b/CRM/Core/Payment/PayJunction.php
index 0dcbecf453..42eeb94d4a 100644
--- a/CRM/Core/Payment/PayJunction.php
+++ b/CRM/Core/Payment/PayJunction.php
@@ -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
diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php
index 155fae1d57..cb68eff201 100644
--- a/CRM/Core/Payment/PayPalIPN.php
+++ b/CRM/Core/Payment/PayPalIPN.php
@@ -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;
}
diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php
index badb5e22eb..5b4a109802 100644
--- a/CRM/Core/Payment/PayPalImpl.php
+++ b/CRM/Core/Payment/PayPalImpl.php
@@ -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);
diff --git a/CRM/Core/Payment/PayPalProIPN.php b/CRM/Core/Payment/PayPalProIPN.php
index 4e0bcb46b0..d88f12de7d 100644
--- a/CRM/Core/Payment/PayPalProIPN.php
+++ b/CRM/Core/Payment/PayPalProIPN.php
@@ -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...
diff --git a/CRM/Core/Payment/PayflowPro.php b/CRM/Core/Payment/PayflowPro.php
index 46541a4b16..1d4b92c5e9 100644
--- a/CRM/Core/Payment/PayflowPro.php
+++ b/CRM/Core/Payment/PayflowPro.php
@@ -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
*
diff --git a/CRM/Core/Payment/PaymentExpressIPN.php b/CRM/Core/Payment/PaymentExpressIPN.php
index 8683a65f85..e3e5b0d1a0 100644
--- a/CRM/Core/Payment/PaymentExpressIPN.php
+++ b/CRM/Core/Payment/PaymentExpressIPN.php
@@ -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
' . ts('One contact was skipped.', [ - 'count' => $stats['skipped'], - 'plural' => '%count contacts were skipped.', - ]) . '
'; + 'count' => $stats['skipped'], + 'plural' => '%count contacts were skipped.', + ]) . ''; } 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); -- 2.25.1