From 6ae5b62ca42e6094a6b56d3d0f246e6b55681954 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 14 May 2024 09:30:43 +0200 Subject: [PATCH] Fix PR Issues * Change order of checks and setter. * Remove unused import. --- Classes/Service/DestinationDataImportService.php | 6 +++--- .../Import/DestinationDataTest/ImportHandlesPricesTest.php | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index 85fcaa1..af04c2c 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -367,13 +367,13 @@ private function setTexts(array $texts): void if ($text['rel'] == 'teaser' && $text['type'] == 'text/plain') { $this->tmpCurrentEvent->setTeaser(str_replace("\n\n", "\n", (string)$text['value'])); } - if ($shouldSetPrice && $text['rel'] == 'PRICE_INFO' && $text['type'] == 'text/plain') { - $this->tmpCurrentEvent->setPriceInfo(str_replace("\n\n", "\n", (string)$text['value'])); - } if ($shouldSetPrice && $text['rel'] == 'PRICE_INFO_EXTRA' && $text['type'] == 'text/plain') { $shouldSetPrice = false; $this->tmpCurrentEvent->setPriceInfo(str_replace("\n\n", "\n", (string)$text['value'])); } + if ($shouldSetPrice && $text['rel'] == 'PRICE_INFO' && $text['type'] == 'text/plain') { + $this->tmpCurrentEvent->setPriceInfo(str_replace("\n\n", "\n", (string)$text['value'])); + } } } diff --git a/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php b/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php index 7d024a3..d2355e8 100644 --- a/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php +++ b/Tests/Functional/Import/DestinationDataTest/ImportHandlesPricesTest.php @@ -1,15 +1,16 @@