Skip to content

Commit 6046a41

Browse files
author
Bogdan Rancichi
committed
[fixed] implemented suggested code review
1 parent 3e0faa3 commit 6046a41

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

RabbitMq/BaseConsumer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ protected function maybeStopConsumer()
9090

9191
if ($this->forceStop || ($this->consumed == $this->target && $this->target > 0)) {
9292
$this->stopConsuming();
93-
} else {
94-
return;
9593
}
9694
}
9795

RabbitMq/BatchConsumer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ public function consume()
121121
$this->batchConsume();
122122
}
123123

124-
$timeoutWanted = ($isConsuming) ? $this->getTimeoutWait() : $this->getIdleTimeout();
124+
$timeoutWanted = $isConsuming ? $this->getTimeoutWait() : $this->getIdleTimeout();
125125
}
126126
}
127127

128128
public function batchConsume()
129129
{
130-
if ($this->batchCounter == 0) {
130+
if ($this->batchCounter === 0) {
131131
return;
132132
}
133133

@@ -387,8 +387,6 @@ protected function maybeStopConsumer()
387387

388388
if ($this->forceStop) {
389389
$this->stopConsuming();
390-
} else {
391-
return;
392390
}
393391
}
394392

0 commit comments

Comments
 (0)