@@ -64,7 +64,7 @@ discard block |
||
| 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); |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | public function getFileData($fileName) |
| 288 | 288 | { |
| 289 | 289 | if (!in_array($fileName, $this->files, true)) { |
| 290 | - throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive'); |
|
| 290 | + throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive'); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | return $this->archive->getFileData($fileName); |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | public function getFileContent($fileName) |
| 304 | 304 | { |
| 305 | 305 | if (!in_array($fileName, $this->files, true)) { |
| 306 | - throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive'); |
|
| 306 | + throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive'); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | return $this->archive->getFileContent($fileName); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | public function getFileStream($fileName) |
| 320 | 320 | { |
| 321 | 321 | if (!in_array($fileName, $this->files, true)) { |
| 322 | - throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive'); |
|
| 322 | + throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive'); |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | return $this->archive->getFileStream($fileName); |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | /** @var BasicDriver $driver */ |
| 583 | 583 | $driver = Formats::getFormatDriver($info['type'], $abilities); |
| 584 | 584 | if ($driver === null) { |
| 585 | - throw new UnsupportedArchiveException('Unsupported archive type: ' . $info['type'] . ' of archive '); |
|
| 585 | + throw new UnsupportedArchiveException('Unsupported archive type: '.$info['type'].' of archive '); |
|
| 586 | 586 | } |
| 587 | 587 | |
| 588 | 588 | return $driver::createArchive( |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | public static function archiveFile($file, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE, $password = null) |
| 610 | 610 | { |
| 611 | 611 | if (!is_file($file)) { |
| 612 | - throw new InvalidArgumentException($file . ' is not a valid file to archive'); |
|
| 612 | + throw new InvalidArgumentException($file.' is not a valid file to archive'); |
|
| 613 | 613 | } |
| 614 | 614 | |
| 615 | 615 | return static::archiveFiles($file, $archiveName, $compressionLevel, $password) === 1; |
@@ -680,8 +680,8 @@ discard block |
||
| 680 | 680 | if (is_array($source)) { |
| 681 | 681 | foreach ($source as $sourceItem) { |
| 682 | 682 | static::importFilesFromDir( |
| 683 | - rtrim($sourceItem, '/\\*') . '/*', |
|
| 684 | - !empty($destination) ? $destination . '/' : null, |
|
| 683 | + rtrim($sourceItem, '/\\*').'/*', |
|
| 684 | + !empty($destination) ? $destination.'/' : null, |
|
| 685 | 685 | true, |
| 686 | 686 | $files |
| 687 | 687 | ); |
@@ -689,8 +689,8 @@ discard block |
||
| 689 | 689 | } else if (is_dir($source)) { |
| 690 | 690 | // one source for directories |
| 691 | 691 | static::importFilesFromDir( |
| 692 | - rtrim($source, '/\\*') . '/*', |
|
| 693 | - !empty($destination) ? $destination . '/' : null, |
|
| 692 | + rtrim($source, '/\\*').'/*', |
|
| 693 | + !empty($destination) ? $destination.'/' : null, |
|
| 694 | 694 | true, |
| 695 | 695 | $files |
| 696 | 696 | ); |