From 16458d6bf306a9df7c3bafa826cbd590acd17662 Mon Sep 17 00:00:00 2001 From: Oded Arbel Date: Fri, 30 Oct 2020 23:27:57 +0200 Subject: [PATCH] fixed issues reported by coding standards tool --- src/Spout/Writer/ODS/Manager/WorksheetManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Spout/Writer/ODS/Manager/WorksheetManager.php b/src/Spout/Writer/ODS/Manager/WorksheetManager.php index 6790553..d03404c 100644 --- a/src/Spout/Writer/ODS/Manager/WorksheetManager.php +++ b/src/Spout/Writer/ODS/Manager/WorksheetManager.php @@ -207,10 +207,10 @@ class WorksheetManager implements WorksheetManagerInterface } elseif ($cell->isDate()) { $value = $cell->getValue(); if ($value instanceof \DateTime) { - $datevalue = substr($value->setTimezone(new \DateTimeZone("UTC"))->format(\DateTimeInterface::W3C),0,-6); + $datevalue = substr($value->setTimezone(new \DateTimeZone('UTC'))->format(\DateTimeInterface::W3C), 0, -6); $data .= ' office:value-type="date" calcext:value-type="date" office:date-value="' . $datevalue . 'Z">'; $data .= '' . $datevalue . 'Z'; - } else if ($value instanceof \DateInterval) { + } elseif ($value instanceof \DateInterval) { // workaround for missing DateInterval::format('c'), see https://stackoverflow.com/a/61088115/53538 static $f = ['M0S', 'H0M', 'DT0H', 'M0D', 'Y0M', 'P0Y', 'Y0M', 'P0M']; static $r = ['M', 'H', 'DT', 'M', 'Y0M', 'P', 'Y', 'P'];