From d3b60a94df5bdffd165e5284162ac76e81218108 Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Thu, 30 May 2013 18:33:56 +0530 Subject: [PATCH] CRM-12726 : code improvement --- CRM/Contact/BAO/Contact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 3ed2b24605..6e8ac5a6df 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -788,10 +788,10 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer'); // delete cases related to contact $contactCases = CRM_Case_BAO_Case::retrieveCaseIdsByContactId($id); if (!empty($contactCases)) { - foreach($contactCases as $caseId){ + foreach ($contactCases as $caseId) { //check if case is associate with other contact or not. $caseContactId = CRM_Case_BAO_Case::getCaseClients($caseId); - if(count($caseContactId) <= 1){ + if (count($caseContactId) <= 1) { CRM_Case_BAO_Case::deleteCase($caseId); } } -- 2.25.1