Skip to content

Commit 695ecb9

Browse files
committed
[TASK] Replaced all empty methods
1 parent 550c92e commit 695ecb9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Classes/Command/RemovePastPeriodsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7878
$this->dataHandler->start([], $cmd);
7979
$this->dataHandler->process_cmdmap();
8080

81-
if (!empty($this->dataHandler->errorLog)) {
81+
if ($this->dataHandler->errorLog !== []) {
8282
$output->writeln('Errors during DataHandler operations:');
8383
$output->writeln($this->dataHandler->errorLog);
8484
return 1;

Classes/Command/SendMailsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected function sendNextMail(): bool
154154

155155
protected function getNextReceiver(): string
156156
{
157-
if (empty($this->receivers)) {
157+
if ($this->receivers === []) {
158158
if ($this->email instanceof Email) {
159159
// all orders of current email are processed now
160160
$this->unlockAndUpdateProcessedEmail();

Classes/DataHandler/AskForMailAfterPeriodUpdate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function processDataHandlerResultAfterAllOperations(DataHandler $dataHand
4444
$this->dataHandler = $dataHandler;
4545
if (!Environment::isCli()) {
4646
$this->checkForUpdatedRecords();
47-
if (!empty($this->updatedRecords) && $this->checkIfUpdatedRecordsAffectsOrders()) {
47+
if (($this->updatedRecords !== []) && $this->checkIfUpdatedRecordsAffectsOrders()) {
4848
$this->addJavaScriptAndSettingsToPageRenderer();
4949
}
5050
}

Classes/DataHandler/FacilityClearCacheAfterUpdate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function processDataHandlerResultAfterAllOperations(DataHandler $dataHand
4141
// maybe split this big condition block into separated methods
4242
if (array_key_exists('tx_reserve_domain_model_facility', $dataHandler->datamap)) {
4343
foreach ($dataHandler->datamap['tx_reserve_domain_model_facility'] as $uid => $row) {
44-
if (is_int($uid) && !empty($row['name'])) {
44+
if (is_int($uid) && ($row['name'] !== '')) {
4545
// only call this method if current facility isn't new, hidden or deleted!
4646
$this->clearPageCacheAndAddFacilityName($uid);
4747
}
@@ -92,7 +92,7 @@ public function processDataHandlerResultAfterAllOperations(DataHandler $dataHand
9292
$this->clearPageCacheAndAddFacilityName((int)$row['uid']);
9393
}
9494
}
95-
if (!empty($this->facilityNames)) {
95+
if ($this->facilityNames !== []) {
9696
$flashMessageQueue = $this->getFlashMessageService()->getMessageQueueByIdentifier();
9797
$flashMessage = GeneralUtility::makeInstance(
9898
FlashMessage::class,

0 commit comments

Comments
 (0)