From f33d2b8cdfb169605fd4d6cc9c32973bbfabf901 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 24 Jan 2020 16:17:30 -0800 Subject: [PATCH] (NFC) Civi/API - Update for Drupal.Commenting.VariableComment.IncorrectVarType --- Civi/API/Kernel.php | 2 +- Civi/API/Provider/AdhocProvider.php | 6 +++++- Civi/API/Provider/MagicFunctionProvider.php | 6 +++++- Civi/API/Provider/ReflectionProvider.php | 6 +++++- .../API/Subscriber/DynamicFKAuthorization.php | 20 ++++++++++++++----- Civi/API/Subscriber/TransactionSubscriber.php | 14 +++++++++---- Civi/API/Subscriber/WrapperAdapter.php | 2 +- 7 files changed, 42 insertions(+), 14 deletions(-) diff --git a/Civi/API/Kernel.php b/Civi/API/Kernel.php index 651b0861a4..c23658b952 100644 --- a/Civi/API/Kernel.php +++ b/Civi/API/Kernel.php @@ -28,7 +28,7 @@ class Kernel { protected $dispatcher; /** - * @var array + * @var \Civi\API\Provider\ProviderInterface[] */ protected $apiProviders; diff --git a/Civi/API/Provider/AdhocProvider.php b/Civi/API/Provider/AdhocProvider.php index aad4255c92..fcab72e182 100644 --- a/Civi/API/Provider/AdhocProvider.php +++ b/Civi/API/Provider/AdhocProvider.php @@ -37,7 +37,11 @@ class AdhocProvider implements EventSubscriberInterface, ProviderInterface { } /** - * @var array (string $name => array('perm' => string, 'callback' => callable)) + * List of adhoc actions + * + * array(string $ame => array('perm' => string, 'callback' => callable)) + * + * @var array */ protected $actions = []; diff --git a/Civi/API/Provider/MagicFunctionProvider.php b/Civi/API/Provider/MagicFunctionProvider.php index cdeaab339f..8fab3ff19c 100644 --- a/Civi/API/Provider/MagicFunctionProvider.php +++ b/Civi/API/Provider/MagicFunctionProvider.php @@ -32,7 +32,11 @@ class MagicFunctionProvider implements EventSubscriberInterface, ProviderInterfa } /** - * @var array (string $cachekey => array('function' => string, 'is_generic' => bool)) + * Local cache of function-mappings. + * + * array(string $cacheKey => array('function' => string, 'is_generic' => bool)) + * + * @var array */ private $cache; diff --git a/Civi/API/Provider/ReflectionProvider.php b/Civi/API/Provider/ReflectionProvider.php index 3d8e8eed72..514b846931 100644 --- a/Civi/API/Provider/ReflectionProvider.php +++ b/Civi/API/Provider/ReflectionProvider.php @@ -41,7 +41,11 @@ class ReflectionProvider implements EventSubscriberInterface, ProviderInterface private $apiKernel; /** - * @var array (string $entityName => array(string $actionName)) + * List of all entities and their supported actions + * + * array(string $entityName => string[] $actionNames). + * + * @var array */ private $actions; diff --git a/Civi/API/Subscriber/DynamicFKAuthorization.php b/Civi/API/Subscriber/DynamicFKAuthorization.php index 29374172ff..7747d0a628 100644 --- a/Civi/API/Subscriber/DynamicFKAuthorization.php +++ b/Civi/API/Subscriber/DynamicFKAuthorization.php @@ -50,17 +50,21 @@ class DynamicFKAuthorization implements EventSubscriberInterface { public $kernel; /** - * @var string, the entity for which we want to manage permissions + * The entity for which we want to manage permissions. + * + * @var string */ protected $entityName; /** - * @var array the actions for which we want to manage permissions + * The actions for which we want to manage permissions + * + * @var string[] */ protected $actions; /** - * @var string, SQL. Given a file ID, determine the entity+table it's attached to. + * SQL SELECT query - Given a file ID, determine the entity+table it's attached to. * * ex: "SELECT if(cf.id,1,0) as is_valid, cef.entity_table, cef.entity_id * FROM civicrm_file cf @@ -72,14 +76,18 @@ class DynamicFKAuthorization implements EventSubscriberInterface { * - is_valid: "1" if %1 identifies an actual record; otherwise "0" * - entity_table: NULL or the name of a related table * - entity_id: NULL or the ID of a row in the related table + * + * @var string */ protected $lookupDelegateSql; /** - * @var string, SQL. Get a list of (field_name, table_name, extends) tuples. + * SQL SELECT query. Get a list of (field_name, table_name, extends) tuples. * * For example, one tuple might be ("custom_123", "civicrm_value_mygroup_4", * "Activity"). + * + * @var string */ protected $lookupCustomFieldSql; @@ -91,7 +99,9 @@ class DynamicFKAuthorization implements EventSubscriberInterface { protected $lookupCustomFieldCache; /** - * @var array list of related tables for which FKs are allowed + * List of related tables for which FKs are allowed. + * + * @var array */ protected $allowedDelegates; diff --git a/Civi/API/Subscriber/TransactionSubscriber.php b/Civi/API/Subscriber/TransactionSubscriber.php index 5680beec22..8e7ff6a31b 100644 --- a/Civi/API/Subscriber/TransactionSubscriber.php +++ b/Civi/API/Subscriber/TransactionSubscriber.php @@ -41,15 +41,21 @@ class TransactionSubscriber implements EventSubscriberInterface { } /** - * @var array (scalar $apiRequestId => CRM_Core_Transaction $tx) + * List of active transaction objects. + * + * array(scalar $apiRequestId => CRM_Core_Transaction $tx) + * + * @var array */ private $transactions = []; /** - * @var array (scalar $apiRequestId => bool) - * - * A list of requests which should be forcibly rolled back to + * (Unused?) A list of requests which should be forcibly rolled back to * their save points. + * + * array (scalar $apiRequestId => bool) + * + * @var array */ private $forceRollback = []; diff --git a/Civi/API/Subscriber/WrapperAdapter.php b/Civi/API/Subscriber/WrapperAdapter.php index 6a57a5c541..6b90161e91 100644 --- a/Civi/API/Subscriber/WrapperAdapter.php +++ b/Civi/API/Subscriber/WrapperAdapter.php @@ -32,7 +32,7 @@ class WrapperAdapter implements EventSubscriberInterface { } /** - * @var array(\API_Wrapper) + * @var \API_Wrapper[] */ protected $defaults; -- 2.25.1