Passed
Push — 1.1.x ( bc52f7...e8e75c )
by f
12:04
created
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.
src/Drivers/Iso.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
                     $this->files[$file->Location] = $directory.$file->strd_FileId;
137 137
                     $this->filesSize += $file->DataLen;
138 138
 
139
-                    $this->filesData[$directory . $file->strd_FileId] =
139
+                    $this->filesData[$directory.$file->strd_FileId] =
140 140
                         [
141 141
                             'size' => $file->DataLen,
142 142
                             'mtime' =>
143
-                                strtotime((string)$file->isoRecDate),
143
+                                strtotime((string) $file->isoRecDate),
144 144
                         ];
145 145
                 }
146 146
             }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     public function extractFiles($outputFolder, array $files)
243 243
     {
244 244
         foreach ($files as $file) {
245
-            $destination_file = rtrim($outputFolder, '/'). '/' . ltrim($file, '/');
245
+            $destination_file = rtrim($outputFolder, '/').'/'.ltrim($file, '/');
246 246
             $destination_dir = dirname($destination_file);
247 247
 
248 248
             if (!empty($destination_dir)) {
Please login to merge, or discard this patch.
Braces   +18 added lines, -11 removed lines patch added patch discarded remove patch
@@ -84,8 +84,9 @@  discard block
 block discarded – undo
84 84
     {
85 85
         parent::__construct($archiveFileName, $format);
86 86
         $this->open($archiveFileName);
87
-        if ($password !== null)
88
-            throw new UnsupportedOperationException('Iso archive does not support password!');
87
+        if ($password !== null) {
88
+                    throw new UnsupportedOperationException('Iso archive does not support password!');
89
+        }
89 90
     }
90 91
 
91 92
     /**
@@ -108,8 +109,9 @@  discard block
 block discarded – undo
108 109
 
109 110
         /** @var \CVolumeDescriptor $usedDesc */
110 111
         $usedDesc = $this->iso->GetDescriptor(SUPPLEMENTARY_VOLUME_DESC);
111
-        if (!$usedDesc)
112
-            $usedDesc = $this->iso->GetDescriptor(PRIMARY_VOLUME_DESC);
112
+        if (!$usedDesc) {
113
+                    $usedDesc = $this->iso->GetDescriptor(PRIMARY_VOLUME_DESC);
114
+        }
113 115
         $this->blockSize = $usedDesc->iBlockSize;
114 116
         $directories = $usedDesc->LoadMPathTable($this->iso);
115 117
         // iterate over all directories
@@ -131,8 +133,9 @@  discard block
 block discarded – undo
131 133
             if ($files) {
132 134
                 /** @var \CFileDirDescriptors $file */
133 135
                 foreach ($files as $file) {
134
-                    if (in_array($file->strd_FileId, ['.', '..']) || $file->IsDirectory())
135
-                        continue;
136
+                    if (in_array($file->strd_FileId, ['.', '..']) || $file->IsDirectory()) {
137
+                                            continue;
138
+                    }
136 139
                     $this->files[$file->Location] = $directory.$file->strd_FileId;
137 140
                     $this->filesSize += $file->DataLen;
138 141
 
@@ -184,8 +187,9 @@  discard block
 block discarded – undo
184 187
      */
185 188
     public function getFileData($fileName)
186 189
     {
187
-        if (!isset($this->filesData[$fileName]))
188
-            return false;
190
+        if (!isset($this->filesData[$fileName])) {
191
+                    return false;
192
+        }
189 193
 
190 194
         return new ArchiveEntry(
191 195
             $fileName,
@@ -225,11 +229,14 @@  discard block
 block discarded – undo
225 229
     protected function prepareForFileExtracting($fileName)
226 230
     {
227 231
         $Location = array_search($fileName, $this->files, true);
228
-        if (!isset($this->filesData[$fileName])) return false;
232
+        if (!isset($this->filesData[$fileName])) {
233
+         return false;
234
+        }
229 235
         $data = $this->filesData[$fileName];
230 236
         $Location_Real = $Location * $this->blockSize;
231
-        if ($this->iso->Seek($Location_Real, SEEK_SET) === false)
232
-            return false;
237
+        if ($this->iso->Seek($Location_Real, SEEK_SET) === false) {
238
+                    return false;
239
+        }
233 240
         return $data;
234 241
     }
235 242
 
Please login to merge, or discard this patch.
src/Drivers/NelexaZip.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,9 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.