X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FBadge.php;h=953c61b5fdb837832daca95a39c8fa1b816cdcad;hb=0350a2376c3fe9ef9b6608c4ee407a89fd89f61c;hp=925122adc113cc2e611647b5668b729d609e858b;hpb=dba4438f425b8ac60bd0a31798a6b6fde00db65d;p=civicrm-core.git diff --git a/CRM/Event/Badge.php b/CRM/Event/Badge.php index 925122adc1..953c61b5fd 100644 --- a/CRM/Event/Badge.php +++ b/CRM/Event/Badge.php @@ -32,7 +32,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @copyright CiviCRM LLC (c) 2004-2019 * $Id$ * */ @@ -43,16 +43,17 @@ * */ class CRM_Event_Badge { + /** */ public function __construct() { - $this->style = array( + $this->style = [ 'width' => 0.1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,2', - 'color' => array(0, 0, 200), - ); + 'color' => [0, 0, 200], + ]; $this->format = '5160'; $this->imgExtension = 'png'; $this->imgRes = 300; @@ -123,9 +124,9 @@ class CRM_Event_Badge { // CRM-13235 - leverage the Smarty path to get all templates directories $template = CRM_Core_Smarty::singleton(); if (isset($template->template_dir) && $template->template_dir) { - $dirs = is_array($template->template_dir) ? $template->template_dir : array($template->template_dir); + $dirs = is_array($template->template_dir) ? $template->template_dir : [$template->template_dir]; foreach ($dirs as $dir) { - foreach (array("$dir/$path/$eventID/$img", "$dir/$path/$img") as $imgFile) { + foreach (["$dir/$path/$eventID/$img", "$dir/$path/$img"] as $imgFile) { if (file_exists($imgFile)) { return $imgFile; } @@ -147,15 +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', [ + 'all' => [ + 'width' => 1, + 'cap' => 'round', + 'join' => 'round', + 'dash' => '2,10', + 'color' => [255, 0, 0], + ], + ]); } $img = $this->getImageFileName($this->event->id, $img); if ($img) {