INFRA-132 - Change "else if" to "elseif"
[civicrm-core.git] / CRM / Utils / PDF / Label.php
index bb083bc50aaaf08ef85978809becc1c75923c843..8893b2a29da717ecdb68ee6f0ef71ec297872235 100644 (file)
@@ -93,13 +93,13 @@ class CRM_Utils_PDF_Label extends TCPDF {
   /**
    * Constructor
    *
-   * @param $format   Either the name of a Label Format in the Option Value table
+   * @param $format
+   *   Either the name of a Label Format in the Option Value table.
    *                  or an array of Label Format values.
    * @param string|\Unit $unit Unit of measure for the PDF document
    *
-   * @access public
    */
-  function __construct($format, $unit = 'mm') {
+  public function __construct($format, $unit = 'mm') {
     if (is_array($format)) {
       // Custom format
       $tFormat = $format;
@@ -124,7 +124,7 @@ class CRM_Utils_PDF_Label extends TCPDF {
    * @param $objectinstance
    * @param string $methodname
    */
-  function SetGenerator($objectinstance, $methodname = 'generateLabel') {
+  public function SetGenerator($objectinstance, $methodname = 'generateLabel') {
     $this->generatorMethod = $methodname;
     $this->generatorObject = $objectinstance;
   }
@@ -135,7 +135,7 @@ class CRM_Utils_PDF_Label extends TCPDF {
    *
    * @return float|int|mixed
    */
-  function getFormatValue($name, $convert = FALSE) {
+  public function getFormatValue($name, $convert = FALSE) {
     if (isset($this->format[$name])) {
       $value = $this->format[$name];
       $metric = $this->format['metric'];
@@ -157,7 +157,7 @@ class CRM_Utils_PDF_Label extends TCPDF {
    * @param $format
    * @param $unit
    */
-  function LabelSetFormat(&$format, $unit) {
+  public function LabelSetFormat(&$format, $unit) {
     $this->defaults = CRM_Core_BAO_LabelFormat::getDefaultValues();
     $this->format = &$format;
     $this->formatName = $this->getFormatValue('name');
@@ -189,7 +189,7 @@ class CRM_Utils_PDF_Label extends TCPDF {
   /**
    * @param $text
    */
-  function generateLabel($text) {
+  public function generateLabel($text) {
     $args = array(
       'w' => $this->width,
       'h' => 0,
@@ -236,7 +236,7 @@ class CRM_Utils_PDF_Label extends TCPDF {
   /**
    * @param $texte
    */
-  function AddPdfLabel($texte) {
+  public function AddPdfLabel($texte) {
     if ($this->countX == $this->xNumber) {
       // Page full, we start a new one
       $this->AddPage();
@@ -262,7 +262,7 @@ class CRM_Utils_PDF_Label extends TCPDF {
     }
   }
 
-  function getFontNames() {
+  public function getFontNames() {
     // Define labels for TCPDF core fonts
     $fontLabel = array(
       'courier' => ts('Courier'),
@@ -271,7 +271,6 @@ class CRM_Utils_PDF_Label extends TCPDF {
       'dejavusans' => ts('Deja Vu Sans (UTF-8)'),
     );
 
-
     // Check to see if we have any additional fonts to add. You can specify more fonts in
     // civicrm.settings.php via: $config['CiviCRM Preferences']['additional_fonts']
     // CRM-13307
@@ -290,4 +289,3 @@ class CRM_Utils_PDF_Label extends TCPDF {
     return $list;
   }
 }
-