Completed
Push — master ( c5a3b4...fa0d52 )
by Arne
01:49
created
src/Operation/UploadOperation.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
             fclose($localStream);
30 30
 
31 31
             return true;
32
-        }
33
-        catch (Exception $exception)
32
+        } catch (Exception $exception)
34 33
         {
35 34
             return false;
36 35
         }
Please login to merge, or discard this patch.
src/Index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
             if ($parent === null)
39 39
             {
40 40
                 throw new Exception();
41
-            }
42
-            elseif (!$parent->isDirectory())
41
+            } elseif (!$parent->isDirectory())
43 42
             {
44 43
                 throw new Exception();
45 44
             }
Please login to merge, or discard this patch.
src/Cli/Command/AbstractCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
             if ($input->getOption('config'))
47 47
             {
48 48
                 $this->config = $reader->getConfiguration($input->getOption('config'));
49
-            }
50
-            elseif (is_file('archivr.json'))
49
+            } elseif (is_file('archivr.json'))
51 50
             {
52 51
                 $this->config = $reader->getConfiguration('archivr.json');
53 52
             }
Please login to merge, or discard this patch.
src/Cli/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class Application extends \Symfony\Component\Console\Application
6 6
 {
7
-    const LOGO =  <<<TXT
7
+    const LOGO = <<<TXT
8 8
    ___           __   _      ___ 
9 9
   / _ | ________/ /  (_)  __/ _ \
10 10
  / __ |/ __/ __/ _ \/ / |/ / , _/
Please login to merge, or discard this patch.
src/Cli/Command/DumpCommand.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
         $archivr = new ArchivR($configuration);
28 28
         $archivr->dump(
29 29
             $input->getArgument('path'),
30
-            $input->getOption(  'revision') ? (int)$input->getOption('revision') : null,
30
+            $input->getOption('revision') ? (int)$input->getOption('revision') : null,
31 31
             $input->getOption('vault'),
32 32
             new SynchronizationProgressListener($output)
33 33
         );
Please login to merge, or discard this patch.
src/Compiler.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,12 +106,10 @@  discard block
 block discarded – undo
106 106
             if (is_string($token))
107 107
             {
108 108
                 $output .= $token;
109
-            }
110
-            elseif (in_array($token[0], [T_COMMENT, T_DOC_COMMENT]))
109
+            } elseif (in_array($token[0], [T_COMMENT, T_DOC_COMMENT]))
111 110
             {
112 111
                 $output .= str_repeat("\n", substr_count($token[1], "\n"));
113
-            }
114
-            elseif (T_WHITESPACE === $token[0])
112
+            } elseif (T_WHITESPACE === $token[0])
115 113
             {
116 114
                 // reduce wide spaces
117 115
                 $whitespace = preg_replace('{[ \t]+}', ' ', $token[1]);
@@ -123,8 +121,7 @@  discard block
 block discarded – undo
123 121
                 $whitespace = preg_replace('{\n +}', "\n", $whitespace);
124 122
 
125 123
                 $output .= $whitespace;
126
-            }
127
-            else
124
+            } else
128 125
             {
129 126
                 $output .= $token[1];
130 127
             }
Please login to merge, or discard this patch.
src/IndexObject.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -173,17 +173,14 @@
 block discarded – undo
173 173
         {
174 174
             $object->type = static::TYPE_FILE;
175 175
             $object->size = (int)$stat['size'];
176
-        }
177
-        elseif (is_dir($absolutePath))
176
+        } elseif (is_dir($absolutePath))
178 177
         {
179 178
             $object->type = static::TYPE_DIR;
180
-        }
181
-        elseif (is_link($absolutePath))
179
+        } elseif (is_link($absolutePath))
182 180
         {
183 181
             $object->type = static::TYPE_LINK;
184 182
             $object->linkTarget = str_replace($basePath, '', readlink($absolutePath));
185
-        }
186
-        else
183
+        } else
187 184
         {
188 185
             throw new \LogicException();
189 186
         }
Please login to merge, or discard this patch.
src/Vault.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -331,8 +331,7 @@  discard block
 block discarded – undo
331 331
         {
332 332
             $newRevision = $newRevision ?: ($lastSynchronization->getRevision() + 1);
333 333
             $remoteIndex = $this->doLoadRemoteIndex($lastSynchronization->getRevision(), $synchronizationList);
334
-        }
335
-        else
334
+        } else
336 335
         {
337 336
             $newRevision = $newRevision ?: 1;
338 337
             $remoteIndex = null;
@@ -474,12 +473,10 @@  discard block
 block discarded – undo
474 473
         try
475 474
         {
476 475
             return $this->doRestore($revision, $progressListener, true);
477
-        }
478
-        catch (\Exception $exception)
476
+        } catch (\Exception $exception)
479 477
         {
480 478
             throw $exception;
481
-        }
482
-        finally
479
+        } finally
483 480
         {
484 481
             $this->localPath = $originalLocalPath;
485 482
         }
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -589,6 +589,9 @@  discard block
 block discarded – undo
589 589
         return $operationResultList;
590 590
     }
591 591
 
592
+    /**
593
+     * @param resource $stream
594
+     */
592 595
     protected function readIndexFromStream($stream): Index
593 596
     {
594 597
         if (!is_resource($stream))
@@ -623,6 +626,9 @@  discard block
 block discarded – undo
623 626
         fclose($stream);
624 627
     }
625 628
 
629
+    /**
630
+     * @param resource $stream
631
+     */
626 632
     protected function readSynchronizationListFromStream($stream): SynchronizationList
627 633
     {
628 634
         if (!is_resource($stream))
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -457,7 +457,7 @@
 block discarded – undo
457 457
     public function dump(string $targetPath, int $revision = null, SynchronizationProgressListenerInterface $progressListener = null): OperationResultList
458 458
     {
459 459
         $originalLocalPath = $this->localPath;
460
-        $this->localPath =  rtrim($this->expandTildePath($targetPath), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
460
+        $this->localPath = rtrim($this->expandTildePath($targetPath), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
461 461
 
462 462
         try
463 463
         {
Please login to merge, or discard this patch.
src/IndexMerger/StandardIndexMerger.php 1 patch
Braces   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,9 +89,7 @@
 block discarded – undo
89 89
                     // compare remote object to object state at last sync
90 90
                     // we explicitly want to use equality instead of identity
91 91
                     $remoteObjectModified = !($remoteObject == $lastLocalObject);
92
-                }
93
-
94
-                else
92
+                } else
95 93
                 {
96 94
                     // object already didn't exist locally at the last sync
97 95
                     $localObjectModified = false;
Please login to merge, or discard this patch.