Use proper return value in cli commands

This commit is contained in:
Björn Fromme
2021-06-26 15:39:07 +02:00
parent 7253508791
commit c90c38dcab
5 changed files with 9 additions and 1 deletions
@@ -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;
}
}
@@ -85,6 +85,8 @@ class DateCommandController extends Command
$settings = $this->getSettings();
$resellerPageUid = $settings['resellerExportPageUid'];
$this->cacheService->clearPageCache($resellerPageUid);
return 0;
}
/**
@@ -103,6 +103,8 @@ class ExportCommandController extends Command
$output->writeln('Exporting CSV (Google) for ' . $reseller->getName());
$this->exportCsv($reseller, 'google', $destinationFolder);
}
return 0;
}
/**
@@ -80,6 +80,6 @@ class GroupsSwissCommand extends Command
$success = $this->groupsSwissService->publishContingents($hotelUid, $houseNumber, $apiKey);
return $success ? 1 : 0;
return $success ? 0 : 1;
}
}
@@ -55,6 +55,8 @@ class SnowreportCommandController extends Command
$this->snowreportImportService->downloadReportsXml();
$count = $this->snowreportImportService->importSnowReportData();
$output->writeln(sprintf('%d rows imported.', $count ));
return 0;
}
}