From d80c66316700c37a5516c4d32b520929d116591c Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 9 Sep 2021 11:36:31 +1200 Subject: [PATCH] dev/core#2823 update function visibility to protected This makes some internal functions 'protected'. I did a universer search for them. Making them protected means that when I look to clean them up it is clear that we only need to worry about how the class interacts with them --- CRM/Core/ManagedEntities.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Core/ManagedEntities.php b/CRM/Core/ManagedEntities.php index cd03306ce0..eff92beeb2 100644 --- a/CRM/Core/ManagedEntities.php +++ b/CRM/Core/ManagedEntities.php @@ -235,7 +235,7 @@ class CRM_Core_ManagedEntities { * @param array $todo * Entity specification (per hook_civicrm_managedEntities). */ - public function insertNewEntity($todo) { + protected function insertNewEntity($todo) { $result = civicrm_api($todo['entity'], 'create', $todo['params']); if (!empty($result['is_error'])) { $this->onApiError($todo['entity'], 'create', $todo['params'], $result); @@ -307,7 +307,7 @@ class CRM_Core_ManagedEntities { * * @throws \CiviCRM_API3_Exception */ - public function disableEntity($dao): void { + protected function disableEntity($dao): void { $entity_type = $dao->entity_type; if ($this->isActivationSupported($entity_type)) { // FIXME cascading for payproc types? @@ -329,7 +329,7 @@ class CRM_Core_ManagedEntities { * @param CRM_Core_DAO_Managed $dao * @throws Exception */ - public function removeStaleEntity($dao) { + protected function removeStaleEntity($dao) { $policy = empty($dao->cleanup) ? 'always' : $dao->cleanup; switch ($policy) { case 'always': @@ -384,7 +384,7 @@ class CRM_Core_ManagedEntities { * * @return array|null */ - public function getDeclarations() { + protected function getDeclarations() { if ($this->declarations === NULL) { $this->declarations = []; foreach (CRM_Core_Component::getEnabledComponents() as $component) { -- 2.25.1