From d6653013684ca747d4cfdabba14f4e4032cbb3ef Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 12 Jan 2021 21:04:52 +0100 Subject: [PATCH] Rewrite while if return as do while --- src/Composer/Util/HttpDownloader.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Composer/Util/HttpDownloader.php b/src/Composer/Util/HttpDownloader.php index 045e9575b..519e17c54 100644 --- a/src/Composer/Util/HttpDownloader.php +++ b/src/Composer/Util/HttpDownloader.php @@ -336,11 +336,9 @@ class HttpDownloader */ public function wait($index = null) { - while (true) { - if (!$this->countActiveJobs($index)) { - return; - } - } + do { + $jobCount = $this->countActiveJobs($index); + } while ($jobCount); } /**