Merge pull request #6028 from sudhabisht/5770CodeCleanup
[civicrm-core.git] / CRM / Event / Badge.php
index 5efaba68d63f5d5e80f53b31839fb679b9510b22..6d35cab5fd1031a4300fc323ad850d55aa97129d 100644 (file)
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /*
-* Copyright (C) 2010 Tech To The People
-* Licensed to CiviCRM under the Academic Free License version 3.0.
-*
-*/
+ * Copyright (C) 2010 Tech To The People
+ * Licensed to CiviCRM under the Academic Free License version 3.0.
+ *
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
  */
 class CRM_Event_Badge {
   /**
-   *
    */
   public function __construct() {
-    $this->style        = array('width' => 0.1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,2', 'color' => array(0, 0, 200));
-    $this->format       = '5160';
+    $this->style = array(
+      'width' => 0.1,
+      'cap' => 'round',
+      'join' => 'round',
+      'dash' => '2,2',
+      'color' => array(0, 0, 200),
+    );
+    $this->format = '5160';
     $this->imgExtension = 'png';
-    $this->imgRes       = 300;
-    $this->event        = NULL;
+    $this->imgRes = 300;
+    $this->event = NULL;
     $this->setDebug(FALSE);
   }
 
@@ -75,12 +80,12 @@ class CRM_Event_Badge {
    *
    * @param array $participants
    *
-   * @return  null
+   * @return;
    */
   public function run(&$participants) {
     // fetch the 1st participant, and take her event to retrieve its attributes
     $participant = reset($participants);
-    $eventID     = $participant['event_id'];
+    $eventID = $participant['event_id'];
     $this->event = self::retrieveEvent($eventID);
     //call function to create labels
     self::createLabels($participants);
@@ -143,7 +148,15 @@ class CRM_Event_Badge {
     $x = $this->pdf->GetAbsX();
     $y = $this->pdf->GetY();
     if ($this->debug) {
-      $this->pdf->Rect($x, $y, $this->pdf->width, $this->pdf->height, 'D', array('all' => array('width' => 1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(255, 0, 0))));
+      $this->pdf->Rect($x, $y, $this->pdf->width, $this->pdf->height, 'D', array(
+          'all' => array(
+            'width' => 1,
+            'cap' => 'round',
+            'join' => 'round',
+            'dash' => '2,10',
+            'color' => array(255, 0, 0),
+          ),
+        ));
     }
     $img = $this->getImageFileName($this->event->id, $img);
     if ($img) {
@@ -158,8 +171,8 @@ class CRM_Event_Badge {
   }
 
   /**
-   * This is supposed to be overrided
-   **/
+   * This is supposed to be overrided.
+   */
   public function generateLabel($participant) {
     $txt = "{$this->event['title']}
 {$participant['display_name']}
@@ -176,7 +189,7 @@ class CRM_Event_Badge {
    *
    * @param array $participants
    *
-   * @return  null
+   * @return;
    */
   public function createLabels(&$participants) {
 
@@ -195,4 +208,5 @@ class CRM_Event_Badge {
     }
     $this->pdf->Output($this->event->title . '.pdf', 'D');
   }
+
 }