Преглед на файлове

Combine open zip call with conditional

Kristof Ringleff, Fooman преди 6 години
родител
ревизия
2ed573b22d
променени са 1 файла, в които са добавени 1 реда и са изтрити 3 реда
  1. 1 3
      src/Composer/Repository/ArtifactRepository.php

+ 1 - 3
src/Composer/Repository/ArtifactRepository.php

@@ -126,9 +126,7 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito
     private function getComposerInformation(\SplFileInfo $file)
     {
         $zip = new \ZipArchive();
-        $res = $zip->open($file->getPathname());
-
-        if ($res !== true) {
+        if ($zip->open($file->getPathname()) !== true) {
             return false;
         }