X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FBadge.php;h=8e22a144f5ab59c96ef73e327ad90cb3510fb926;hb=5da7cc4936ccca8b8cfaac4c8880da9b1a58261e;hp=94d51e15a8af76eec737cc18acae89a1e595b3b8;hpb=7a88e045914e81a53e30af54aee578baa9ff0220;p=civicrm-core.git diff --git a/CRM/Event/Badge.php b/CRM/Event/Badge.php index 94d51e15a8..8e22a144f5 100644 --- a/CRM/Event/Badge.php +++ b/CRM/Event/Badge.php @@ -1,25 +1,11 @@ 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 +108,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 +132,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) {