Passed
Push — master ( 0d8a9b...48a836 )
by f
12:20
created
src/Commands/ExtractFilesCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $entry_selector = $input->getArgument('entrySelector');
34 34
 
35 35
         $archive->extract($output_dir, $entry_selector, true);
36
-        $output->writeln('<info>Extracted:</info> ' . implode(', ', $entry_selector) . ' (' . count($entry_selector) . ') file(s)');
36
+        $output->writeln('<info>Extracted:</info> '.implode(', ', $entry_selector).' ('.count($entry_selector).') file(s)');
37 37
 
38 38
         return 0;
39 39
     }
Please login to merge, or discard this patch.
src/Drivers/OneFile/Lzma.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public static function getInstallationInstruction()
31 31
     {
32
-        return 'install [' . static::EXTENSION_NAME . '] extension' . "\n" . 'For 5.x: https://github.com/payden/php-xz' . "\n" . 'For 7.x/8.x: https://github.com/codemasher/php-ext-xz';
32
+        return 'install ['.static::EXTENSION_NAME.'] extension'."\n".'For 5.x: https://github.com/payden/php-xz'."\n".'For 7.x/8.x: https://github.com/codemasher/php-ext-xz';
33 33
     }
34 34
 
35 35
     /**
Please login to merge, or discard this patch.
src/Drivers/OneFile/OneFileDriver.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@
 block discarded – undo
50 50
     {
51 51
         $suffix = Formats::getFormatExtension(static::FORMAT);
52 52
         if ($suffix === null) {
53
-            throw new \Exception('Format suffix is empty for ' . static::FORMAT . ', it should be initialized!');
53
+            throw new \Exception('Format suffix is empty for '.static::FORMAT.', it should be initialized!');
54 54
         }
55 55
         if ($password !== null) {
56
-            throw new UnsupportedOperationException($suffix . ' archive does not support password!');
56
+            throw new UnsupportedOperationException($suffix.' archive does not support password!');
57 57
         }
58 58
 
59 59
         parent::__construct($archiveFileName, $format);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,8 +122,9 @@
 block discarded – undo
122 122
     public function extractArchive($outputFolder)
123 123
     {
124 124
         $data = $this->getFileContent($this->inArchiveFileName);
125
-        if ($data === false)
126
-            throw new ArchiveExtractionException('Could not extract archive');
125
+        if ($data === false) {
126
+                    throw new ArchiveExtractionException('Could not extract archive');
127
+        }
127 128
 
128 129
         $size = strlen($data);
129 130
         $written = file_put_contents($outputFolder.$this->inArchiveFileName, $data);
Please login to merge, or discard this patch.
src/Drivers/Basic/BasicExtensionDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
 
16 16
     public static function getInstallationInstruction()
17 17
     {
18
-        return 'install [' . static::EXTENSION_NAME . '] php extension';
18
+        return 'install ['.static::EXTENSION_NAME.'] php extension';
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
src/Drivers/Basic/BasicDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         do {
132 132
             $temp_file = tempnam(sys_get_temp_dir(), 'temp_archive');
133 133
             unlink($temp_file);
134
-            $archive_file =  $temp_file . '.' . $format_extension;
134
+            $archive_file = $temp_file.'.'.$format_extension;
135 135
         } while (file_exists($archive_file));
136 136
         $created = static::createArchive($files, $archive_file, $archiveFormat, $compressionLevel, $password, $fileProgressCallable);
137 137
         $string = file_get_contents($archive_file);
Please login to merge, or discard this patch.
src/Drivers/Basic/BasicPureDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
 
16 16
     public static function getInstallationInstruction()
17 17
     {
18
-        return 'install library [ ' . static::PACKAGE_NAME . ']: `composer require ' . static::PACKAGE_NAME . '`';
18
+        return 'install library [ '.static::PACKAGE_NAME.']: `composer require '.static::PACKAGE_NAME.'`';
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
src/UnifiedArchive.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public static function open($fileName, $abilities = [], $password = null)
65 65
     {
66 66
         if (!file_exists($fileName) || !is_readable($fileName)) {
67
-            throw new InvalidArgumentException('Could not open file: ' . $fileName . ' is not readable');
67
+            throw new InvalidArgumentException('Could not open file: '.$fileName.' is not readable');
68 68
         }
69 69
 
70 70
         $format = Formats::detectArchiveFormat($fileName);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         if ($archiveName !== null) {
122 122
             $archiveType = Formats::detectArchiveFormat($archiveName, false);
123 123
             if ($archiveType === false) {
124
-                throw new UnsupportedArchiveException('Could not detect archive type for name "' . $archiveName . '"');
124
+                throw new UnsupportedArchiveException('Could not detect archive type for name "'.$archiveName.'"');
125 125
             }
126 126
         }
127 127
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     )
188 188
     {
189 189
         if (file_exists($archiveName)) {
190
-            throw new FileAlreadyExistsException('Archive ' . $archiveName . ' already exists!');
190
+            throw new FileAlreadyExistsException('Archive '.$archiveName.' already exists!');
191 191
         }
192 192
 
193 193
         $info = static::prepareForArchiving($fileOrFiles, $archiveName);
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     protected static function getCreationDriver($archiveFormat, $inString, $encrypted)
263 263
     {
264 264
         if (!Formats::canCreate($archiveFormat)) {
265
-            throw new UnsupportedArchiveException('Unsupported archive type: ' . $archiveFormat);
265
+            throw new UnsupportedArchiveException('Unsupported archive type: '.$archiveFormat);
266 266
         }
267 267
 
268 268
         $abilities = [BasicDriver::CREATE];
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         if ($encrypted) {
274 274
             if (!Formats::canEncrypt($archiveFormat)) {
275
-                throw new UnsupportedOperationException('Archive type ' . $archiveFormat . ' can not be encrypted');
275
+                throw new UnsupportedOperationException('Archive type '.$archiveFormat.' can not be encrypted');
276 276
             }
277 277
             $abilities[] = BasicDriver::CREATE_ENCRYPTED;
278 278
         }
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         /** @var BasicDriver $driver */
281 281
         $driver = Formats::getFormatDriver($archiveFormat, $abilities);
282 282
         if ($driver === null) {
283
-            throw new UnsupportedArchiveException('Unsupported archive type: ' . $archiveFormat . ' of archive ');
283
+            throw new UnsupportedArchiveException('Unsupported archive type: '.$archiveFormat.' of archive ');
284 284
         }
285 285
         return $driver;
286 286
     }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     public function getFileData($fileName)
472 472
     {
473 473
         if (!in_array($fileName, $this->files, true)) {
474
-            throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive');
474
+            throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive');
475 475
         }
476 476
 
477 477
         return $this->archive->getFileData($fileName);
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
     public function getFileContent($fileName)
488 488
     {
489 489
         if (!in_array($fileName, $this->files, true)) {
490
-            throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive');
490
+            throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive');
491 491
         }
492 492
 
493 493
         return $this->archive->getFileContent($fileName);
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
     public function getFileStream($fileName)
504 504
     {
505 505
         if (!in_array($fileName, $this->files, true)) {
506
-            throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive');
506
+            throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive');
507 507
         }
508 508
 
509 509
         return $this->archive->getFileStream($fileName);
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
     public function addFile($file, $inArchiveName = null)
602 602
     {
603 603
         if (!is_file($file))
604
-            throw new InvalidArgumentException($file . ' is not a valid file to add in archive');
604
+            throw new InvalidArgumentException($file.' is not a valid file to add in archive');
605 605
 
606 606
         return ($inArchiveName !== null
607 607
                 ? $this->add([$inArchiveName => $file])
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
     public function addDirectory($directory, $inArchivePath = null)
636 636
     {
637 637
         if (!is_dir($directory) || !is_readable($directory))
638
-            throw new InvalidArgumentException($directory . ' is not a valid directory to add in archive');
638
+            throw new InvalidArgumentException($directory.' is not a valid directory to add in archive');
639 639
 
640 640
         return ($inArchivePath !== null
641 641
                 ? $this->add([$inArchivePath => $directory])
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
         $newFiles = [];
679 679
         foreach ($files as $file) {
680 680
             foreach ($archiveFiles as $archiveFile) {
681
-                if (fnmatch($file . '*', $archiveFile)) {
681
+                if (fnmatch($file.'*', $archiveFile)) {
682 682
                     $newFiles[] = $archiveFile;
683 683
                 }
684 684
             }
@@ -713,8 +713,8 @@  discard block
 block discarded – undo
713 713
                 if (is_array($source)) {
714 714
                     foreach ($source as $sourceItem) {
715 715
                         static::importFilesFromDir(
716
-                            rtrim($sourceItem, '/\\*') . '/*',
717
-                            !empty($destination) ? $destination . '/' : null,
716
+                            rtrim($sourceItem, '/\\*').'/*',
717
+                            !empty($destination) ? $destination.'/' : null,
718 718
                             true,
719 719
                             $files
720 720
                         );
@@ -722,8 +722,8 @@  discard block
 block discarded – undo
722 722
                 } else if (is_dir($source)) {
723 723
                     // one source for directories
724 724
                     static::importFilesFromDir(
725
-                        rtrim($source, '/\\*') . '/*',
726
-                        !empty($destination) ? $destination . '/' : null,
725
+                        rtrim($source, '/\\*').'/*',
726
+                        !empty($destination) ? $destination.'/' : null,
727 727
                         true,
728 728
                         $files
729 729
                     );
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
         } else if (is_string($nodes)) { // passed one file or directory
736 736
             // if is directory
737 737
             if (is_dir($nodes))
738
-                static::importFilesFromDir(rtrim($nodes, '/\\*') . '/*', null, true,
738
+                static::importFilesFromDir(rtrim($nodes, '/\\*').'/*', null, true,
739 739
                     $files);
740 740
             else if (is_file($nodes))
741 741
                 $files[basename($nodes)] = $nodes;
@@ -760,10 +760,10 @@  discard block
 block discarded – undo
760 760
 
761 761
         foreach (glob($source, GLOB_MARK) as $node) {
762 762
             if (in_array(substr($node, -1), ['/', '\\'], true) && $recursive) {
763
-                static::importFilesFromDir(str_replace('\\', '/', $node) . '*',
764
-                    $destination . basename($node) . '/', $recursive, $map);
763
+                static::importFilesFromDir(str_replace('\\', '/', $node).'*',
764
+                    $destination.basename($node).'/', $recursive, $map);
765 765
             } elseif (is_file($node) && is_readable($node)) {
766
-                $map[$destination . basename($node)] = $node;
766
+                $map[$destination.basename($node)] = $node;
767 767
             }
768 768
         }
769 769
     }
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
     public static function archiveFile($file, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE, $password = null)
961 961
     {
962 962
         if (!is_file($file)) {
963
-            throw new InvalidArgumentException($file . ' is not a valid file to archive');
963
+            throw new InvalidArgumentException($file.' is not a valid file to archive');
964 964
         }
965 965
 
966 966
         return static::create($file, $archiveName, $compressionLevel, $password) === 1;
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
     public static function archiveDirectory($directory, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE, $password = null)
982 982
     {
983 983
         if (!is_dir($directory) || !is_readable($directory))
984
-            throw new InvalidArgumentException($directory . ' is not a valid directory to archive');
984
+            throw new InvalidArgumentException($directory.' is not a valid directory to archive');
985 985
 
986 986
         return static::create($directory, $archiveName, $compressionLevel, $password) > 0;
987 987
     }
Please login to merge, or discard this patch.
Braces   +26 added lines, -19 removed lines patch added patch discarded remove patch
@@ -450,13 +450,15 @@  discard block
 block discarded – undo
450 450
      */
451 451
     public function getFiles($filter = null)
452 452
     {
453
-        if ($filter === null)
454
-            return $this->files;
453
+        if ($filter === null) {
454
+                    return $this->files;
455
+        }
455 456
 
456 457
         $result = [];
457 458
         foreach ($this->files as $file) {
458
-            if (fnmatch($filter, $file))
459
-                $result[] = $file;
459
+            if (fnmatch($filter, $file)) {
460
+                            $result[] = $file;
461
+            }
460 462
         }
461 463
         return $result;
462 464
     }
@@ -600,8 +602,9 @@  discard block
 block discarded – undo
600 602
      */
601 603
     public function addFile($file, $inArchiveName = null)
602 604
     {
603
-        if (!is_file($file))
604
-            throw new InvalidArgumentException($file . ' is not a valid file to add in archive');
605
+        if (!is_file($file)) {
606
+                    throw new InvalidArgumentException($file . ' is not a valid file to add in archive');
607
+        }
605 608
 
606 609
         return ($inArchiveName !== null
607 610
                 ? $this->add([$inArchiveName => $file])
@@ -634,8 +637,9 @@  discard block
 block discarded – undo
634 637
      */
635 638
     public function addDirectory($directory, $inArchivePath = null)
636 639
     {
637
-        if (!is_dir($directory) || !is_readable($directory))
638
-            throw new InvalidArgumentException($directory . ' is not a valid directory to add in archive');
640
+        if (!is_dir($directory) || !is_readable($directory)) {
641
+                    throw new InvalidArgumentException($directory . ' is not a valid directory to add in archive');
642
+        }
639 643
 
640 644
         return ($inArchivePath !== null
641 645
                 ? $this->add([$inArchivePath => $directory])
@@ -698,9 +702,9 @@  discard block
 block discarded – undo
698 702
         if (is_array($nodes)) {
699 703
             foreach ($nodes as $destination => $source) {
700 704
                 // new format
701
-                if (is_numeric($destination))
702
-                    $destination = $source;
703
-                else {
705
+                if (is_numeric($destination)) {
706
+                                    $destination = $source;
707
+                } else {
704 708
                     // old format
705 709
                     if (is_string($source) && !file_exists($source)) {
706 710
                         list($destination, $source) = [$source, $destination];
@@ -734,11 +738,12 @@  discard block
 block discarded – undo
734 738
 
735 739
         } else if (is_string($nodes)) { // passed one file or directory
736 740
             // if is directory
737
-            if (is_dir($nodes))
738
-                static::importFilesFromDir(rtrim($nodes, '/\\*') . '/*', null, true,
741
+            if (is_dir($nodes)) {
742
+                            static::importFilesFromDir(rtrim($nodes, '/\\*') . '/*', null, true,
739 743
                     $files);
740
-            else if (is_file($nodes))
741
-                $files[basename($nodes)] = $nodes;
744
+            } else if (is_file($nodes)) {
745
+                            $files[basename($nodes)] = $nodes;
746
+            }
742 747
         }
743 748
 
744 749
         return $files;
@@ -755,8 +760,9 @@  discard block
 block discarded – undo
755 760
         // $map[$destination] = rtrim($source, '/*');
756 761
         // do not map root archive folder
757 762
 
758
-        if ($destination !== null)
759
-            $map[$destination] = null;
763
+        if ($destination !== null) {
764
+                    $map[$destination] = null;
765
+        }
760 766
 
761 767
         foreach (glob($source, GLOB_MARK) as $node) {
762 768
             if (in_array(substr($node, -1), ['/', '\\'], true) && $recursive) {
@@ -980,8 +986,9 @@  discard block
 block discarded – undo
980 986
      */
981 987
     public static function archiveDirectory($directory, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE, $password = null)
982 988
     {
983
-        if (!is_dir($directory) || !is_readable($directory))
984
-            throw new InvalidArgumentException($directory . ' is not a valid directory to archive');
989
+        if (!is_dir($directory) || !is_readable($directory)) {
990
+                    throw new InvalidArgumentException($directory . ' is not a valid directory to archive');
991
+        }
985 992
 
986 993
         return static::create($directory, $archiveName, $compressionLevel, $password) > 0;
987 994
     }
Please login to merge, or discard this patch.
src/Commands/CreateCommand.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $password = $input->getOption('password');
54 54
         $compression = $input->getOption('compression');
55 55
         if (!isset(static::$compressionLevels[$compression])) {
56
-            throw new \InvalidArgumentException('Compression "' . $compression . '" is not valid');
56
+            throw new \InvalidArgumentException('Compression "'.$compression.'" is not valid');
57 57
         }
58 58
         $compression = static::$compressionLevels[$compression];
59 59
         $path = $input->getOption('path');
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
         if (file_exists($archive_file)) {
68 68
             if (is_dir($archive_file))
69
-                throw new \InvalidArgumentException($archive_file . ' is a directory!');
69
+                throw new \InvalidArgumentException($archive_file.' is a directory!');
70 70
             else {
71
-                throw new \InvalidArgumentException('File "' . $archive_file . '" already exists!');
71
+                throw new \InvalidArgumentException('File "'.$archive_file.'" already exists!');
72 72
             }
73 73
         }
74 74
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                     $files_list[$destination] = $file_to_pack;
83 83
                     if (!$stdout) {
84 84
                         $output->writeln(
85
-                            '<comment>' . $file_to_pack . ' => ' . $destination . '</comment>',
85
+                            '<comment>'.$file_to_pack.' => '.$destination.'</comment>',
86 86
                             OutputInterface::VERBOSITY_VERBOSE
87 87
                         );
88 88
                     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                     if (is_dir($file_to_pack)) {
92 92
                         if (!$stdout) {
93 93
                             $output->writeln(
94
-                                '<comment>' . $file_to_pack . ' => root</comment>',
94
+                                '<comment>'.$file_to_pack.' => root</comment>',
95 95
                                 OutputInterface::VERBOSITY_VERBOSE
96 96
                             );
97 97
                         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     } else {
106 106
                         if (!$stdout) {
107 107
                             $output->writeln(
108
-                                '<comment>' . $file_to_pack . ' => ' . basename($file_to_pack) . '</comment>',
108
+                                '<comment>'.$file_to_pack.' => '.basename($file_to_pack).'</comment>',
109 109
                                 OutputInterface::VERBOSITY_VERBOSE
110 110
                             );
111 111
                         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                     $files_list[$destination] = $file_to_pack;
118 118
                     if (!$stdout) {
119 119
                         $output->writeln(
120
-                            '<comment>' . $file_to_pack . ' => ' . $destination . '</comment>',
120
+                            '<comment>'.$file_to_pack.' => '.$destination.'</comment>',
121 121
                             OutputInterface::VERBOSITY_VERBOSE
122 122
                         );
123 123
                     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                     $files_list[$destination] = $file_to_pack;
128 128
                     if (!$stdout) {
129 129
                         $output->writeln(
130
-                            '<comment>' . $file_to_pack . ' => ' . $destination . '</comment>',
130
+                            '<comment>'.$file_to_pack.' => '.$destination.'</comment>',
131 131
                             OutputInterface::VERBOSITY_VERBOSE
132 132
                         );
133 133
                     }
@@ -137,16 +137,16 @@  discard block
 block discarded – undo
137 137
 
138 138
         $information = UnifiedArchive::prepareForArchiving($files_list, $archive_file);
139 139
         if ($dry_run) {
140
-            $output->writeln('Format: <info>' . $information['type'] . '</info>');
141
-            $output->writeln('Original size: <info>' . implode($this->formatSize($information['totalSize'])) . '</info>');
142
-            $output->writeln('Files: <info>' . $information['numberOfFiles'] . '</info>');
140
+            $output->writeln('Format: <info>'.$information['type'].'</info>');
141
+            $output->writeln('Original size: <info>'.implode($this->formatSize($information['totalSize'])).'</info>');
142
+            $output->writeln('Files: <info>'.$information['numberOfFiles'].'</info>');
143 143
             foreach ($information['files'] as $destination => $source) {
144 144
                 // is folder
145 145
                 if ($source === null) {
146 146
                     continue;
147 147
                 }
148 148
 
149
-                $output->writeln($source . ' => <comment>' . $destination . '</comment>');
149
+                $output->writeln($source.' => <comment>'.$destination.'</comment>');
150 150
             }
151 151
             return 0;
152 152
         }
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
         $progressBar = new ProgressBar($output, $information['numberOfFiles']);
160 160
         $progressBar->setFormat('archiving');
161 161
         $progressBar->start();
162
-        $archived_files = UnifiedArchive::create($files_list, $archive_file, $compression, $password, function ($currentFile, $totalFiles, $fsFilename, $archiveFilename)
162
+        $archived_files = UnifiedArchive::create($files_list, $archive_file, $compression, $password, function($currentFile, $totalFiles, $fsFilename, $archiveFilename)
163 163
         use ($progressBar) {
164 164
             if ($fsFilename === null) {
165
-                $progressBar->setMessage('Creating ' . $archiveFilename);
165
+                $progressBar->setMessage('Creating '.$archiveFilename);
166 166
             } else {
167 167
                 $progressBar->setMessage($fsFilename);
168 168
             }
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
         }
183 183
 
184 184
         $output->writeln(
185
-            'Created <info>' . $archive_file . '</info> with <comment>' . $archived_files . '</comment> file(s) ('
186
-            . implode($this->formatSize($archive->getOriginalSize())) . ') of total size '
185
+            'Created <info>'.$archive_file.'</info> with <comment>'.$archived_files.'</comment> file(s) ('
186
+            . implode($this->formatSize($archive->getOriginalSize())).') of total size '
187 187
             . implode($this->formatSize(filesize($archive_file)))
188 188
         );
189 189
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
         $stdout = $input->getOption('stdout');
66 66
 
67 67
         if (file_exists($archive_file)) {
68
-            if (is_dir($archive_file))
69
-                throw new \InvalidArgumentException($archive_file . ' is a directory!');
70
-            else {
68
+            if (is_dir($archive_file)) {
69
+                            throw new \InvalidArgumentException($archive_file . ' is a directory!');
70
+            } else {
71 71
                 throw new \InvalidArgumentException('File "' . $archive_file . '" already exists!');
72 72
             }
73 73
         }
Please login to merge, or discard this patch.
src/Formats.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,8 +137,9 @@
 block discarded – undo
137 137
                 $complex_ext = substr($fileName, $sld_offset + 1);
138 138
                 if (isset(static::$twoLevelExtensions[$complex_ext])) {
139 139
                     return static::$twoLevelExtensions[$complex_ext];
140
-                } else
141
-                exit;
140
+                } else {
141
+                                exit;
142
+                }
142 143
             }
143 144
             if (isset(static::$oneLevelExtensions[$ext])) {
144 145
                 return static::$oneLevelExtensions[$ext];
Please login to merge, or discard this patch.