Passed
Push — master ( 77631b...eb0eba )
by f
01:48
created
src/UnifiedArchive.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public static function open($fileName, $password = null)
56 56
     {
57 57
         if (!file_exists($fileName) || !is_readable($fileName)) {
58
-            throw new InvalidArgumentException('Could not open file: ' . $fileName.' is not readable');
58
+            throw new InvalidArgumentException('Could not open file: '.$fileName.' is not readable');
59 59
         }
60 60
 
61 61
         $format = Formats::detectArchiveFormat($fileName);
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     public function getFileData($fileName)
266 266
     {
267 267
         if (!in_array($fileName, $this->files, true)) {
268
-            throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive');
268
+            throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive');
269 269
         }
270 270
 
271 271
         return $this->archive->getFileData($fileName);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     public function getFileContent($fileName)
282 282
     {
283 283
         if (!in_array($fileName, $this->files, true)) {
284
-            throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive');
284
+            throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive');
285 285
         }
286 286
 
287 287
         return $this->archive->getFileContent($fileName);
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     public function getFileStream($fileName)
298 298
     {
299 299
         if (!in_array($fileName, $this->files, true)) {
300
-            throw new NonExistentArchiveFileException('File ' . $fileName . ' does not exist in archive');
300
+            throw new NonExistentArchiveFileException('File '.$fileName.' does not exist in archive');
301 301
         }
302 302
 
303 303
         return $this->archive->getFileStream($fileName);
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
     public static function archiveFile($file, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE, $password = null)
539 539
     {
540 540
         if (!is_file($file)) {
541
-            throw new InvalidArgumentException($file . ' is not a valid file to archive');
541
+            throw new InvalidArgumentException($file.' is not a valid file to archive');
542 542
         }
543 543
 
544 544
         return static::archiveFiles($file, $archiveName, $compressionLevel, $password) === 1;
Please login to merge, or discard this patch.
src/CamApplication.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function checkFormats()
32 32
     {
33 33
         echo "format\topen\tstream\tcreate\tappend\tupdate\tencrypt\tdrivers".PHP_EOL;
34
-        foreach(Formats::getFormatsReport() as $format => $config) {
34
+        foreach (Formats::getFormatsReport() as $format => $config) {
35 35
             echo $format."\t"
36 36
                 .($config['open'] ? '+' : '-')."\t"
37 37
                 .($config['stream'] ? '+' : '-')."\t"
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             if (!empty($install)) {
56 56
                 $notInstalled[] = [$driverClass, $description, $install];
57 57
             } else {
58
-                echo ($i++) . '. ' . $driverClass . ' - ' . $description . PHP_EOL;
58
+                echo ($i++).'. '.$driverClass.' - '.$description.PHP_EOL;
59 59
             }
60 60
         }
61 61
 
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
             echo PHP_EOL.'Not installed:'.PHP_EOL;
64 64
             $i = 1;
65 65
             foreach ($notInstalled as $data) {
66
-                echo ($i++) . '. ' . $data[0] . ' - ' . $data[1] . PHP_EOL
67
-                    . '- ' . $data[2] . PHP_EOL.PHP_EOL;
66
+                echo ($i++).'. '.$data[0].' - '.$data[1].PHP_EOL
67
+                    . '- '.$data[2].PHP_EOL.PHP_EOL;
68 68
             }
69 69
         }
70 70
     }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         echo str_repeat('-', $width).PHP_EOL;
101 101
         foreach ($archive->getFileNames($filter) as $file) {
102 102
             $info = $archive->getFileData($file);
103
-            $file_name = strlen($file) > $name_width ? substr($file, 0, $name_width-2).'..' : $file;
103
+            $file_name = strlen($file) > $name_width ? substr($file, 0, $name_width - 2).'..' : $file;
104 104
             echo sprintf('%-'.$name_width.'s | %8s | %8s | %18s'.PHP_EOL,
105 105
                 $file_name,
106 106
                 implode(null, $this->formatSize($info->compressedSize, 3)),
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         else {
308 308
             $size = $this->formatSize($len);
309 309
             echo sprintf('Added %s(%1.1f%s) file to %s',
310
-                    $args['FILE_IN_ARCHIVE'], $size[0], $size[1], $args['ARCHIVE']) . PHP_EOL;
310
+                    $args['FILE_IN_ARCHIVE'], $size[0], $size[1], $args['ARCHIVE']).PHP_EOL;
311 311
         }
312 312
     }
313 313
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                     $archive = UnifiedArchive::open($args['ARCHIVE']);
348 348
                     $archive->setComment($args['--comment']);
349 349
                 }
350
-                echo 'Created archive ' . $args['ARCHIVE'] . ' with ' . $archived_files . ' file(s) of total size ' . implode('', $this->formatSize(filesize($args['ARCHIVE']))) . PHP_EOL;
350
+                echo 'Created archive '.$args['ARCHIVE'].' with '.$archived_files.' file(s) of total size '.implode('', $this->formatSize(filesize($args['ARCHIVE']))).PHP_EOL;
351 351
             }
352 352
         }
353 353
     }
Please login to merge, or discard this patch.