Passed
Pull Request — master (#49)
by
unknown
13:18
created
src/Drivers/OneFile/OneFileDriver.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,10 +124,11 @@
 block discarded – undo
124 124
     {
125 125
         if(method_exists($this, 'streamToFile')){
126 126
             $this->streamToFile($outputFolder.$this->inArchiveFileName);
127
-        }else{
127
+        } else{
128 128
             $data = $this->getFileContent($this->inArchiveFileName);
129
-            if ($data === false)
130
-                throw new ArchiveExtractionException('Could not extract archive');
129
+            if ($data === false) {
130
+                            throw new ArchiveExtractionException('Could not extract archive');
131
+            }
131 132
 
132 133
             $size = strlen($data);
133 134
             $written = file_put_contents($outputFolder.$this->inArchiveFileName, $data);
Please login to merge, or discard this patch.
src/Drivers/OneFile/Gzip.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,10 +98,12 @@
 block discarded – undo
98 98
         $fp = fopen($targetPath, "w");
99 99
         while (!gzeof($sfp)) {
100 100
             $chunk = gzread($sfp, 8192);
101
-            if($chunk === 0 || $chunk === false)
102
-                throw new ArchiveExtractionException('Cannot read gzip chunk');
103
-            if(fwrite($fp, $chunk, strlen($chunk)) === false)
104
-                throw new ArchiveExtractionException('Cannot write gzip chunk');
101
+            if($chunk === 0 || $chunk === false) {
102
+                            throw new ArchiveExtractionException('Cannot read gzip chunk');
103
+            }
104
+            if(fwrite($fp, $chunk, strlen($chunk)) === false) {
105
+                            throw new ArchiveExtractionException('Cannot write gzip chunk');
106
+            }
105 107
         }
106 108
         gzclose($sfp);
107 109
         fclose($fp);
Please login to merge, or discard this patch.