From 374ada691417af595e6963fe9d6d5f35e47159f6 Mon Sep 17 00:00:00 2001 From: Guillaume ZITTA Date: Mon, 13 Feb 2017 13:43:36 +0100 Subject: [PATCH] useless if, condition il already true --- src/Composer/Downloader/ZipDownloader.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Composer/Downloader/ZipDownloader.php b/src/Composer/Downloader/ZipDownloader.php index 612eb9da2..b84f0d836 100644 --- a/src/Composer/Downloader/ZipDownloader.php +++ b/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();