@@ -87,8 +87,9 @@ |
||
87 | 87 | : $this->zip->getEntries(); |
88 | 88 | |
89 | 89 | foreach ($files as $info) { |
90 | - if (method_exists($info, 'isFolder') ? $info->isFolder() : $info->isDirectory()) |
|
91 | - continue; |
|
90 | + if (method_exists($info, 'isFolder') ? $info->isFolder() : $info->isDirectory()) { |
|
91 | + continue; |
|
92 | + } |
|
92 | 93 | |
93 | 94 | $this->files[] = $information->files[] = str_replace('\\', '/', $info->getName()); |
94 | 95 | $information->compressedFilesSize += $info->getCompressedSize(); |
@@ -31,11 +31,11 @@ |
||
31 | 31 | $archive = $this->getArchive($input, $output); |
32 | 32 | |
33 | 33 | if (disk_free_space($output_dir) < $archive->getOriginalSize()) { |
34 | - throw new \LogicException('Archive size ' . implode($this->formatSize($archive->getOriginalSize())) . ' is more that available on disk ' |
|
34 | + throw new \LogicException('Archive size '.implode($this->formatSize($archive->getOriginalSize())).' is more that available on disk ' |
|
35 | 35 | . implode($this->formatSize(disk_free_space($output_dir)))); |
36 | 36 | } |
37 | 37 | $archive->extract($output_dir, $entry_selector, true); |
38 | - $output->writeln('<info>Extracted all archive contents (' . implode($this->formatSize($archive->getOriginalSize())) . ')</info>'); |
|
38 | + $output->writeln('<info>Extracted all archive contents ('.implode($this->formatSize($archive->getOriginalSize())).')</info>'); |
|
39 | 39 | |
40 | 40 | return 0; |
41 | 41 | } |
@@ -60,17 +60,17 @@ |
||
60 | 60 | foreach ($archive->getFiles($filter) as $file) { |
61 | 61 | $details = $archive->getFileData($file); |
62 | 62 | $output->writeln(($details->isCompressed && $details->uncompressedSize > 0 ? 'x' : '-') |
63 | - . ' ' . str_pad( |
|
63 | + . ' '.str_pad( |
|
64 | 64 | $human_readable_size ? implode($this->formatSize($details->uncompressedSize)) : $details->uncompressedSize, |
65 | 65 | $uncomp_size_length, |
66 | 66 | ' ', |
67 | 67 | STR_PAD_LEFT) |
68 | - . ' ' . str_pad( |
|
68 | + . ' '.str_pad( |
|
69 | 69 | $human_readable_size ? implode($this->formatSize($details->compressedSize)) : $details->compressedSize, |
70 | 70 | $comp_size_length, |
71 | 71 | ' ', |
72 | 72 | STR_PAD_LEFT) |
73 | - . ' ' . $this->formatDateShort($details->modificationTime) . ' ' . $details->path); |
|
73 | + . ' '.$this->formatDateShort($details->modificationTime).' '.$details->path); |
|
74 | 74 | } |
75 | 75 | } else { |
76 | 76 | foreach ($archive->getFiles($filter) as $file) { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | list($archive, $file) = $this->getArchiveAndFile($input, $output); |
34 | 34 | |
35 | 35 | $archive->delete($file); |
36 | - $output->writeln('<comment>- file "' . $file . '"</comment>'); |
|
36 | + $output->writeln('<comment>- file "'.$file.'"</comment>'); |
|
37 | 37 | |
38 | 38 | return 0; |
39 | 39 | } |
@@ -33,7 +33,7 @@ |
||
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 | } |
@@ -29,7 +29,7 @@ |
||
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 | /** |
@@ -122,8 +122,9 @@ |
||
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); |
@@ -50,14 +50,14 @@ |
||
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); |
60 | - $this->inArchiveFileName = basename($archiveFileName, '.' . $suffix); |
|
60 | + $this->inArchiveFileName = basename($archiveFileName, '.'.$suffix); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -15,6 +15,6 @@ |
||
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 | } |
@@ -131,7 +131,7 @@ |
||
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); |