Skip to content

Commit f4f7b73

Browse files
committed
Restore !empty ternary in queue cleanup
1 parent 0811fa8 commit f4f7b73

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Queue/Task/ProgressExampleTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function description(): ?string {
7575
public function run(array $data, int $jobId): void {
7676
$this->io->hr();
7777
$this->io->out('CakePHP Queue ProgressExample task.');
78-
$seconds = empty($data['duration']) ? 2 * static::MINUTE : (int)$data['duration'];
78+
$seconds = !empty($data['duration']) ? (int)$data['duration'] : 2 * static::MINUTE;
7979

8080
$this->io->out('A total of ' . $seconds . ' seconds need to pass...');
8181
for ($i = 0; $i < $seconds; $i++) {

0 commit comments

Comments
 (0)