From c90c38dcabe0e19a45098891ad4f385084497e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Sat, 26 Jun 2021 15:39:07 +0200 Subject: [PATCH] Use proper return value in cli commands --- .../ep_products/Classes/Command/ContingentCommandController.php | 2 ++ .../ext/ep_products/Classes/Command/DateCommandController.php | 2 ++ .../ext/ep_products/Classes/Command/ExportCommandController.php | 2 ++ .../ext/ep_products/Classes/Command/GroupsSwissCommand.php | 2 +- .../ep_products/Classes/Command/SnowreportCommandController.php | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Command/ContingentCommandController.php b/public/typo3conf/ext/ep_products/Classes/Command/ContingentCommandController.php index 6f5643db..6333064d 100644 --- a/public/typo3conf/ext/ep_products/Classes/Command/ContingentCommandController.php +++ b/public/typo3conf/ext/ep_products/Classes/Command/ContingentCommandController.php @@ -66,6 +66,8 @@ class ContingentCommandController extends Command $path = GeneralUtility::getFileAbsFileName('fileadmin/xmlexportzimmer'); $count = $this->contingentImportService->import($path); $output->writeln(sprintf('%d rows imported.', $count )); + + return 0; } } diff --git a/public/typo3conf/ext/ep_products/Classes/Command/DateCommandController.php b/public/typo3conf/ext/ep_products/Classes/Command/DateCommandController.php index 89b930db..8d48136f 100644 --- a/public/typo3conf/ext/ep_products/Classes/Command/DateCommandController.php +++ b/public/typo3conf/ext/ep_products/Classes/Command/DateCommandController.php @@ -85,6 +85,8 @@ class DateCommandController extends Command $settings = $this->getSettings(); $resellerPageUid = $settings['resellerExportPageUid']; $this->cacheService->clearPageCache($resellerPageUid); + + return 0; } /** diff --git a/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php b/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php index afa9a2b4..73716dc8 100644 --- a/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php +++ b/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php @@ -103,6 +103,8 @@ class ExportCommandController extends Command $output->writeln('Exporting CSV (Google) for ' . $reseller->getName()); $this->exportCsv($reseller, 'google', $destinationFolder); } + + return 0; } /** diff --git a/public/typo3conf/ext/ep_products/Classes/Command/GroupsSwissCommand.php b/public/typo3conf/ext/ep_products/Classes/Command/GroupsSwissCommand.php index 10ab024d..cbe98881 100644 --- a/public/typo3conf/ext/ep_products/Classes/Command/GroupsSwissCommand.php +++ b/public/typo3conf/ext/ep_products/Classes/Command/GroupsSwissCommand.php @@ -80,6 +80,6 @@ class GroupsSwissCommand extends Command $success = $this->groupsSwissService->publishContingents($hotelUid, $houseNumber, $apiKey); - return $success ? 1 : 0; + return $success ? 0 : 1; } } diff --git a/public/typo3conf/ext/ep_products/Classes/Command/SnowreportCommandController.php b/public/typo3conf/ext/ep_products/Classes/Command/SnowreportCommandController.php index 9e929bf8..0efe92ba 100644 --- a/public/typo3conf/ext/ep_products/Classes/Command/SnowreportCommandController.php +++ b/public/typo3conf/ext/ep_products/Classes/Command/SnowreportCommandController.php @@ -55,6 +55,8 @@ class SnowreportCommandController extends Command $this->snowreportImportService->downloadReportsXml(); $count = $this->snowreportImportService->importSnowReportData(); $output->writeln(sprintf('%d rows imported.', $count )); + + return 0; } }