Passed
Push — master ( 125b29...554a92 )
by f
27:06 queued 12:02
created
src/Drivers/OneFile/OneFileDriver.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
     public static function getInstallationInstruction()
33 33
     {
34
-        return 'install `' . static::PHP_EXTENSION . '` extension';
34
+        return 'install `'.static::PHP_EXTENSION.'` extension';
35 35
     }
36 36
 
37 37
     public static function getSupportedFormats()
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,10 +59,12 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function __construct($archiveFileName, $format, $password = null)
61 61
     {
62
-        if (static::FORMAT_SUFFIX === null)
63
-            throw new \Exception('Format should be initialized');
64
-        if ($password !== null)
65
-            throw new UnsupportedOperationException(self::FORMAT_SUFFIX.' archive does not support password!');
62
+        if (static::FORMAT_SUFFIX === null) {
63
+                    throw new \Exception('Format should be initialized');
64
+        }
65
+        if ($password !== null) {
66
+                    throw new UnsupportedOperationException(self::FORMAT_SUFFIX.' archive does not support password!');
67
+        }
66 68
 
67 69
         parent::__construct($archiveFileName, $format);
68 70
 
@@ -131,8 +133,9 @@  discard block
 block discarded – undo
131 133
     public function extractArchive($outputFolder)
132 134
     {
133 135
         $data = $this->getFileContent($this->inArchiveFileName);
134
-        if ($data === false)
135
-            throw new ArchiveExtractionException('Could not extract archive');
136
+        if ($data === false) {
137
+                    throw new ArchiveExtractionException('Could not extract archive');
138
+        }
136 139
 
137 140
         $size = strlen($data);
138 141
         $written = file_put_contents($outputFolder.$this->inArchiveFileName, $data);
Please login to merge, or discard this patch.
src/Drivers/OneFile/Lzma.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  */
14 14
 class Lzma extends OneFileDriver
15 15
 {
16
-    const FORMAT_SUFFIX =  'xz';
16
+    const FORMAT_SUFFIX = 'xz';
17 17
     const PHP_EXTENSION = 'xz';
18 18
     const FORMAT = Formats::LZMA;
19 19
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public static function getInstallationInstruction()
32 32
     {
33
-        return 'install [xz] 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
+        return 'install [xz] extension'."\n".'For 5.x: https://github.com/payden/php-xz'."\n".'For 7.x/8.x: https://github.com/codemasher/php-ext-xz';
34 34
     }
35 35
 
36 36
     /**
Please login to merge, or discard this patch.
src/Drivers/Cab.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,9 @@
 block discarded – undo
82 82
     public function __construct($archiveFileName, $format, $password = null)
83 83
     {
84 84
         parent::__construct($archiveFileName, $format);
85
-        if ($password !== null)
86
-            throw new UnsupportedOperationException('Cab archive does not support password!');
85
+        if ($password !== null) {
86
+                    throw new UnsupportedOperationException('Cab archive does not support password!');
87
+        }
87 88
         $this->open($archiveFileName);
88 89
     }
89 90
 
Please login to merge, or discard this patch.
src/Commands/TestCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
         $errored = [];
29 29
         foreach ($files as $file) {
30
-            $output->write($file . ' ... ');
30
+            $output->write($file.' ... ');
31 31
             if ($archive->test($file) === true) {
32 32
                 $output->writeln('<info>ok</info>');
33 33
             } else {
Please login to merge, or discard this patch.
src/Commands/InfoCommand.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@
 block discarded – undo
27 27
         $file = realpath($input->getArgument('archive'));
28 28
         $archive = $this->getArchive($input, $output);
29 29
 
30
-        $output->writeln('Filename: ' . $file . ' (changed <comment>' . $this->formatDate(filemtime($file)) . '</comment>)');
31
-        $output->writeln('Type: <info>' . $archive->getFormat() . '</info>, mime <info>' . $archive->getMimeType() . '</info> (via driver <comment>' . $archive->getDriverType() . '</comment>)');
32
-        $output->writeln('Contains: ' . $archive->countFiles() . ' file' . ($archive->countFiles() > 1 ? 's' : null));
30
+        $output->writeln('Filename: '.$file.' (changed <comment>'.$this->formatDate(filemtime($file)).'</comment>)');
31
+        $output->writeln('Type: <info>'.$archive->getFormat().'</info>, mime <info>'.$archive->getMimeType().'</info> (via driver <comment>'.$archive->getDriverType().'</comment>)');
32
+        $output->writeln('Contains: '.$archive->countFiles().' file'.($archive->countFiles() > 1 ? 's' : null));
33 33
         $output->writeln('Size:');
34
-        $output->writeln("\t". 'uncompressed: '.implode(' ', $this->formatSize($archive->getOriginalSize(), 2)));
35
-        $output->writeln("\t" . 'compressed: ' . implode(' ', $this->formatSize($archive->getCompressedSize(), 2)));
36
-        $output->writeln("\t" . 'ratio: <info>' . round($archive->getOriginalSize() / $archive->getCompressedSize(), 6) . '/1 (' . floor($archive->getCompressedSize() / $archive->getOriginalSize() * 100) . '%</info>)');
34
+        $output->writeln("\t".'uncompressed: '.implode(' ', $this->formatSize($archive->getOriginalSize(), 2)));
35
+        $output->writeln("\t".'compressed: '.implode(' ', $this->formatSize($archive->getCompressedSize(), 2)));
36
+        $output->writeln("\t".'ratio: <info>'.round($archive->getOriginalSize() / $archive->getCompressedSize(), 6).'/1 ('.floor($archive->getCompressedSize() / $archive->getOriginalSize() * 100).'%</info>)');
37 37
         if ($archive->getDriver()->checkAbility(BasicDriver::GET_COMMENT) && !empty($comment = $archive->getComment()))
38
-            $output->writeln('Comment: <comment>' . $comment . '</comment>');
38
+            $output->writeln('Comment: <comment>'.$comment.'</comment>');
39 39
 
40 40
         return 0;
41 41
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
         $output->writeln("\t". 'uncompressed: '.implode(' ', $this->formatSize($archive->getOriginalSize(), 2)));
35 35
         $output->writeln("\t" . 'compressed: ' . implode(' ', $this->formatSize($archive->getCompressedSize(), 2)));
36 36
         $output->writeln("\t" . 'ratio: <info>' . round($archive->getOriginalSize() / $archive->getCompressedSize(), 6) . '/1 (' . floor($archive->getCompressedSize() / $archive->getOriginalSize() * 100) . '%</info>)');
37
-        if ($archive->getDriver()->checkAbility(BasicDriver::GET_COMMENT) && !empty($comment = $archive->getComment()))
38
-            $output->writeln('Comment: <comment>' . $comment . '</comment>');
37
+        if ($archive->getDriver()->checkAbility(BasicDriver::GET_COMMENT) && !empty($comment = $archive->getComment())) {
38
+                    $output->writeln('Comment: <comment>' . $comment . '</comment>');
39
+        }
39 40
 
40 41
         return 0;
41 42
     }
Please login to merge, or discard this patch.
src/Commands/FormatsCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
         if ($driver !== null) {
34 34
             $driver = $this->resolveDriverName($driver);
35 35
             if (!class_exists($driver) || !is_a($driver, BasicDriver::class, true)) {
36
-                throw new \InvalidArgumentException('Class "' . $driver . '" not found or not in BasicDriver children');
36
+                throw new \InvalidArgumentException('Class "'.$driver.'" not found or not in BasicDriver children');
37 37
             }
38
-            $output->writeln('Supported formats by <info>' . $driver . '</info>');
38
+            $output->writeln('Supported formats by <info>'.$driver.'</info>');
39 39
 
40 40
             $table->setHeaders(['format', ...array_keys(self::$abilitiesLabels)]);
41 41
             foreach ($driver::getSupportedFormats() as $i => $format) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $table->render();
87 87
 
88 88
         foreach (array_combine(array_values(self::$abilitiesShortCuts), array_keys(self::$abilitiesLabels)) as $shortCut => $label) {
89
-            $output->writeln('<info>' . $shortCut . '</info> - ' . $label);
89
+            $output->writeln('<info>'.$shortCut.'</info> - '.$label);
90 90
         }
91 91
 
92 92
         return 0;
Please login to merge, or discard this patch.
src/Commands/DriversCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 if ($typeDriverConfig[1]) {
64 64
 //                    $type_messages[] = '<info>' . $typeDriverClass . '</info>: ' . $typeDriverConfig[0];
65 65
                     $table->setRow($i++, [
66
-                        '<info>' . $this->getDriverBaseName($typeDriverClass) . '</info>',
66
+                        '<info>'.$this->getDriverBaseName($typeDriverClass).'</info>',
67 67
                         BasicDriver::$typeLabels[$typeDriverClass::TYPE],
68 68
                         $typeDriverConfig[0],
69 69
                     ]);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 //                    $type_messages[] = '<error>' . $typeDriverClass . '</error>: ' . $typeDriverConfig[0];
72 72
 //                    $type_messages[] = $this->formatInstallation($typeDriverConfig[2], 4);
73 73
                     $table->setRow($i++, [
74
-                        '<comment>' . $this->getDriverBaseName($typeDriverClass) . '</comment>',
74
+                        '<comment>'.$this->getDriverBaseName($typeDriverClass).'</comment>',
75 75
                         BasicDriver::$typeLabels[$typeDriverClass::TYPE],
76 76
                         $this->formatInstallation($typeDriverConfig[2], 0),
77 77
                     ]);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     protected function formatInstallation($doc, $leftPadding = 4)
95 95
     {
96 96
         return implode("\n", array_map(
97
-            function($line) use ($leftPadding) { return str_repeat(' ', $leftPadding) . $line; },
97
+            function($line) use ($leftPadding) { return str_repeat(' ', $leftPadding).$line; },
98 98
             explode(
99 99
                 "\n",
100 100
                 preg_replace('~`(.+?)`~', '<options=bold,underscore>$1</>', $doc)
Please login to merge, or discard this patch.