From 6f81b3b87e8b2ba295da2e32cb4c14564c7b590f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 11 Jan 2022 08:47:38 +1300 Subject: [PATCH] Mark function as private I did a universe search & this is not called outside this class (the one on the LabelCommon class is called from one place outside that class --- CRM/Contact/Form/Task/Label.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/Form/Task/Label.php b/CRM/Contact/Form/Task/Label.php index 90461774ce..0ba7dd2978 100644 --- a/CRM/Contact/Form/Task/Label.php +++ b/CRM/Contact/Form/Task/Label.php @@ -356,15 +356,15 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task { * @param string $fileName * The name of the file to save the label in. */ - public function createLabel(&$contactRows, &$format, $fileName = 'MailingLabels_CiviCRM.pdf') { + private function createLabel($contactRows, $format, $fileName = 'MailingLabels_CiviCRM.pdf') { $pdf = new CRM_Utils_PDF_Label($format, 'mm'); $pdf->Open(); $pdf->AddPage(); //build contact string that needs to be printed $val = NULL; - foreach ($contactRows as $row => $value) { - foreach ($value as $k => $v) { + foreach ($contactRows as $value) { + foreach ($value as $v) { $val .= "$v\n"; } -- 2.25.1