Passed
Pull Request — main (#5138)
by
unknown
15:02
created
app/Services/GedcomExportService.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         string $line_endings,
110 110
         string $filename,
111 111
         string $format,
112
-        Collection|null $records = null
112
+        Collection | null $records = null
113 113
     ): ResponseInterface {
114 114
         $access_level = self::ACCESS_LEVELS[$privacy];
115 115
 
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
         string $encoding = UTF8::NAME,
179 179
         int $access_level = Auth::PRIV_HIDE,
180 180
         string $line_endings = 'CRLF',
181
-        Collection|null $records = null,
182
-        FilesystemOperator|null $zip_filesystem = null,
183
-        string|null $media_path = null,
184
-        string|null $temp_zip_file = null
181
+        Collection | null $records = null,
182
+        FilesystemOperator | null $zip_filesystem = null,
183
+        string | null $media_path = null,
184
+        string | null $temp_zip_file = null
185 185
     ) {
186 186
         $stream = fopen('php://memory', 'wb+');
187 187
 
@@ -228,9 +228,9 @@  discard block
 block discarded – undo
228 228
 
229 229
         // Use PHP ZipArchive if available (way faster, and probably mandatory for shared servers that are not fully customizable regarding timeout).
230 230
         // Fallback to Flysystem versatile solution if not (works everywhere).
231
-        if($zip_filesystem !== null) {
231
+        if ($zip_filesystem !== null) {
232 232
             $zip = new ZipArchive;
233
-            $php_zip = extension_loaded('zip') && $zip->open($temp_zip_file, ZipArchive::CREATE|ZIPARCHIVE::OVERWRITE);
233
+            $php_zip = extension_loaded('zip') && $zip->open($temp_zip_file, ZipArchive::CREATE | ZIPARCHIVE::OVERWRITE);
234 234
         }
235 235
 
236 236
         foreach ($data as $rows) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -262,8 +262,7 @@
 block discarded – undo
262 262
 
263 263
                             if ($php_zip === TRUE) {
264 264
                                 $zip->addFile(Site::getPreference('INDEX_DIRECTORY') . $tree->getPreference('MEDIA_DIRECTORY') . $media_file, $media_path . $media_file);
265
-                            }
266
-                            else {
265
+                            } else {
267 266
                                 $zip_filesystem->writeStream($media_path . $media_file, $media_filesystem->readStream($media_file));
268 267
                             }
269 268
                             
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
                         if ($media_filesystem->fileExists($media_file)) {
262 262
 
263
-                            if ($php_zip === TRUE) {
263
+                            if ($php_zip === true) {
264 264
                                 $zip->addFile(Site::getPreference('INDEX_DIRECTORY') . $tree->getPreference('MEDIA_DIRECTORY') . $media_file, $media_path . $media_file);
265 265
                             }
266 266
                             else {
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         }
287 287
 
288 288
         // In case we were using PHP ZipArchive
289
-        if ($zip_filesystem !== null && $php_zip === TRUE) {
289
+        if ($zip_filesystem !== null && $php_zip === true) {
290 290
             $zip->close();
291 291
         }
292 292
 
Please login to merge, or discard this patch.