Passed
Pull Request — master (#68)
by
unknown
17:15 queued 07:11
created
src/ZipFile.php 2 patches
Spacing   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -559,8 +559,7 @@  discard block
 block discarded – undo
559 559
             } else {
560 560
                 $mimeType = FilesUtil::getMimeTypeFromString($contents);
561 561
                 $compressionMethod = FilesUtil::isBadCompressionMimeType($mimeType) ?
562
-                    ZipCompressionMethod::STORED :
563
-                    ZipCompressionMethod::DEFLATED;
562
+                    ZipCompressionMethod::STORED : ZipCompressionMethod::DEFLATED;
564 563
             }
565 564
         }
566 565
 
@@ -661,8 +660,7 @@  discard block
 block discarded – undo
661 660
                 $compressionMethod = ZipCompressionMethod::STORED;
662 661
             } else {
663 662
                 $compressionMethod = FilesUtil::isBadCompressionFile($file->getPathname()) ?
664
-                    ZipCompressionMethod::STORED :
665
-                    ZipCompressionMethod::DEFLATED;
663
+                    ZipCompressionMethod::STORED : ZipCompressionMethod::DEFLATED;
666 664
             }
667 665
 
668 666
             $zipEntry->setCompressionMethod($compressionMethod);
@@ -805,8 +803,7 @@  discard block
 block discarded – undo
805 803
                     rewind($stream);
806 804
                     $mimeType = FilesUtil::getMimeTypeFromString($bufferContents);
807 805
                     $compressionMethod = FilesUtil::isBadCompressionMimeType($mimeType) ?
808
-                        ZipCompressionMethod::STORED :
809
-                        ZipCompressionMethod::DEFLATED;
806
+                        ZipCompressionMethod::STORED : ZipCompressionMethod::DEFLATED;
810 807
                 }
811 808
                 $zipEntry->setUncompressedSize($length);
812 809
             }
@@ -973,8 +970,7 @@  discard block
 block discarded – undo
973 970
         }
974 971
 
975 972
         $iterator = $iterator instanceof \RecursiveIterator ?
976
-            new \RecursiveIteratorIterator($iterator) :
977
-            new \IteratorIterator($iterator);
973
+            new \RecursiveIteratorIterator($iterator) : new \IteratorIterator($iterator);
978 974
         /**
979 975
          * @var string[] $files
980 976
          * @var string   $path
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,11 +111,11 @@
 block discarded – undo
111 111
     public function openFile($filename, array $options = [])
112 112
     {
113 113
         if (!file_exists($filename)) {
114
-            throw new ZipException("File {$filename} does not exist.");
114
+            throw new ZipException("file {$filename} does not exist.");
115 115
         }
116 116
 
117 117
         if (!($handle = @fopen($filename, 'rb'))) {
118
-            throw new ZipException("File {$filename} can't open.");
118
+            throw new ZipException("file {$filename} can't open.");
119 119
         }
120 120
 
121 121
         return $this->openFromStream($handle, $options);
Please login to merge, or discard this patch.
src/Model/Data/ZipNewData.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@  discard block
 block discarded – undo
51 51
         $resourceId = (int) $this->stream;
52 52
         self::$guardClonedStream[$resourceId] =
53 53
             isset(self::$guardClonedStream[$resourceId]) ?
54
-                self::$guardClonedStream[$resourceId] + 1 :
55
-                0;
54
+                self::$guardClonedStream[$resourceId] + 1 : 0;
56 55
     }
57 56
 
58 57
     /**
@@ -102,8 +101,7 @@  discard block
 block discarded – undo
102 101
         $resourceId = (int) $this->stream;
103 102
         self::$guardClonedStream[$resourceId] =
104 103
             isset(self::$guardClonedStream[$resourceId]) ?
105
-                self::$guardClonedStream[$resourceId] + 1 :
106
-                1;
104
+                self::$guardClonedStream[$resourceId] + 1 : 1;
107 105
     }
108 106
 
109 107
     /**
Please login to merge, or discard this patch.
src/Util/FilesUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@
 block discarded – undo
276 276
             \DIRECTORY_SEPARATOR,
277 277
             array_filter(
278 278
                 explode('/', (string) $path),
279
-                static function ($part) {
279
+                static function($part) {
280 280
                     return $part !== '.' && $part !== '..';
281 281
                 }
282 282
             )
Please login to merge, or discard this patch.