Completed
Pull Request — develop (#695)
by
unknown
62:43
created
src/PhpSpreadsheet/Writer/Xlsx.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -396,7 +396,7 @@
 block discarded – undo
396 396
             Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog);
397 397
 
398 398
             // Close file, If can't close Throws an Exception
399
-            if ( @$zip->close() === false ) {
399
+            if (@$zip->close() === false) {
400 400
                 throw new WriterException("Could not close zip file $pFilename.");
401 401
             }
402 402
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/File.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,8 +155,9 @@
 block discarded – undo
155 155
             // '@' will stop displaying "Resource Unavailable" error because of file is open some where.
156 156
             // 'unlink($pFilename) !== true' will check if file is deleted successfully.
157 157
             // Return so that we can handle error easily instead of displaying to users.
158
-            if (@unlink($file) !== true)
159
-                return false;
158
+            if (@unlink($file) !== true) {
159
+                            return false;
160
+            }
160 161
         }
161 162
         return true;
162 163
     }
Please login to merge, or discard this patch.