We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0811fa8 commit f4f7b73Copy full SHA for f4f7b73
1 file changed
src/Queue/Task/ProgressExampleTask.php
@@ -75,7 +75,7 @@ public function description(): ?string {
75
public function run(array $data, int $jobId): void {
76
$this->io->hr();
77
$this->io->out('CakePHP Queue ProgressExample task.');
78
- $seconds = empty($data['duration']) ? 2 * static::MINUTE : (int)$data['duration'];
+ $seconds = !empty($data['duration']) ? (int)$data['duration'] : 2 * static::MINUTE;
79
80
$this->io->out('A total of ' . $seconds . ' seconds need to pass...');
81
for ($i = 0; $i < $seconds; $i++) {
0 commit comments