Quellcode durchsuchen

Dropped obsolete condition

The conditional a few lines above already checks for `bytesMax > 0`
Markus Staab vor 9 Jahren
Ursprung
Commit
a4ad3c2146
1 geänderte Dateien mit 1 neuen und 5 gelöschten Zeilen
  1. 1 5
      src/Composer/Util/RemoteFilesystem.php

+ 1 - 5
src/Composer/Util/RemoteFilesystem.php

@@ -326,11 +326,7 @@ class RemoteFilesystem
 
             case STREAM_NOTIFY_PROGRESS:
                 if ($this->bytesMax > 0 && $this->progress) {
-                    $progression = 0;
-
-                    if ($this->bytesMax > 0) {
-                        $progression = round($bytesTransferred / $this->bytesMax * 100);
-                    }
+                    $progression = round($bytesTransferred / $this->bytesMax * 100);
 
                     if ((0 === $progression % 5) && 100 !== $progression && $progression !== $this->lastProgress) {
                         $this->lastProgress = $progression;