From b773d051568ef8a780b8e4dd6f54b4f653d6641e Mon Sep 17 00:00:00 2001 From: Seam uddin <38663656+seamuddin@users.noreply.github.com> Date: Sun, 26 May 2024 17:00:40 +0600 Subject: [PATCH] Fixed the syntax for Unparenthesized issue in PHP 8.2 I was facing error when run the package in php 8.2 with yii2 framework. --- src/ColumnTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ColumnTrait.php b/src/ColumnTrait.php index 4602a33c..96cb8326 100644 --- a/src/ColumnTrait.php +++ b/src/ColumnTrait.php @@ -279,8 +279,8 @@ public function parseExcelFormats(&$options, $model, $key, $index) $fmt = ($format == 'scientific') ? "0{$append}E+00" : "\\#\\{$tSep}\\#\\#0" . $append; break; case 'currency': - $curr = is_array($this->format) && isset($this->format[1]) ? $this->format[1] : - (isset($formatter->currencyCode) ? $formatter->currencyCode . ' ' : ''); + $curr = (is_array($this->format) && isset($this->format[1])) ? $this->format[1] : + (isset($formatter->currencyCode) ? $formatter->currencyCode . ' ' : ''); $fmt = "{$curr}\\#\\{$tSep}\\#\\#0{$dSep}00"; break; case 'date':