瀏覽代碼

useless if, condition il already true

Guillaume ZITTA 8 年之前
父節點
當前提交
374ada6914
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      src/Composer/Downloader/ZipDownloader.php

+ 7 - 3
src/Composer/Downloader/ZipDownloader.php

@@ -59,6 +59,12 @@ class ZipDownloader extends ArchiveDownloader
         return parent::download($package, $path, $output);
     }
 
+    /*
+     * extract $file to $path
+     *
+     * @param string $file File to extract
+     * @param string $path Path where to extract file
+     */
     protected function extract($file, $path)
     {
         $processError = null;
@@ -79,9 +85,7 @@ class ZipDownloader extends ArchiveDownloader
                 $processError = 'Failed to execute ' . $command . "\n\n" . $e->getMessage();
             }
 
-            if (!class_exists('ZipArchive')) {
-                throw new \RuntimeException($processError);
-            }
+            throw new \RuntimeException($processError);
         }
 
         $zipArchive = new ZipArchive();