From 5642c97a3ac722907d8271134761c15fb0ec590e Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 14 May 2024 09:29:21 +0200 Subject: [PATCH] Fix PR Issues * Change order of checks and setter. * Remove unused import. --- Classes/Service/DestinationDataImportService.php | 6 +++--- .../Import/DestinationDataTest/ImportHandlesPricesTest.php | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index b3418d8..acf8ba8 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -476,13 +476,13 @@ private function setTexts(array $texts): void if ($text['rel'] == 'teaser' && $text['type'] == 'text/plain') { $this->tmpCurrentEvent->setTeaser(str_replace("\n\n", "\n", $text['value'])); } - if ($shouldSetPrice && $text['rel'] == 'PRICE_INFO' && $text['type'] == 'text/plain') { - $this->tmpCurrentEvent->setPriceInfo(str_replace("\n\n", "\n", $text['value'])); - } if ($shouldSetPrice && $text['rel'] == 'PRICE_INFO_EXTRA' && $text['type'] == 'text/plain') { $shouldSetPrice = false; $this->tmpCurrentEvent->setPriceInfo(str_replace("\n\n", "\n", $text['value'])); } + if ($shouldSetPrice && $text['rel'] == 'PRICE_INFO' && $text['type'] == 'text/plain') { + $this->tmpCurrentEvent->setPriceInfo(str_replace("\n\n", "\n", $text['value'])); + } } } diff --git a/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php b/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php index 7d024a3..bace835 100644 --- a/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php +++ b/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php @@ -4,7 +4,6 @@ use Codappix\Typo3PhpDatasets\PhpDataSet; use GuzzleHttp\Psr7\Response; -use TYPO3\CMS\Core\Utility\GeneralUtility; /** * @testdox DestinationData import