Completed
Push — master ( cb7793...7b1e0a )
by Arne
01:36
created
src/Vault.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -548,6 +548,9 @@  discard block
 block discarded – undo
548 548
         return $operationCollection;
549 549
     }
550 550
 
551
+    /**
552
+     * @param resource $stream
553
+     */
551 554
     protected function readIndexFromStream($stream, \DateTime $created = null): Index
552 555
     {
553 556
         if (!is_resource($stream))
@@ -585,6 +588,9 @@  discard block
 block discarded – undo
585 588
         return $path;
586 589
     }
587 590
 
591
+    /**
592
+     * @param resource $stream
593
+     */
588 594
     protected function readSynchronizationListFromStream($stream): SynchronizationList
589 595
     {
590 596
         if (!is_resource($stream))
Please login to merge, or discard this patch.
Braces   +5 added lines, -13 removed lines patch added patch discarded remove patch
@@ -283,8 +283,7 @@  discard block
 block discarded – undo
283 283
         {
284 284
             $newRevision = $newRevision ?: ($lastSynchronization->getRevision() + 1);
285 285
             $remoteIndex = $this->doLoadRemoteIndex($lastSynchronization->getRevision(), $synchronizationList);
286
-        }
287
-        else
286
+        } else
288 287
         {
289 288
             $newRevision = $newRevision ?: 1;
290 289
             $remoteIndex = null;
@@ -461,8 +460,7 @@  discard block
 block discarded – undo
461 460
                 if ($localObject === null)
462 461
                 {
463 462
                     $operationCollection->addOperation(new MkdirOperation($absoluteLocalPath, $indexObject->getMode()));
464
-                }
465
-                elseif (!$localObject->isDirectory())
463
+                } elseif (!$localObject->isDirectory())
466 464
                 {
467 465
                     $operationCollection->addOperation(new MkdirOperation($absoluteLocalPath, $indexObject->getMode()));
468 466
                 }
@@ -474,9 +472,7 @@  discard block
 block discarded – undo
474 472
                         $directoryMtimes[$absoluteLocalPath] = $indexObject->getMtime();
475 473
                     }
476 474
                 }
477
-            }
478
-
479
-            elseif ($indexObject->isFile())
475
+            } elseif ($indexObject->isFile())
480 476
             {
481 477
                 // local file did not exist, hasn't been a file before or is outdated
482 478
                 if ($localObject === null || !$localObject->isFile() || $localObject->getMtime() < $indexObject->getMtime())
@@ -502,9 +498,7 @@  discard block
 block discarded – undo
502 498
 
503 499
                     $operationCollection->addOperation(new UploadOperation($absoluteLocalPath, $indexObject->getBlobId(), $this->vaultConnection, $uploadStreamFilters));
504 500
                 }
505
-            }
506
-
507
-            elseif ($indexObject->isLink())
501
+            } elseif ($indexObject->isLink())
508 502
             {
509 503
                 $absoluteLinkTarget = dirname($absoluteLocalPath) . DIRECTORY_SEPARATOR . $indexObject->getLinkTarget();
510 504
 
@@ -513,9 +507,7 @@  discard block
 block discarded – undo
513 507
                     $operationCollection->addOperation(new UnlinkOperation($absoluteLocalPath));
514 508
                     $operationCollection->addOperation(new SymlinkOperation($absoluteLocalPath, $absoluteLinkTarget, $indexObject->getMode()));
515 509
                 }
516
-            }
517
-
518
-            else
510
+            } else
519 511
             {
520 512
                 // unknown object type
521 513
                 throw new Exception();
Please login to merge, or discard this patch.
src/Cli/Command/InfoCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,7 @@
 block discarded – undo
110 110
         if (count($operationCollection))
111 111
         {
112 112
             $output->writeln(sprintf('Current state: <bold>There are %d outstanding operations.</bold>', count($operationCollection)));
113
-        }
114
-        else
113
+        } else
115 114
         {
116 115
             $output->writeln('Current state: <info>Everything is up to date!</info>');
117 116
         }
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.