Skip to content

Commit 1c2107a

Browse files
committed
Fixed phpstan error
1 parent 9843290 commit 1c2107a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/Commands/ResizeImagesCommand.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public function handle(ResizesImages $resizesImages): int
4141
$progress->start();
4242

4343
while ($batch->pendingJobs && ! $batch->finished() && ! $batch->cancelled()) {
44-
$refreshed = $batch->fresh();
44+
$refreshed = $this->freshBatch($batch);
4545

46-
if (! $refreshed instanceof Batch) {
46+
if ($refreshed === null) {
4747
break;
4848
}
4949

@@ -62,4 +62,9 @@ public function handle(ResizesImages $resizesImages): int
6262

6363
return static::SUCCESS;
6464
}
65+
66+
private function freshBatch(Batch $batch): ?Batch
67+
{
68+
return $batch->fresh();
69+
}
6570
}

0 commit comments

Comments
 (0)