Passed
Push — master ( 18e44b...3a1d00 )
by Sérgio Danilo
01:27
created
example/several-files.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 
8 8
 $zipper = new Zipper();
9 9
 
10
-$fileOne = __DIR__."/assets/files/example-file.txt";
11
-$fileTwo = __DIR__."/assets/files/example-file-two.txt";
10
+$fileOne = __DIR__ . "/assets/files/example-file.txt";
11
+$fileTwo = __DIR__ . "/assets/files/example-file-two.txt";
12 12
 
13 13
 $files = [
14 14
     $fileOne,
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 ];
17 17
 
18 18
 //Here I'll set a new folder that not exists yet.
19
-$path = __DIR__."/assets/files/ZipperFiles";
19
+$path = __DIR__ . "/assets/files/ZipperFiles";
20 20
 
21 21
 $several = $zipper->zipFiles($files, "MadeWithZipper", $path);
22 22
 
Please login to merge, or discard this patch.
example/extract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
 //Here I'll set a new folder that not exists yet. But You can set a existent folder.
13 13
 $destiny = __DIR__ . "/assets/files/Storage";
14 14
 
15
-$extracted = $zipper->extract($fileToExtract,$destiny);
15
+$extracted = $zipper->extract($fileToExtract, $destiny);
16 16
 
17 17
 echo $extracted;
Please login to merge, or discard this patch.
example/single-file.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 $zipper = new Zipper();
9 9
 
10
-$fileExample = __DIR__."/assets/files/example-file.txt";
10
+$fileExample = __DIR__ . "/assets/files/example-file.txt";
11 11
 
12 12
 $single = $zipper->zipFile($fileExample);
13 13
 
Please login to merge, or discard this patch.
src/Zipper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
     private function setFileName($file): string
208 208
     {
209 209
         $dataFile = $this->dataFile($file);
210
-        $filename = $this->dataFile($file)->filename . "-" . (string)time();
210
+        $filename = $this->dataFile($file)->filename . "-" . (string) time();
211 211
         return $filename;
212 212
     }
213 213
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         if (!is_null($dataFile = $this->dataFile($file))) {
71 71
 
72 72
             $path = $this->destiny($file);
73
-           // $this->zip = new \ZipArchive();
73
+            // $this->zip = new \ZipArchive();
74 74
             if ($this->zip->open($path, $this->zip::CREATE) === true) {
75 75
                 $bool = $this->zip->addFile($file, $dataFile->basename);
76 76
                 $this->zip->close();
Please login to merge, or discard this patch.