Mark function as private
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 10 Jan 2022 19:47:38 +0000 (08:47 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 10 Jan 2022 19:47:38 +0000 (08:47 +1300)
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

index 90461774cec33fc13a473a90a9ad8bfbc214d2f9..0ba7dd29784d34a1ee5dd551a86d1aedf64a7ff3 100644 (file)
@@ -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";
       }