@@ -593,6 +593,9 @@ discard block |
||
| 593 | 593 | return $operationResultCollection; |
| 594 | 594 | } |
| 595 | 595 | |
| 596 | + /** |
|
| 597 | + * @param resource $stream |
|
| 598 | + */ |
|
| 596 | 599 | protected function readIndexFromStream($stream): Index |
| 597 | 600 | { |
| 598 | 601 | if (!is_resource($stream)) |
@@ -627,6 +630,9 @@ discard block |
||
| 627 | 630 | fclose($stream); |
| 628 | 631 | } |
| 629 | 632 | |
| 633 | + /** |
|
| 634 | + * @param resource $stream |
|
| 635 | + */ |
|
| 630 | 636 | protected function readSynchronizationListFromStream($stream): SynchronizationList |
| 631 | 637 | { |
| 632 | 638 | if (!is_resource($stream)) |
@@ -68,9 +68,7 @@ discard block |
||
| 68 | 68 | $directoryMtimes[$mergedIndexObject->getRelativePath()] = $mergedIndexObject->getMtime(); |
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | - } |
|
| 72 | - |
|
| 73 | - elseif ($mergedIndexObject->isFile()) |
|
| 71 | + } elseif ($mergedIndexObject->isFile()) |
|
| 74 | 72 | { |
| 75 | 73 | // local file did not exist, hasn't been a file before or is outdated |
| 76 | 74 | $doDownloadFile = $localObject === null || !$localObject->isFile() || $localObject->getMtime() < $mergedIndexObject->getMtime(); |
@@ -98,9 +96,7 @@ discard block |
||
| 98 | 96 | |
| 99 | 97 | $operationCollection->addOperation(new UploadOperation($mergedIndexObject->getRelativePath(), $mergedIndexObject->getBlobId(), $uploadStreamFilters)); |
| 100 | 98 | } |
| 101 | - } |
|
| 102 | - |
|
| 103 | - elseif ($mergedIndexObject->isLink()) |
|
| 99 | + } elseif ($mergedIndexObject->isLink()) |
|
| 104 | 100 | { |
| 105 | 101 | if ($localObject !== null && $localObject->getLinkTarget() !== $mergedIndexObject->getLinkTarget()) |
| 106 | 102 | { |
@@ -109,9 +105,7 @@ discard block |
||
| 109 | 105 | |
| 110 | 106 | $modifiedPaths[] = $mergedIndexObject->getRelativePath(); |
| 111 | 107 | } |
| 112 | - } |
|
| 113 | - |
|
| 114 | - else |
|
| 108 | + } else |
|
| 115 | 109 | { |
| 116 | 110 | // unknown/invalid object type |
| 117 | 111 | throw new Exception(); |