Completed
Push — master ( b350e3...8d2c4d )
by Arne
01:49
created
src/Vault.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -601,6 +601,9 @@  discard block
 block discarded – undo
601 601
         return $operationResultCollection;
602 602
     }
603 603
 
604
+    /**
605
+     * @param resource $stream
606
+     */
604 607
     protected function readIndexFromStream($stream, \DateTime $created = null): Index
605 608
     {
606 609
         if (!is_resource($stream))
@@ -635,6 +638,9 @@  discard block
 block discarded – undo
635 638
         fclose($stream);
636 639
     }
637 640
 
641
+    /**
642
+     * @param resource $stream
643
+     */
638 644
     protected function readSynchronizationListFromStream($stream): SynchronizationList
639 645
     {
640 646
         if (!is_resource($stream))
Please login to merge, or discard this patch.
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.
src/OperationCollectionBuilder/StandardOperationCollectionBuilder.php 1 patch
Braces   +3 added lines, -9 removed lines patch added patch discarded remove patch
@@ -90,9 +90,7 @@  discard block
 block discarded – undo
90 90
                         $directoryMtimes[$mergedIndexObject->getRelativePath()] = $mergedIndexObject->getMtime();
91 91
                     }
92 92
                 }
93
-            }
94
-
95
-            elseif ($mergedIndexObject->isFile())
93
+            } elseif ($mergedIndexObject->isFile())
96 94
             {
97 95
                 // local file did not exist, hasn't been a file before or is outdated
98 96
                 $doDownloadFile = $localObject === null || !$localObject->isFile() || $localObject->getMtime() < $mergedIndexObject->getMtime();
@@ -123,9 +121,7 @@  discard block
 block discarded – undo
123 121
 
124 122
                     $operationCollection->addOperation(new UploadOperation($relativePath, $mergedIndexObject->getBlobId(), $vaultConnection, $uploadStreamFilters));
125 123
                 }
126
-            }
127
-
128
-            elseif ($mergedIndexObject->isLink())
124
+            } elseif ($mergedIndexObject->isLink())
129 125
             {
130 126
                 $absoluteLinkTarget = dirname($relativePath) . DIRECTORY_SEPARATOR . $mergedIndexObject->getLinkTarget();
131 127
 
@@ -136,9 +132,7 @@  discard block
 block discarded – undo
136 132
 
137 133
                     $modifiedPaths[] = $mergedIndexObject->getRelativePath();
138 134
                 }
139
-            }
140
-
141
-            else
135
+            } else
142 136
             {
143 137
                 // unknown/invalid object type
144 138
                 throw new Exception();
Please login to merge, or discard this patch.